NetworkingCCNA

CCNA OSPF Deep Dive: DR/BDR Election, Router ID & Neighbor Adjacency

OSPF is the most heavily tested routing protocol on CCNA 200-301. Beyond basic configuration, the exam goes deep: DR/BDR election, router ID selection, neighbor adjacency states, network types (point-to-point vs broadcast), and OSPFv3 for IPv6. This guide covers the details that separate passing CCNA candidates from those who struggle with OSPF scenario questions.

10 min
5 sections · 6 exam key points
5 practice questions

OSPF fundamentals recap

OSPF is a link-state routing protocol that builds a complete map of the network topology in each router's Link-State Database (LSDB). Routers exchange Link-State Advertisements (LSAs) describing their directly connected links. Each router runs the Dijkstra SPF algorithm on its LSDB to calculate the shortest path to every destination.

OSPF uses multicast for hello packets and LSA flooding: 224.0.0.5 (all OSPF routers) and 224.0.0.6 (all Designated Routers). OSPF runs directly over IP protocol number 89 — not TCP or UDP. OSPF areas allow large networks to be divided into smaller domains that limit LSA flooding scope. Area 0 (backbone area) must connect all other areas.

Router ID selection

Every OSPF router has a Router ID (RID) — a 32-bit number written in dotted decimal format that uniquely identifies it in the OSPF domain. The RID is not an IP address used for routing — it's an identifier. However, it is selected using IP address rules.

RID selection order: (1) Manually configured RID with `router-id <x.x.x.x>` — always preferred. (2) Highest loopback interface IP address. (3) Highest active physical interface IP address. The key word is 'highest' — not the first configured, not the management interface, but the numerically highest IP.

Always configure the RID manually in production. RID instability (changing because an interface came up with a higher IP) causes OSPF reconvergence. Loopback interfaces are UP/UP as long as the router is running — they provide a stable RID source even if physical interfaces go down.

DR and BDR election on broadcast networks

On multi-access broadcast networks (Ethernet), all OSPF routers would form adjacencies with every other router, resulting in N*(N-1)/2 adjacencies. For 5 routers, that's 10 full adjacencies, each maintaining synchronized LSDBs. This doesn't scale.

OSPF solves this with Designated Router (DR) and Backup Designated Router (BDR) election. All routers form full adjacency only with the DR and BDR. Other routers (DROther) form 2-way relationships with each other but don't fully synchronize LSDBs. LSAs are sent to 224.0.0.6 (AllDRRouters) and the DR redistributes to 224.0.0.5 (AllSPFRouters).

DR/BDR election: the router with the highest OSPF interface priority wins DR (default priority = 1). Ties are broken by Router ID. Priority 0 means the router never becomes DR or BDR — useful to prevent access layer switches from becoming DR.

Critical point: DR/BDR election is non-preemptive. Once elected, a DR keeps its role until it fails, even if a router with a higher priority/RID comes online later. To force a new election, the existing DR must be removed from the network.

Neighbor adjacency states

OSPF neighbors progress through states before full adjacency. The states: Down → Init → 2-Way → Exstart → Exchange → Loading → Full.

