Sunday, 27 July 2025

OSPF DR and BDR Explained: The Hidden Heroes of Network Efficiency.

In the world of networking, OSPF (Open Shortest Path First) is one of the most widely used dynamic routing protocols. But did you know that behind the scenes, two special routers —the **Designated Router (DR)** and **Backup Designated Router (BDR)** — work tirelessly to keep your network running smoothly?




In this blog post, we’ll uncover:

 

  • 1.      What do DR and BDR do for our network?
  • 2.      How do they get elected, and why is this election important?
  • 3.      What are the Common mistakes in OSPF configuration?
  • 4.      What are the best practices for optimizing DR/BDR selection?

 

Let's dive in-à

·        Why do we need DR and BDR?

Ø  Imagine a conference room where everyone is shouting updates at the same time--- chaos, right? That’s what happens in an OSPF multi-access network (Ethernet) without a DR and BDR.

 

·        The problem: toooo many LSAs*

Ø  Every OSPF router floods Link-State Advertisements (LSAs) to announce network changes. In a large network, this creates excessive traffic and inefficiency.

 

·        The Solution: DR and BDR to the Rescue**

>Designated Router DR -> becomes the central hub for LSA distribution.

> BDR Backup DR->  standby to take over if the DR fails.

> All the other routers (***DROTHERs***) only talk to the DR and BDR, reducing unnecessary chatter.

 

Ø  Result: A cleaner, more efficient OSPF network**

 

·        How does the DR and BDR election work?

Ø  Not every router gets to be the DR- there’s a strict election process.

Ø  Only routers in ** multi-access networks*** (Ethernet, Frame Relay) elect a DR/BDR.

Ø  Point-to-point links (like PPP) don’t need DR/BDR.

 

 

·        What are the Election Rules?

Ø  OSPF Priority (0-255)

Ø  Default - ***1***

Ø  If OSPF priority is 0, it means the router is ineligible to be elected

Ø  If the priorities are equal, the router with the highest RID wins

Ø  Router ID is chosen from—manually configured RID, the highest loopback IP, highest active physical IP.

 

 

·        The surprising Truth: Elections are non-preemptive.

Ø  Once elected, the DR/BDR OSPF routers stay in power unless they fail.

Ø  A new router with a higher priority won't take over the current DR BDR. Unless the current DR/BDR fails.

 

·        Common DR/BDR configuration mistakes.

Ø  Ignoring priority setting > if all routers have default priority 1, the highest router ID wins, which may not be optimal. FIX – manually set priorities on critical routers.

Ø  Adding a new high-priority router won’t change the DR unless the current one fails. FIX restart OSPF on the interface if needed.

Ø  If router IDs are unstable, for example, if they're based on a physical interface, DR election can be unpredictable. FIX always set a STATIC router ID in OSPF configuration.

 

·        Best practice for DR/BDR optimization.

Ø  Set priority 100 on the routers you want as DR/BDR, and set priority 0 on routers that should never become DR.

Ø  Avoid DR on low power routers- the DR does extra work, do not make a weak router the DR.

Ø  Use the loopback interface for router-ID.

 

 Let's see the configuration=>https://www.youtube.com/@internetworkss

Topology:-


  • Configure the topology as per the diagram
  • Configure the IP addresses as per the topology 
  • Configure OSPF 1 and advertise directly connected interfaces 
  • Configure router 1 DR, router 2, and router 3 Drothers 
  • Configure Router 4 as backup DR
  • VERIFY THE CONFIGURATIONS.



R1(config)#interface fastethernet 0/0
R1(config-if)#ip address 192.168.10.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface loopback 1
R1(config-if)#ip address 10.1.1.1 255.255.255.0
R1(config-if)#exit

R2(config)#interface fastethernet 0/0
R2(config-if)#ip address 192.168.10.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface loopback 1
R2(config-if)#ip address 10.1.1.2 255.255.255.0
R2(config-if)#exit

R3(config)#interface fastethernet 0/0
R3(config-if)#ip address 192.168.10.3 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#interface loopback 1
R3(config-if)#ip address 10.1.1.3 255.255.255.0
R3(config-if)#exit


R4(config)#interface fastethernet 0/0
R4(config-if)#ip address 192.168.10.4 255.255.255.0
R4(config-if)#no shutdown
R4(config-if)#exit
R4(config)#interface loopback 1
R4(config-if)#ip address 10.1.1.4 255.255.255.0
R4(config-if)#exit


R1(config)#router ospf 1
R1(config-router)#router-id 192.168.1.1
R1(config-router)#network 192.168.1.0 255.0.0.0 area 0
R1(config-router)#network 10.1.1.0 255.0.0.0 area 0
R1(config-router)#exit

