OSPF DR and BDR Election
Learn why a shared Ethernet network needs a DR and BDR, predict the election result before touching a router, and prove the result with show commands.
DR and BDR at a Glance
The Designated Router (DR) coordinates LSA exchange on a multi-access segment. The Backup Designated Router (BDR) is ready to take over if the DR fails. Other routers on the segment are called DROTHERs.
In This Lesson
- See the Broadcast-Segment Design
- Understand Why OSPF Uses an Election
- Apply the Election Rules in Order
- Configure a Predictable Election
- Understand FULL and 2-WAY States
- Verify Roles and the Type 2 LSA
- Change an Election Safely
- Troubleshoot Unexpected Results
- Complete the Guided Practice Lab
- Review Frequently Asked Questions
1. See the Broadcast-Segment Design
All four routers below share one Ethernet LAN in Area 0. Their interface priorities make the intended roles easy to predict.
10.10.10.110.10.10.210.10.10.310.10.10.42. Understand Why OSPF Uses an Election
A broadcast LAN can contain many routers. If every router built a Full adjacency with every other router, the number of relationships would grow quickly. With four routers, a full mesh needs six relationships. With ten routers, it needs 45.
DROTHER sends updates
DROTHER routers send link-state updates to 224.0.0.6, which reaches the DR and BDR.
DR coordinates flooding
The DR repeats the update to all OSPF routers on 224.0.0.5.
DR represents the LAN
The DR creates the Type 2 Network LSA for the shared segment.
The BDR listens and stays synchronized so it can replace the DR quickly. This design reduces unnecessary Full adjacencies while keeping the segment resilient.
3. Apply the Election Rules in Order
- Remove priority 0 interfaces. They can join OSPF but cannot be DR or BDR.
- Compare interface priority. The highest eligible value wins. The range is 0–255 and the default is 1.
- Use router ID only for a tie. The numerically highest router ID wins between equal priorities.
- Elect the BDR before the DR. OSPF first selects the best BDR candidate, then promotes the existing or selected DR candidate.
- Keep existing roles. A working DR is not replaced just because a better candidate joins later.
| Router | Priority | Router ID | Expected role | Reason |
|---|---|---|---|---|
| R1 | 200 | 1.1.1.1 | DR | Highest eligible priority |
| R2 | 100 | 2.2.2.2 | BDR | Second-highest priority |
| R3 | 1 | 3.3.3.3 | DROTHER | Eligible, but lower priority |
| R4 | 0 | 4.4.4.4 | Ineligible | Priority 0 overrides its high RID |
4. Configure a Predictable Election
Set stable router IDs under the OSPF process and set election priority on the interface connected to the shared LAN. Priority is an interface setting, not a router-wide setting.
R1 · Preferred DR
router ospf 1
router-id 1.1.1.1
!
interface GigabitEthernet0/0
ip ospf 1 area 0
ip ospf priority 200R2 · Preferred BDR
router ospf 1
router-id 2.2.2.2
!
interface GigabitEthernet0/0
ip ospf 1 area 0
ip ospf priority 100R3 · DROTHER
router ospf 1
router-id 3.3.3.3
!
interface GigabitEthernet0/0
ip ospf 1 area 0
ip ospf priority 1R4 · Never DR/BDR
router ospf 1
router-id 4.4.4.4
!
interface GigabitEthernet0/0
ip ospf 1 area 0
ip ospf priority 05. Understand FULL and 2-WAY States
Not every pair of routers on a broadcast LAN must reach FULL. The role of each neighbor decides the expected state.
| Neighbor pair | Expected state | Meaning |
|---|---|---|
| DR ↔ BDR | FULL | The backup keeps a complete synchronized database. |
| DR or BDR ↔ DROTHER | FULL | Each DROTHER exchanges its database with both central routers. |
| DROTHER ↔ DROTHER | 2-WAY | They see each other but do not build a Full adjacency. |
6. Verify Roles and the Type 2 LSA
Read the neighbor table first, confirm the local interface state second, and inspect the LSDB last. This order moves from the visible result to the supporting evidence.
R3 neighbor view
R3# show ip ospf neighbor
Neighbor ID Pri State Address
1.1.1.1 200 FULL/DR 10.10.10.1
2.2.2.2 100 FULL/BDR 10.10.10.2
4.4.4.4 0 2WAY/DROTHER 10.10.10.4Check the local interface
R1# show ip ospf interface g0/0
Process ID 1, Router ID 1.1.1.1
Network Type BROADCAST, Cost: 1
State DR, Priority 200
Designated Router (ID) 1.1.1.1
Backup Designated Router (ID) 2.2.2.2Confirm the Network LSA
R1# show ip ospf database network
Link ID ADV Router Age
10.10.10.1 1.1.1.1 42
Attached Router 1.1.1.1
Attached Router 2.2.2.2
Attached Router 3.3.3.3
Attached Router 4.4.4.4show ip ospf neighborproves each neighbor role and adjacency state.show ip ospf interface g0/0proves network type, priority, DR and BDR.show ip ospf database networkproves the DR originated a Type 2 LSA.
7. Change an Election Safely
OSPF DR elections are non-preemptive. If R3 joins with priority 250 after R1 is already DR, R1 stays DR. R3 can win only when a new election is required.
Current DR fails
Neighbors stop receiving Hellos from the DR and the dead timer expires.
BDR becomes DR
The existing BDR takes over without waiting for a completely new choice.
New BDR is elected
The remaining eligible routers compare priority and then router ID.
8. Troubleshoot Unexpected Results
If the result does not match your design, check facts in this order. Avoid resetting OSPF until you understand the cause.
- Network type: All interfaces on the segment should agree. Point-to-point mode has no election.
- Interface priority: Check the actual connected interface, not another interface on the router.
- Router ID: Confirm it is unique and remember that it is only a tie-breaker.
- Election timing: A better candidate that joined later will not preempt the current DR.
- Neighbor state: FULL with DR/BDR and 2-WAY between DROTHERs is normal.
- Duplicate router IDs: A duplicate can break stable adjacency and produce confusing output.
9. Guided Practice Lab
Complete one task at a time. Predict the result before running the command, then compare your prediction with the router output.
Task 1: Build and Predict
- Connect four routers to one Ethernet switch.
- Use the addresses and priorities shown in the topology.
- Enable OSPF Area 0 on every LAN interface.
- Write down the expected DR, BDR and DROTHER roles.
- Verify with
show ip ospf neighbor.
Expected result: R1 is DR, R2 is BDR, and your prediction matches the output.
Task 2: Prove Two Important Rules
- Confirm R4 uses priority 0.
- Prove R4 still reaches FULL with R1 and R2.
- Compare the R3-to-R4 relationship.
- Explain why their 2-WAY state is correct.
Expected result: Priority 0 blocks election eligibility, not OSPF participation.
Task 3: Observe DR Failure
- Save the initial neighbor and interface output.
- In an isolated lab, shut R1's LAN interface.
- Watch R2 move from BDR to DR.
- Identify the newly elected BDR.
- Restore R1 and confirm it does not automatically reclaim DR.
Expected result: You can explain BDR takeover and non-preemption using captured output.
10. Frequently Asked Questions
Where does OSPF elect a DR and BDR?
OSPF uses an election on multi-access network types such as broadcast Ethernet and NBMA. A point-to-point link has only two OSPF speakers, so it does not need a DR or BDR.
Does a router with a higher priority always become DR?
No. Priority decides an election, but a new router does not replace a working DR. The design is non-preemptive.
What does OSPF priority 0 mean?
It makes that interface ineligible to become DR or BDR. The router can still exchange OSPF traffic and form Full adjacencies with the DR and BDR.
Is a 2-WAY state between two DROTHER routers a failure?
No. On a broadcast network, two DROTHER routers normally stay in 2-WAY with each other. Each one should be FULL with the DR and BDR.
Which router creates the Type 2 Network LSA?
The DR creates the Type 2 Network LSA. It represents the shared segment and lists the routers attached to it.