Configuring OSPF router priority

Router priority is configured to make a specific router the DR/BDR on a multi-access network such as Ethernet. To configure the router priority, enter the following command in interface configuration mode.

Configuring OSPF router priority

(config)#interface <interface-name>
(config-if)#ip ospf priority <priority>

<interface-name> : interface-name
<priority> : priority.0~255

On Cisco, the router priority value defaults to 1. 0 is a special value that means it will not be DR/BDR. Configure the router you want to be the DR with the highest value and the router you want to be the BDR with the second highest value.

However, configuring the priority does not immediately change the DR/BDR. If there is an existing DR, it will not change even if a router with a higher priority is added later. After configuring the priority, clear the OSPF process once on the router that is the current DR/BDR.

Clear OSPF process

#clear ip ospf process

Verifying OSPF router priority

To verify the router priority, the following show command is easy to understand.

  • show ip ospf neighbor
  • show ip ospf interface

show ip ospf neighbor

You can use the show ip ospf neighbor command to verify the router priority of the neighbor.

R1#show ip ospf neighbor
 
Neighbor ID     Pri   State           Dead Time   Address         Interface
192.168.12.2      1   FULL/DR         00:00:32    192.168.12.2    Ethernet0/0
192.168.13.3      0   FULL/  -        00:00:31    192.168.13.3    Serial1/0

show ip ospf neighborコマンドでは、コマンドを実行しているルータ自身のプライオリティはわかりません。

show ip ospf interface

The show ip ospf interface command will show you the details of OSPF enabled interfaces. You can verify the router priority value and the router that is the current DR/BDR.

R1#show ip ospf interface ethernet0/0
Ethernet0/0 is up, line protocol is up
  Internet Address 192.168.12.1/24, Area 0
  Process ID 1, Router ID 192.168.13.1, Network Type BROADCAST, Cost: 10
  Transmit Delay is 1 sec, State BDR, Priority 1
  Designated Router (ID) 192.168.12.2, Interface address 192.168.12.2
  Backup Designated router (ID) 192.168.13.1, Interface address 192.168.12.1
  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 1, Adjacent neighbor count is 1
    Adjacent with neighbor 192.168.12.2  (Designated Router)
  Suppress hello for 0 neighbor(s)

How the OSPF works