R2(config)#router ospf 1
R2(config-router)#router-id 192.168.1.2
R2(config-router)#network 192.168.1.0 255.0.0.0 area 0
R2(config-router)#network 10.1.1.0 255.0.0.0 area 0
R2(config-router)#exit

R3(config)#router ospf 1
R3(config-router)#router-id 192.168.1.3
R3(config-router)#network 192.168.1.0 255.0.0.0 area 0
R3(config-router)#network 10.1.1.0 255.0.0.0 area 0
R3(config-router)#exit


R4(config)#router ospf 1
R4(config-router)#router-id 192.168.1.4
R4(config-router)#network 192.168.1.0 255.0.0.0 area 0
R4(config-router)#network 10.1.1.0 255.0.0.0 area 0
R4(config-router)#exit


R1(config)#do ping 10.1.1.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 40/44/48 ms
R1(config)#do ping 10.1.1.3

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 36/42/48 ms
R1(config)#do ping 10.1.1.4

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 24/40/48 ms


 R1#show ip ospf interface fastethernet 0/0
FastEthernet0/0 is up, line protocol is up
  Internet Address 192.168.10.1/24, Area 0
  Process ID 1, Router ID 192.168.1.1, Network Type BROADCAST, Cost: 1
  Transmit Delay is 1 sec, State DROTHER, Priority 1
  Designated Router (ID) 192.168.1.4, Interface address 192.168.10.4
  Backup Designated router (ID) 192.168.1.3, Interface address 192.168.10.3
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:03
  Supports Link-local Signaling (LLS)
  Index 1/1, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 0, maximum is 1
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 3, Adjacent neighbor count is 2
    Adjacent with neighbor 192.168.1.3  (Backup Designated Router)
    Adjacent with neighbor 192.168.1.4  (Designated Router)

  Suppress hello for 0 neighbor(s)

(In the above output, you see that router 1 is DROTHER and router 3 is BDR, and router 4 is DR. Let's change these to as per our topology.)

R1(config)#interface fastethernet 0/0
R1(config-if)#ip ospf priority ?
  <0-255>  Priority
R1(config-if)#ip ospf priority 200
R1(config-if)#end

R1#clear ip ospf process
Reset ALL OSPF processes? [no]: y

*Jul 27 15:48:25.023: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.1.2 on FastEthernet0/0 from 2WAY to DOWN, Neighbor Down: Interface down or detached
*Jul 27 15:48:25.023: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.1.3 on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached
*Jul 27 15:48:25.023: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.1.4 on FastEthern0/0 from FULL to DOWN, Neighbor Down: Interface down or detached
*Jul 27 15:48:25.275: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.1.3 on FastEthernet 0/0 from LOADING to FULL, Loading Done
*Jul 27 15:48:25.275: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.1.4 on FastEthernet 0/0 from LOADING to FULL, Loading Done

R2(config)#interface fastEthernet 0/0
R2(config-if)#ip ospf priority 0
R2(config-if)#exit
R2(config)#exit
R2#clear ip ospf process
Reset ALL OSPF processes? [no]: y

R3(config)#interface fastEthernet 0/0
R3(config-if)#ip ospf pri
R3(config-if)#ip ospf priority 0
R3(config-if)#exit
R3(config)#do clear ip ospf process
Reset ALL OSPF processes? [no]: y

R4(config)#interface fastEthernet 0/0
R4(config-if)#ip ospf priority 150
R4(config-if)#exit
R4(config)#exit
R4#clear ip ospf process
Reset ALL OSPF processes? [no]: y

R1#show ip ospf interface fastEthernet 0/0
FastEthernet0/0 is up, line protocol is up
  Internet Address 192.168.10.1/24, Area 0
  Process ID 1, Router ID 192.168.1.1, Network Type BROADCAST, Cost: 1
  Transmit Delay is 1 sec, State DR, Priority 200
  Designated Router (ID) 192.168.1.1, Interface address 192.168.10.1
  Backup Designated router (ID) 192.168.1.4, Interface address 192.168.10.4
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:09
  Supports Link-local Signaling (LLS)
  Index 1/1, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 3
  Last flood scan time is 0 msec, maximum is 4 msec
  Neighbor Count is 3, Adjacent neighbor count is 3
    Adjacent with neighbor 192.168.1.2
    Adjacent with neighbor 192.168.1.3
    Adjacent with neighbor 192.168.1.4  (Backup Designated Router)
  Suppress hello for 0 neighbor(s)

(I hope you like this blog.... please visit our YouTube channel https://www.youtube.com/@internetworkss

No comments:

OSPF DR and BDR Explained: The Hidden Heroes of Network Efficiency.

In the world of networking, OSPF (Open Shortest Path First ) is one of the most widely used dynamic routing protocols. But did you know tha...