What is OSPF Priority – Exclusive Explanation
Each broadcast and Non-Broadcast Multi-Access (NBMA) network has a designated router. This router is the central point for collecting and distributing LSAs, so it must have enough CPU and memory capability to handle the workload. Configurations can be used to control the DR/BDR election process.
The designated router decreases routing protocol traffic by enabling a decrease in the number of adjacencies required on a broadcast or non-broadcast multi-access (NBMA) network.
Two routers connected to a multi-access network attempt to become the designated router. The router with the highest OSPF priority becomes the designated router. Suppose the interface priorities are the same on all routers. In that case, the router with the highest router ID is elected the DR. We can manually configure the router ID to manipulate the DR/BDR election.
Another way to manipulate the DR/BDR election process is the configuration of interface priorities. It is an interface-specific value that provides better control on a multiaccess network. This also allows a router to be the DR in one network and a DROTHER in others. The OSPF priority values are between 0 – 255. When the priority value is 0, the interface cannot become a DR or BDR. The router interface with a higher OSPF priority value becomes the DR and BDR. To manipulate the default priorities, use the following commands:
- ip ospf priority <value>– OSPFv2 Command
- ipv6 ospf priority <value>– OSPFv3 command
In Figure 1, all routers have the default OSPF priority. Therefore, the router ID decides the DR (R1) and BDR (R2). We can change the priority value on an interface from 1 to a higher value, which could change a specific router to become a DR or BDR during the next election. It is important to know that when OSPF is running and enabled, the administrator must shut down the OSPF process on all routers and then re-enable the OSPF process to force a new DR and BDR election.
Changing the OSPF Priority
In the topology in Figure 1, R1 is the DR, and R2 is the BDR. It has been decided that:
- R1 should never be a DR or BDR and will be configured with a priority of 0.
- R2 should be on the default priority value.
- R3 should be the DR and will be configured with a priority of 200.
- R4 should be the BDR and will be configured with the priority of 199.
Configuration on R1
R1>enable
R1#config terminal
R1(config)#interface gig 0/0
R1(config-if)#ip ospf priority 0
R1(config-if)#exit
R1(config)#exit
R1#clear ip ospf process
Configuration on R3
R3>enable
R3#config terminal
R3(config)#interface gig 0/0
R3(config-if)#ip ospf priority 200
R3(config-if)#exit
R3(config)#exit
R3#clear ip ospf process
Configuration on R4
R4>enable
R4#config terminal
R4(config)#interface gig 0/0
R4(config-if)#ip ospf priority 199
R4(config-if)#exit
R4(config)#exit
R4#clear ip ospf process
Also, clear the OSPF process on Router R2 and then check the output of the “show ip ospf interface” command. Figures 2 and 3 illustrate the output of this command for R3 (DR) and R4(BDR), even with small router IDs.