How to Configure OSPF DR and BDR (Manipulating OSPF DR & BDR Election)

Unlike point-to-point OSPF network, where OSPF routers exchange hello messages using the OSPF hello protocol to establish and maintain neighbor relationships, a multi-access network with three or more OSPF routers needs to elect an OSPF-designated router (DR) and a backup-designated router (BDR) in order to establish and maintain neighbor relationships.
The DR and BDR are elected to reduce the amount of OSPF traffic and adjacencies on the network by allowing OSPF DROTHER to form adjacencies only with the DR and BDR, rather than with every other router on the network segment.

Every router within a network participates in the election process to select a DR and a BDR. Once elected, these routers become the central points for routing information exchange. OSPF DROTHER communicate only with DR and BDR in other share routing updates. This helps to reduce routing update propagation across all routers within the network.

Routers send routing updates to the multicast address 224.0.0.6 to reach the DR or BDR. In turn, the DR shares routing updates to the multicast address 224.0.0.5. In the event of DR failure, the BDR takes up the job of the DR.
OSPF DROTHER establish full neighbor relationships with both the DR and BDR but establish a two-way neighbor relationship among themselves.

How OSPF Elect Designated Router(DR) & Backup Designated Router(BDR)

The sequencing for selecting DR/BDR in OSPF is as follows:

1 – Priority: The router with the highest priority becomes the DR or BDR in that subnet.
2 – Router ID: If the priorities are the same or no priority is specified, the router with the highest Router ID becomes the DR or BDR.
3 – Loopback: If priorities and Router IDs are identical and there are loopback interfaces, the DR/BDR is selected based on the highest IP address of the loopback interfaces.
4 – Highest IP: If priorities, Router IDs, and loopback addresses are all the same, the DR/BDR is selected based on the highest IP address among the interfaces.

Network Topology

The network topology we will be making use of in this post is shown below. As you can see, it consists of four routers. In this demonstration, we will be changing the router ID, priority value, and interface IP address to vary the router elected as DR or BDR.

Network topology for demonstrating DR and BDR configuration

How to Configure OSPF DR and BDR

Depending on the router you want to become the DR or BDR, there are different steps to configure a router to be elected as the DR or BDR in a network. The general rule is to increase either of the routers’ router ID, priority value, loopback address, and/or interface IP address. Here is a sample configuration with some notes on the intention of the configuration.

Step 1: Configure the Interface of the OSPF Routers

Router 1

R1(config)#interface ethernet0/0
R1(config-if)#ip address 192.168.12.1 255.255.255.0
R1(config-if)#no shutdown 
R1(config-if)#exit

Router 2

R2(config)#interface ethernet0/0
R2(config-if)#ip address 192.168.12.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit

Router 3

R3(config)#interface ethernet0/0
R3(config-if)#ip address 192.168.12.3 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exit

Router 4

R4(config)#interface ethernet0/0
R4(config-if)#ip address 192.168.12.4 255.255.255.0
R4(config-if)#no shutdown 
R4(config-if)#exit

 Step 2: Enable OSPF on the Routers & configure Router ID

Router 1

R1(config)#router ospf 1
R1(config-router)#router-id 1.1.1.1
R1(config-router)#network 192.168.12.0 0.0.0.255 area 0
R1(config-router)#exit

 Router 2

R2(config)#router ospf 1
R2(config-router)#router-id 2.2.2.2
R2(config-router)#network 192.168.12.0 0.0.0.255 area 0
R2(config-router)#exit

Router 3

R3(config)#router ospf 1
R3(config-router)#router-id 3.3.3.3
R3(config-router)#network 192.168.12.0 0.0.0.255 area 0
R3(config-router)#exit

Router 3

R4(config)#router ospf 1
R4(config-router)#router-id 4.4.4.4
R4(config-router)#network 192.168.12.0 0.0.0.255 area 0
R4(config-router)#exit

Router 4

R4(config)#router ospf 1
R4(config-router)#router-id 4.4.4.4
R4(config-router)#network 192.168.12.0 0.0.0.255 area 0
R4(config-router)#exit

Step 3: Check the Routers that is Elected as DR & BDR

R1#show ip ospf neighbor 

Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           1   2WAY/DROTHER    00:00:39    192.168.12.2    Ethernet0/0
3.3.3.3           1   FULL/BDR        00:00:33    192.168.12.3    Ethernet0/0<--(R3 becomes the BDR (Second highest Router ID))
4.4.4.4           1   FULL/DR         00:00:36    192.168.12.4    Ethernet0/0<--(R4 becomes DR (highest Router ID))

Step 4: Make R1 to be the DR & R2 to be the BDR

R1(config)#router ospf 1
R1(config-router)#router-id 11.11.11.11
R1(config-router)#exit

R2(config)#router ospf 1
R2(config-router)#router-id 9.9.9.9
R2(config-router)#exit

R1#clear ip ospf process  <-- Clear OSPF Process on R1 or turn off/on R1 again.
Reset ALL OSPF processes? [no]: y

R2#clear ip ospf process <-- Clear OSPF Process on R2 or turn off/on R2 again.
Reset ALL OSPF processes? [no]: y

R3#clear ip ospf process <-- Clear OSPF Process on R3 or turn off/on R3 again.
Reset ALL OSPF processes? [no]: y

R4#clear ip ospf process <-- Clear OSPF Process on R4 or turn off/on R4 again.
Reset ALL OSPF processes? [no]: y

Then Confirm that R1 is Elected as DR & R2 Elected as BDR

