OSPF is a routing protocol that is popular because of the compatibility between vendors, compared to EIGRP being a Cisco proprietary routing protocol. One major component of OSPF is the usa of designated (DR) and backup designated routers (BDR), selected through the OSPF DR election process. In summary, these routers are central to the OSPF area or areas of routing devices. The devices that are neither the DR or BDR are referred to as DROTHERS. The way the operation of OSPF works is that the DR and BDR listen for routing updates from the DROTHERS through multicast communication. When these updates are received, they are responsible for the flooding of the updates to all of the other DROTHERS.
For one reason or another whether you are in a production environment or in a lab scenario, you may want to control which devices are the DR and BDR. There are two things that you can use to influence and control the OSPF DR election process:
- OSPF Device Priority
- OSPF Device Router-ID
OSPF Device Priority
Through the use of device interface priority within OSPF, you can influence which device becomes the OSPF DR or BDR. The priority values range from 0-255 with 0 meaning the device would not participate in the election process. Default priority values are 1. Within the network, changing the interface OSPF priority values facing the OSPF area is what would need to be done:
interface e0/0 ip ospf priority 255
This would set that interface to the maximum value of 255, which would make it the DR as long as no other devices also had 255 as their priority. Common practice is to set the priority to 255 for the device you want to be DR, and 254 for the device you want to be BDR with all other devices left at the default of 1.
OSPF Device Router-ID
Say you have a network with all devices running the default value of 1 for OSPF priority. The router ID is then used to determine the DR and BDR. Nothing complicated about this, the highest OSPF router-id wins.
In the lab shown above, I have 4 routers. R1 has an OSPF priority of 255 and R2 has a priority of 254. A simple “show ip ospf neighbor” can show you the DR and BDR. This is how it looks from R4’s view of the network:
R4#sh ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 10.1.0.1 255 FULL/DR 00:00:36 10.1.0.1 Ethernet0/0 10.1.0.2 254 FULL/BDR 00:00:38 10.1.0.2 Ethernet0/0 10.1.0.3 1 2WAY/DROTHER 00:00:33 10.1.0.3 Ethernet0/0 R4#
And there you have it. Keep these simple methods and terms in mind next time you are configuring and planning an OSPF network. Questions? Leave them below!