DR and BDR elections
Control a shared segment’s election and recognize healthy 2-Way neighbors.
Understand
The DR and BDR are elected per broadcast or NBMA segment, not per area. Priority 0 is ineligible; among eligible candidates higher interface priority wins, then higher router ID breaks ties. Existing DR/BDR roles are non-preemptive: a new high-priority router does not automatically replace them.
DROTHER routers become Full with the DR and BDR, and normally remain 2-Way with each other. The DR originates the segment’s Type 2 network-LSA. Its control-plane role does not make it a compulsory data-plane next hop. On broadcast links, DROTHER flooding uses AllDRouters 224.0.0.6; the DR floods toward AllSPFRouters 224.0.0.5.
Lab setup
Use a fresh lab for this lesson; changes from other lessons are not cumulative. All outputs are illustrative excerpts, not recorded router tests. Transit cost is explicitly 10 and Loopback0 cost is 1. Interface names may vary by image.
| Router | Interface | IPv4 address | Area |
|---|---|---|---|
| R1 | Gi1 | 192.0.2.1/24 | 0 |
| R2 | Gi1 | 192.0.2.2/24 | 0 |
| R3 | Gi1 | 192.0.2.3/24 | 0 |
| R4 | Gi1 | 192.0.2.4/24 | 0 |
Loopback0 is 10.255.0.<router number>/32; area assignments: R1: area 0, R2: area 0, R3: area 0, R4: area 0.
Complete baseline configurations
R1
configure terminal
hostname R1
router ospf 1
router-id 10.255.0.1
passive-interface Loopback0
exit
interface Loopback0
ip address 10.255.0.1 255.255.255.255
ip ospf 1 area 0
ip ospf cost 1
exit
interface GigabitEthernet1
ip address 192.0.2.1 255.255.255.0
ip ospf network broadcast
ip ospf cost 10
ip ospf 1 area 0
no shutdown
exit
endR2
configure terminal
hostname R2
router ospf 1
router-id 10.255.0.2
passive-interface Loopback0
exit
interface Loopback0
ip address 10.255.0.2 255.255.255.255
ip ospf 1 area 0
ip ospf cost 1
exit
interface GigabitEthernet1
ip address 192.0.2.2 255.255.255.0
ip ospf network broadcast
ip ospf cost 10
ip ospf 1 area 0
no shutdown
exit
endR3
configure terminal
hostname R3
router ospf 1
router-id 10.255.0.3
passive-interface Loopback0
exit
interface Loopback0
ip address 10.255.0.3 255.255.255.255
ip ospf 1 area 0
ip ospf cost 1
exit
interface GigabitEthernet1
ip address 192.0.2.3 255.255.255.0
ip ospf network broadcast
ip ospf cost 10
ip ospf 1 area 0
no shutdown
exit
endR4
configure terminal
hostname R4
router ospf 1
router-id 10.255.0.4
passive-interface Loopback0
exit
interface Loopback0
ip address 10.255.0.4 255.255.255.255
ip ospf 1 area 0
ip ospf cost 1
exit
interface GigabitEthernet1
ip address 192.0.2.4 255.255.255.0
ip ospf network broadcast
ip ospf cost 10
ip ospf 1 area 0
no shutdown
exit
endApply
For a deterministic fresh election, configure priorities before enabling OSPF on Gi1. Use the LAN baseline addressing, withhold ip ospf 1 area 0 on Gi1 until the priorities below are set, then enable each router. Let R1 and R2 elect roles before R3/R4 join.
R1
configure terminal
interface GigabitEthernet1
ip ospf priority 100
ip ospf 1 area 0
endR2
configure terminal
interface GigabitEthernet1
ip ospf priority 50
ip ospf 1 area 0
endR3 and R4 · independently
configure terminal
interface GigabitEthernet1
ip ospf priority 0
ip ospf 1 area 0
endVerify and interpret
R3# show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
10.255.0.1 100 FULL/DR 00:00:36 192.0.2.1 GigabitEthernet1
10.255.0.2 50 FULL/BDR 00:00:34 192.0.2.2 GigabitEthernet1
10.255.0.4 0 2WAY/DROTHER 00:00:38 192.0.2.4 GigabitEthernet1R3 and R4 are DROTHERs. Their 2-Way relationship is expected, not an MTU failure.
Now shut Gi1 on R1. R2 promotes from BDR to DR; R3/R4 cannot become BDR because their priorities are zero. Restore R1: it does not preempt R2. Record the new roles. Avoid resetting an entire production process merely to change an election.
R1 · failure then restore
configure terminal
interface GigabitEthernet1
shutdown
endR1 · restore after observing R2
configure terminal
interface GigabitEthernet1
no shutdown
endR2# show ip ospf interface GigabitEthernet1 | include State
Transmit Delay is 1 sec, State DR, Priority 50R2 remains DR after R1 returns. Restore all routers to the fresh baseline before a new election experiment.
Technical references
Key Takeaways
- Election is per segment.
- Priority zero excludes DR and BDR candidacy.
- Priority wins before router ID in a fresh election.
- DR/BDR election is non-preemptive.
- 2-Way between DROTHERs is healthy.