Down: no hellos received. Init: hello received, but our router ID isn't in the neighbor's hello. 2-Way: bidirectional communication confirmed (both Router IDs in each other's hellos); DR/BDR election occurs at this state. Exstart: master/slave relationship established for LSDB exchange. Exchange: routers exchange Database Description (DBD) packets summarizing their LSDB. Loading: one router requests LSAs it's missing. Full: LSDBs are synchronized — full adjacency achieved.

On broadcast networks, DROther routers only reach Full state with the DR and BDR. With other DROthers they remain at 2-Way. On point-to-point links, there is no DR/BDR — both routers reach Full state directly.

A stuck neighbor (not reaching Full) is a common CCNA troubleshooting scenario. Causes: MTU mismatch (Exchange/Loading stuck), area ID mismatch, authentication mismatch, hello/dead timer mismatch, or duplicate Router IDs.

OSPF network types

OSPF network type determines whether DR/BDR election occurs and how hellos are sent. The two most important: Broadcast (default on Ethernet) — uses multicast hellos, elects DR/BDR. Point-to-Point (default on serial links and recommended on point-to-point Ethernet links) — no DR/BDR, uses multicast hellos, both routers reach Full adjacency directly.

On point-to-point links, DR/BDR election is unnecessary and wastes convergence time. Configure `ip ospf network point-to-point` on both ends of a point-to-point Ethernet link to skip DR/BDR election and speed up adjacency formation.

OSPFv3 is OSPF for IPv6. The configuration is similar but uses IPv6 addresses and the `ipv6 ospf` command set. OSPFv3 uses link-local addresses as the source for hello packets and supports multiple address families in newer implementations.

OSPF network types

Network typeDefault interfaceDR/BDR?Hello intervalDead interval
BroadcastEthernetYes10 sec40 sec
Point-to-pointSerial, p2p EthernetNo10 sec40 sec
Non-broadcast (NBMA)Frame Relay (legacy)Yes30 sec120 sec
Point-to-multipointHub-spoke WANNo30 sec120 sec

Key exam facts — CCNA

  • Router ID: (1) manually configured, (2) highest loopback, (3) highest active interface IP
  • DR/BDR: highest priority wins; tie broken by highest Router ID; election is non-preemptive
  • Priority 0 = never become DR/BDR
  • DROther routers reach Full only with DR/BDR; stay at 2-Way with other DROthers
  • Broadcast default network type: DR/BDR election. Point-to-point: no DR/BDR
  • OSPF protocol number: 89. Multicast: 224.0.0.5 (all OSPF routers), 224.0.0.6 (all DRs)

Common exam traps

A router with a higher RID always becomes DR

The router with the highest OSPF interface priority becomes DR. RID only breaks ties when priorities are equal. Setting priority to 0 prevents a router from ever becoming DR regardless of RID.

When a new router with the highest priority joins, it becomes the new DR immediately

DR/BDR election is non-preemptive. The current DR keeps its role until it leaves the network. The high-priority new router becomes BDR (if BDR is open) and only becomes DR after the current DR fails.

All OSPF routers on a broadcast segment reach Full adjacency with each other

Only DR and BDR reach Full adjacency with all routers. DROther routers form Full adjacency only with the DR and BDR. Between themselves, DROthers stay at 2-Way state.

Practice questions — OSPF Detail

These questions are representative of what you will see on CCNA exams. The correct answer and explanation are shown immediately below each question.

Q1.Three OSPF routers are on the same Ethernet segment. Router A has priority 0, Router B has priority 2, Router C has priority 1. Which router becomes the DR?

A.Router A
B.Router B
C.Router C
D.No DR is elected; priority 2 is invalid

Explanation: The router with the highest OSPF interface priority becomes DR. Router B (priority 2) has the highest priority. Router A (priority 0) is ineligible for DR/BDR. Priority 2 is valid — the range is 0–255.

Q2.An OSPF router has no loopback interfaces and three physical interfaces: 10.0.0.1, 172.16.1.1, and 192.168.1.1, all active. No RID is manually configured. What is the Router ID?

A.10.0.0.1
B.172.16.1.1
C.192.168.1.1
D.0.0.0.0

Explanation: Without a manually configured RID or loopback interfaces, OSPF uses the numerically highest active physical interface IP as the Router ID. 192.168.1.1 is the highest of the three IPs.

Q3.A DROther OSPF router should be in which adjacency state with another DROther router on the same broadcast segment?

A.Full
B.Loading
C.2-Way
D.Init

Explanation: DROther routers form 2-Way adjacency with each other — they see each other's hellos and Router IDs but do not fully synchronize their LSDBs. Full adjacency is only formed between DROther routers and the DR/BDR.

Q4.Which OSPF packet type is used to summarize a router's LSDB during the Exchange state?

A.Hello
B.LSU (Link-State Update)
C.LSAck
D.DBD (Database Description)

Explanation: During the Exchange state, routers exchange Database Description (DBD) packets that summarize the contents of their LSDBs. Routers compare DBDs and request any missing LSAs using LSR (Link-State Request) in the Loading state.

Q5.Which command configures an Ethernet interface to use OSPF point-to-point network type, eliminating DR/BDR election?

A.ip ospf priority 0
B.ip ospf network point-to-point
C.no ip ospf dr-bdr
D.ip ospf area 0

Explanation: ip ospf network point-to-point changes the OSPF network type on the interface to point-to-point, which skips DR/BDR election and allows both ends to form Full adjacency directly. ip ospf priority 0 prevents a router from becoming DR/BDR but doesn't change the network type.

Frequently asked questions — OSPF Detail

How is the OSPF Router ID selected?

OSPF selects the Router ID in this order: (1) Manually configured with `router-id` command — always wins. (2) Highest IP address on a loopback interface. (3) Highest IP address on an active physical interface. Manual configuration is strongly recommended to prevent instability when interfaces change state.

What is the purpose of the DR and BDR in OSPF?

On multi-access broadcast networks (Ethernet), the DR (Designated Router) and BDR (Backup Designated Router) reduce the number of adjacencies. Instead of N*(N-1)/2 full adjacencies, all routers form full adjacency only with the DR and BDR. The DR redistributes LSAs to all routers, and the BDR monitors the DR to take over if it fails.

What causes OSPF neighbors to get stuck in Exchange state?

The most common cause is an MTU mismatch. If two routers have different interface MTUs, DBD packets larger than the smaller MTU are dropped, preventing LSDB exchange. Other causes: mismatched OSPF network types, duplicate Router IDs, or authentication mismatches. Check with `show interfaces` for MTU and `show ip ospf neighbor` for the stuck state.

What is the difference between OSPF broadcast and point-to-point network types?

Broadcast (default on Ethernet) elects a DR and BDR; routers send hellos to 224.0.0.5 and LSAs to 224.0.0.6. Point-to-point has no DR/BDR; both routers form Full adjacency directly. For Ethernet links connecting only two routers, `ip ospf network point-to-point` simplifies adjacency and speeds convergence.

Can an OSPF router ID be any 32-bit number?

The Router ID is a 32-bit number expressed in dotted decimal (like an IP address) but it doesn't have to match an actual interface IP. When manually configured with `router-id`, you can use any unique value like 1.1.1.1 or 0.0.0.1. Using simple values like 1.1.1.1 per-router makes troubleshooting much easier than relying on interface IPs.

Practice this topic

Test yourself on OSPF Detail

JT Exams routes you to questions in your exact weak areas — automatically, after every session.

No credit card · Cancel anytime

Related certification topics