Network Bytes · Episode 47 · CCNA 3.4
OSPF neighbors and DR/BDR
OSPF routers become neighbors by trading hellos with matching settings. On a shared Ethernet segment they elect a designated router (DR) and a backup (BDR), so updates go through one router instead of every pair syncing with every other.
A group chat needs an admin
Picture a group chat where everyone forwards every message to everyone else, one by one. It gets noisy fast. A group chat admin fixes that: you send your news to the admin, and the admin shares it with the whole group. OSPF solves the same problem on shared networks by electing a designated router.
Becoming neighbors: hellos must agree
OSPF routers find each other by sending hello packets out of their OSPF interfaces. Two routers only become neighbors if key settings in those hellos match: the area ID, the hello and dead timers, the subnet, authentication and stub-area flags. Each router also needs a unique router ID. If, say, one router is in area 0 and the other in area 1, they never connect. Even when hellos match, an MTU mismatch stops them from reaching full adjacency (the point where their link-state databases are synced).
Why every pair syncing doesn't scale
On a shared segment, if every router became fully adjacent with every other one, the number of pairs grows fast. The formula is n(n-1)/2: six routers give 6 × 5 ÷ 2 = 15 pairs, all repeating the same updates to each other. That's a lot of duplicate traffic for one Ethernet segment.
The DR, the BDR and the election
On broadcast multi-access networks such as Ethernet, OSPF elects a DR and a BDR. The other routers, called DROthers, become fully adjacent only with the DR and BDR. They send updates to the multicast address 224.0.0.6 (all DR routers), and the DR floods them back out to 224.0.0.5 (all OSPF routers).
The election compares two things:
- Interface priority, highest wins. The default is 1; a priority of 0 means the router can never be DR or BDR.
- If priorities tie, the highest router ID wins.
The runner-up becomes the BDR. If the DR fails (it's declared dead once the dead interval passes), the BDR takes over as DR.
Try it yourself
In Cisco Packet Tracer (free with a Cisco Networking Academy account), connect three routers to one switch, give each an address in the same subnet, and enable OSPF area 0 on them. Run show ip ospf neighbor on one router: the State column shows FULL/DR, FULL/BDR or 2WAY/DROTHER for each neighbor. Now set ip ospf priority 0 on one interface and clear the OSPF process with clear ip ospf process; that router drops out of the election and shows as a DROTHER.
Good to know
- To become neighbors, routers must match area ID, hello and dead timers (10 and 40 seconds by default on Ethernet), subnet, authentication and stub flags, and have unique router IDs. An MTU mismatch stops them from reaching full adjacency.
- DR and BDR are elected only on broadcast multi-access networks such as Ethernet. Point-to-point links elect no DR.
- DROthers are fully adjacent only with the DR and BDR. Updates go to the DR and BDR on
224.0.0.6; the DR floods them to all OSPF routers on224.0.0.5. - Election: highest interface priority (0-255, default 1; 0 means never DR), then highest router ID.
- The election is non-preemptive: a better router that joins later does not take over until the DR and BDR are gone.
- "The backup takes over" is simplified: the BDR becomes DR once the DR is declared dead (after the dead interval, 40 seconds by default, or sooner with BFD), and a new BDR is then elected.
- The video says "designated router" aloud instead of reading "DR".
For CCNA learners
This lines up with CCNA 200-301 exam topic 3.4, single area OSPFv2 (neighbor adjacencies, point-to-point, broadcast DR/BDR selection, router ID): know what must match for neighbors to form, and how the DR and BDR are chosen by priority and then router ID.
Answer to the comment question
10 pairs. With no designated router, every router would have to fully sync with every other router. Using n(n-1)/2: 5 × 4 ÷ 2 = 10. With a DR and BDR, each of the other three routers only needs adjacencies with those two.
Test your knowledge
Quick quiz: OSPF neighbors and DR/BDR
4 multiple-choice questions. Pick one answer for each, then check how you did.
Sources
- IETF, "RFC 2328, OSPF Version 2": DR elected by the Hello protocol; higher Router Priority wins; priority 0 can never be DR; an existing DR is kept; HelloInterval and RouterDeadInterval
- Cisco Press, "OSPF Implementation: Establishing OSPF Neighbor Relationships": highest priority wins DR, next is BDR; tie broken by highest router ID; default priority 1; no preemption; no DR on point-to-point
- Cisco, "OSPF Configuration Guide, IOS XE 17 (Catalyst 9000)": DR controls flooding on broadcast segments; BDR takes over if it fails; priority 0-255, default 1
- Cisco Press, "Implementing OSPFv2 Using network Commands": router ID selection (CCNA Official Cert Guide sample)
- Cisco, CCNA 200-301 v1.1 exam topics: 3.4 single area OSPFv2, neighbor adjacencies, broadcast DR/BDR selection, router ID
Video transcript
Why do OSPF routers elect a group chat admin?
OSPF routers become neighbors by trading hellos. They must agree on a few settings, like the area and the hello timer, or they never connect.
Now put six routers on one shared Ethernet segment. If every router fully synced with every other router, that's fifteen separate pairs, all repeating the same updates.
So they elect a group chat admin: the designated router, plus a backup designated router. Everyone sends updates to the admin, and it shares them with the whole group.
The highest OSPF priority wins. If that's tied, the highest router ID wins. And if the designated router fails, the backup takes over.
Five routers on one shared segment, and no designated router. How many router pairs would have to fully sync? Comment your answer below!
That's your byte.