If I add a router with a higher priority to the segment, does it take over as DR?
Show the answer
Say this first
No. DR election is not preemptive. Once a DR and BDR exist, a new router with a higher priority becomes a DROTHER. It only becomes DR if the current DR and BDR fail or their OSPF process or interface restarts. To force it, I clear the OSPF process on the current DR and then on the BDR, in a maintenance window.
Go deeper
Why it is designed this way
A DR change means every router on the segment re-forms adjacencies with the new DR and the Type 2 LSA is re-originated. Preemption would cause that churn every time a router rebooted.
What happens on failure
- The DR goes down.
- The BDR becomes DR immediately, because it already has Full adjacencies and the same database.
- A new BDR is elected among the DROTHERs.
- When the old DR comes back it becomes a DROTHER.
Forcing a change
- Set the priorities you want, then
clear ip ospf processon the current DR. The BDR takes DR. - Clear the process on the new BDR (the old DR or another router) so your preferred router can win BDR, then clear again on the DR if needed. Each clear drops that router's adjacencies.
- Or avoid the problem: on links with only two routers, use
ip ospf network point-to-pointand there is no DR at all.
They will ask next
What happens if every router on the segment has priority 0?
No DR or BDR is elected, so no router goes past 2-Way and no routes are exchanged over that segment.
show ip ospf neighborshows 2WAY/DROTHER everywhere.
Traps
- Comparing it to HSRP preempt. OSPF has no preempt command for DR election.
How did you do?