Octet

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

  1. The DR goes down.
  2. The BDR becomes DR immediately, because it already has Full adjacencies and the same database.
  3. A new BDR is elected among the DROTHERs.
  4. When the old DR comes back it becomes a DROTHER.

Forcing a change

  • Set the priorities you want, then clear ip ospf process on 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-point and there is no DR at all.

Traps

  • Comparing it to HSRP preempt. OSPF has no preempt command for DR election.
How did you do?