R3#show ip ospf neighbor 

Neighbor ID     Pri   State           Dead Time   Address         Interface
4.4.4.4           1   2WAY/DROTHER    00:00:33    192.168.12.4    Ethernet0/0
9.9.9.9           1   FULL/BDR        00:00:37    192.168.12.2    Ethernet0/0<--(R2 becomes the BDR (second highest Router ID)
11.11.11.11       1   FULL/DR         00:00:36    192.168.12.1    Ethernet0/0<--(R1 becomes DR (has the highest Router ID)

 

Step 5: Make R3 the DR (Don’t Change the Router ID)

This can be achieved by changing the priority value of R3. The default priority value of every OSPF router is 1. Let’s increase that of R3.

R3(config)#interface ethernet0/0
R3(config-if)#ip ospf priority 2
R3(config-if)#exit

R1#clear ip ospf process <-- Clear OSPF Process on R1 or turn off/on R1 again.
Reset ALL OSPF processes? [no]: y

R2#clear ip ospf process <-- Clear OSPF Process on R2 or turn off/on R2 again.
Reset ALL OSPF processes? [no]: y

R3#clear ip ospf process <-- Clear OSPF Process on R3 or turn off/on R3 again.
Reset ALL OSPF processes? [no]: y

R4#clear ip ospf process <-- Clear OSPF Process on R4 or turn off/on R4 again.
Reset ALL OSPF processes? [no]: y

So, Let’s now confirm it

R4#show ip ospf neighbor 

Neighbor ID     Pri   State           Dead Time   Address         Interface
3.3.3.3           2   FULL/DR         00:00:39    192.168.12.3    Ethernet0/0<--(R3 takes over as DR (highest Priority value))
9.9.9.9           1   2WAY/DROTHER    00:00:30    192.168.12.2    Ethernet0/0
11.11.11.11       1   FULL/BDR        00:00:30    192.168.12.1    Ethernet0/0 <--(R1 becomes the BDR (highest Router ID))

Step 6: Make R2 the DR (other routers should not involve in elections for DR/BDR)

By default, the priority value of any OSPF router is 1. This can be checked by using “show ip ospf interface ethernet0/0.” To make R2 the DR and other routers not involved in the election for DR/BDR. We need to change the priority value of every other router to 0.

R1(config)#interface ethernet0/0
R1(config-if)#ip ospf priority 0
R1(config-if)#exit

R3(config)#interface ethernet0/0
R3(config-if)#ip ospf priority 0
R3(config-if)#exit

R4(config)#inter ethernet0/0
R4(config-if)#ip ospf priority 0
R4(config-if)#exit

Then lets confirm the configuration.

R1#show ip ospf neighbor 

Neighbor ID     Pri   State           Dead Time   Address         Interface
3.3.3.3           0   2WAY/DROTHER    00:00:36    192.168.12.3    Ethernet0/0 <-- R3 don't enter into the elections for DR/BDR
4.4.4.4           0   2WAY/DROTHER    00:00:35    192.168.12.4    Ethernet0/0 <-- R4 don't enter into the elections for DR/BDR
9.9.9.9           1   FULL/DR         00:00:37    192.168.12.2    Ethernet0/0<-- R2 becomes the DR

R2#show ip ospf neighbor 

Neighbor ID     Pri   State           Dead Time   Address         Interface
3.3.3.3           0   FULL/DROTHER    00:00:34    192.168.12.3    Ethernet0/0<-- R3 don't enter into the elections for DR/BDR
4.4.4.4           0   FULL/DROTHER    00:00:38    192.168.12.4    Ethernet0/0 <-- R4 don't enter into the elections for DR/BDR
11.11.11.11       0   FULL/DROTHER    00:00:37    192.168.12.1    Ethernet0/0 <-- R1 don't enter into the elections for DR/BDR

R3#show ip ospf neighbor 

Neighbor ID     Pri   State           Dead Time   Address         Interface
4.4.4.4           0   2WAY/DROTHER    00:00:30    192.168.12.4    Ethernet0/0<-- R4 don't enter into the elections for DR/BDR
9.9.9.9           1   FULL/DR         00:00:34    192.168.12.2    Ethernet0/0<-- R2 becomes the DR
11.11.11.11       0   2WAY/DROTHER    00:00:38    192.168.12.1    Ethernet0/0 <-- R1 don't enter into the elections for DR/BDR

R4#show ip ospf neighbor 

Neighbor ID     Pri   State           Dead Time   Address         Interface
3.3.3.3           0   2WAY/DROTHER    00:00:39    192.168.12.3    Ethernet0/0<-- R3 don't enter into the elections for DR/BDR
9.9.9.9           1   FULL/DR         00:00:39    192.168.12.2    Ethernet0/0<-- R2 becomes the DR
11.11.11.11       0   2WAY/DROTHER    00:00:34    192.168.12.1    Ethernet0/0 <-- R1 don't enter into the elections for DR/BDR

That’s all for this post. If you have any questions, you can drop them in the comment section below.

Related Content;

  1. How to Configure OSPF Default Route on a Cisco Router
  2. Configuring OSPF Hello Timer
  3. How to Configure OSPF Passive Interface on Cisco Router
  4. How to Configure OSPF Backbone Area | How to Configure OSPF Area 0
  5. How to Configure OSPF Multi-Area
  6. How To Configure OSPF on Layer 3 Switch In Packet Tracer
  7. Redistributing Static Routes into OSPF: Explained With Example

Reference: https://github.com/misterkrittin/CCNA-Labs

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top