DR and BDR on shared networks

Why a DR?

On a LAN with many routers, if every router swapped its database with every other one, the work would grow very fast. So OSPF elects a designated router (DR) and a backup DR (BDR). Every router becomes fully adjacent with the DR and BDR only; the others (DROTHERs) stay in 2-Way with each other. That's normal, not a fault.

The election

  1. The highest interface priority wins (ip ospf priority, 0 to 255, default 1).
  2. If priorities tie, the highest router ID wins.
  3. Priority 0 means "never become DR or BDR".

Three routers share a LAN here. R3 has the highest router ID (3.3.3.3), so it's the DR, and R2 is the BDR:

In NetLab

▶ R1
R1>enable
R1#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           1   FULL/BDR        00:00:37    10.0.0.2        GigabitEthernet0/0
3.3.3.3           1   FULL/DR         00:00:37    10.0.0.3        GigabitEthernet0/0
R1#show ip ospf interface g0/0 | include State |Designated|Backup
  Transmit Delay is 1 sec, State DROTHER, Priority 1
  Designated Router (ID) 3.3.3.3, Interface address 10.0.0.3
  Backup Designated router (ID) 2.2.2.2, Interface address 10.0.0.2
    Adjacent with neighbor 2.2.2.2  (Backup Designated Router)
    Adjacent with neighbor 3.3.3.3  (Designated Router)

No take-overs

The election is not pre-emptive: once a DR is elected, a better router that arrives later (or a priority you raise later) doesn't take over. The new priority only counts at the next election, when the DR goes away. To force one, restart OSPF on the current DR and BDR with clear ip ospf process:

In NetLab

▶ R1
R1>enable
R1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#interface g0/0
R1(config-if)#ip ospf priority 100
R1(config-if)#end
*Mar  1 00:00:05.000: %SYS-5-CONFIG_I: Configured from console by console
R1#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           1   FULL/BDR        00:00:33    10.0.0.2        GigabitEthernet0/0
3.3.3.3           1   FULL/DR         00:00:33    10.0.0.3        GigabitEthernet0/0
▶ R3
R3>enable
R3#clear ip ospf process
Reset ALL OSPF processes? [no]: yes
*Mar  1 00:00:09.000: %OSPF-5-ADJCHG: Process 1, Nbr 1.1.1.1 on GigabitEthernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached
*Mar  1 00:00:09.000: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on GigabitEthernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached
*Mar  1 00:00:09.000: %OSPF-5-ADJCHG: Process 1, Nbr 1.1.1.1 on GigabitEthernet0/0 from LOADING to FULL, Loading Done
*Mar  1 00:00:09.000: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on GigabitEthernet0/0 from LOADING to FULL, Loading Done
▶ R2
*Mar  1 00:00:09.000: %OSPF-5-ADJCHG: Process 1, Nbr 3.3.3.3 on GigabitEthernet0/0 from FULL to DOWN, Neighbor Down: Dead timer expired
*Mar  1 00:00:09.000: %OSPF-5-ADJCHG: Process 1, Nbr 3.3.3.3 on GigabitEthernet0/0 from LOADING to FULL, Loading Done
R2>enable
R2#clear ip ospf process
Reset ALL OSPF processes? [no]: yes
*Mar  1 00:00:12.000: %OSPF-5-ADJCHG: Process 1, Nbr 1.1.1.1 on GigabitEthernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached
*Mar  1 00:00:12.000: %OSPF-5-ADJCHG: Process 1, Nbr 3.3.3.3 on GigabitEthernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached
*Mar  1 00:00:12.000: %OSPF-5-ADJCHG: Process 1, Nbr 1.1.1.1 on GigabitEthernet0/0 from LOADING to FULL, Loading Done
*Mar  1 00:00:12.000: %OSPF-5-ADJCHG: Process 1, Nbr 3.3.3.3 on GigabitEthernet0/0 from LOADING to FULL, Loading Done
▶ R1
R1#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           1   FULL/DROTHER    00:00:38    10.0.0.2        GigabitEthernet0/0
3.3.3.3           1   FULL/BDR        00:00:35    10.0.0.3        GigabitEthernet0/0
*Mar  1 00:00:09.000: %OSPF-5-ADJCHG: Process 1, Nbr 3.3.3.3 on GigabitEthernet0/0 from FULL to DOWN, Neighbor Down: Dead timer expired
*Mar  1 00:00:09.000: %OSPF-5-ADJCHG: Process 1, Nbr 3.3.3.3 on GigabitEthernet0/0 from LOADING to FULL, Loading Done
*Mar  1 00:00:12.000: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on GigabitEthernet0/0 from FULL to DOWN, Neighbor Down: Dead timer expired
*Mar  1 00:00:12.000: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on GigabitEthernet0/0 from LOADING to FULL, Loading Done

After R3 (the DR) restarts, the BDR R2 becomes DR and R1 (priority 100) becomes BDR. After R2 restarts too, R1 is promoted to DR and R3 is elected BDR.

Tip: Point-to-point links (two routers on one cable) don't need a DR. ip ospf network point-to-point on both ends skips the election and brings the neighbours up faster: they show as FULL/ -.

HOME LABS COMMUNITY DASHBOARD