Sub topic 6
DR and BDR Election on Multi-Access Segments
This chapter assumes you know how OSPF Hello packets create neighbors and how broadcast and point-to-point network types differ. It also assumes you can read basic router interface configuration.
Why a Designated Router Exists
On a broadcast segment such as Ethernet with a switch, every router could form a full adjacency with every other router. With n routers that is n(n-1)/2 adjacencies. Five routers need 10, and ten routers need 45. Each adjacency exchanges database descriptions and floods LSAs, so the overhead grows quickly.
OSPF avoids this by electing two routers on each multi-access segment:
- The Designated Router (DR) is the router that all other routers on the segment form a full adjacency with. It originates the Type 2 network LSA for the segment.
- The Backup Designated Router (BDR) is a standby that also forms full adjacencies and takes over if the DR fails.
- Every other router is a DROther. A DROther reaches Full only with the DR and BDR. With other DROthers it stays in the 2-Way state.
Routers send updates to the multicast address 224.0.0.6 (AllDRouters), which only the DR and BDR hear. The DR then floods the update to 224.0.0.5 (AllSPFRouters), which every OSPF router hears.
How the Election Works
The election uses two values from each router's Hello packets:
- The highest interface priority wins. The default is 1, and the range is 0 to 255.
- If priorities tie, the highest router ID wins.
A priority of 0 means the router can never become DR or BDR.
The BDR is chosen first, from the routers that did not claim to be DR. Then the DR is chosen. If no router has declared itself DR, the BDR is promoted to DR and a new BDR is elected.
Worked Example
| Router | Priority | Router ID | Result |
|---|---|---|---|
| R1 | 1 | 1.1.1.1 | DROther |
| R2 | 1 | 2.2.2.2 | BDR |
| R3 | 1 | 3.3.3.3 | DR |
| R4 | 0 | 4.4.4.4 | DROther (never eligible) |
All priorities tie among R1, R2, and R3, so router ID decides. R3 has the highest ID and becomes DR. R2 is next and becomes BDR. R4 has priority 0, so its high router ID does not help.
The Election Is Not Preemptive
This is the most common surprise. Once a DR exists, a router that joins later with a higher priority or router ID does not take over. The election runs only when the DR or BDR is missing.
If R3 fails, R2 (BDR) becomes DR immediately, and a new BDR is elected from the remaining routers. When R3 returns, it becomes a DROther or BDR, not DR again. In practice, the router that boots first often wins. To force a result, set priorities before bringing the segment up, or restart the OSPF process on the routers after changing priority.
Configuring Priority
interface GigabitEthernet0/0
ip ospf priority 100
!
interface GigabitEthernet0/1
ip ospf priority 0The first interface becomes the preferred DR. The second interface can never be DR or BDR. Priority is set per interface, so a router can be DR on one segment and DROther on another.
Checking the Result
Run show ip ospf neighbor on a router. The State column shows values such as FULL/DR, FULL/BDR, and 2WAY/DROTHER. A DROther neighbor stuck in 2-Way is normal, not a fault.
Exercise
A segment has routers A (priority 10, ID 1.1.1.1), B (priority 1, ID 9.9.9.9), and C (priority 1, ID 5.5.5.5). All start at the same time. Which router is DR, and which is BDR? Then router D (priority 200) joins. What changes?
Show answer
A is the DR because it has the highest priority (10). Among B and C, priorities tie, so the higher router ID decides: B (9.9.9.9) is BDR. When D joins, nothing changes, because the election is not preemptive. D becomes a DROther until the current DR or BDR fails or OSPF is restarted.