OcNOS-SP : Layer 3 Guide : Layer 3 Unicast Configuration Guide : OSPFv2 : Set Priority
Set Priority
This example shows how to set the priority for an interface. Set a high priority for a router to make it the Designated Router (DR). Router R3 is configured to have a priority of 10, which is higher than the default priority (1) of R1 and R2; making it the DR.
Topology
Figure 8-65: Set OSPF Priority
R3
 
#configure terminal
Enter configure mode
(config)#interface eth2
Enter interface mode.
(config-if)#ip ospf priority 10
Specify the router priority to a higher priority (10) to make R3 the Designated Router (DR).
(config-if)#exit
Exit interface mode.
(config)#router ospf 100
Configure the routing process, and specify the Process ID (100). The Process ID should be a unique positive integer identifying the routing process.
(config-router)#network 10.10.10.0/24 area 0
Define the interface (10.10.10.0/24) on which OSPF runs, and associate the area ID (0) with the interface.
(config-router)#commit
Commit the candidate configuration to the running configuration.
R1
 
#configure terminal
Enter configure mode
(config)#router ospf 100
Configure the routing process, and specify the Process ID (100). The Process ID should be a unique positive integer identifying the routing process.
(config-router)#network 10.10.10.0/24 area 0
Define the interface (10.10.10.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area).
(config-router)#commit
Commit the candidate configuration to the running configuration.
R2
 
#configure terminal
Enter configure mode
(config)#router ospf 200
Configure the routing process, and specify the Process ID (200). The Process ID should be a unique positive integer identifying the routing process.
(config-router)#network 10.10.10.0/24 area 0
Define the interface (10.10.10.0/24) on which OSPF runs, and associate the area ID (0) with the interface.
(config-router)#commit
Commit the candidate configuration to the running configuration.
Validation
R1
#sh ip ospf neighbor
 
Total number of full neighbors: 2
OSPF process 100 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
10.12.26.89 1 Full/DROther 00:00:39 10.10.10.11 eth2 0
10.12.26.90 10 Full/DR 00:00:32 10.10.10.13 eth2 0
 
#sh ip ospf interface
eth2 is up, line protocol is up
Internet Address 10.10.10.10/24, Area 0.0.0.0, MTU 1500
Process ID 100, VRF (default), Router ID 10.12.26.88, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State Backup, Priority 1, TE Metric 1
Designated Router (ID) 10.12.26.90, Interface Address 10.10.10.13
Backup Designated Router (ID) 10.12.26.88, Interface Address 10.10.10.10
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:10
Neighbor Count is 2, Adjacent neighbor count is 2
Suppress hello for 0 neighbor(s)
Hello received 30 sent 19, DD received 6 sent 8
LS-Req received 2 sent 2, LS-Upd received 16 sent 6
LS-Ack received 8 sent 7, Discarded 0
No authentication
 
#sh running-config
!
no service password-encryption
!
hostname rtr1
!
logging monitor 7
!
ip vrf management
!
ip domain-lookup
!
ip pim register-rp-reachability
!
interface lo
mtu 65536
ip address 127.0.0.1/8
ipv6 address ::1/128
!
interface eth0
ip address 10.12.26.88/24
!
interface eth1
!
interface eth2
ip address 10.10.10.10/24
!
interface eth3
!
interface eth4
!
interface eth5
!
interface eth6
!
interface eth7
!
router ospf 100
network 10.10.10.0/24 area 0.0.0.0
!
line con 0
login
line vty 0 39
login
!
end
R2
#show running-config
!
no service password-encryption
!
hostname R2
!
logging monitor 7
!
ip vrf management
!
ip domain-lookup
!
ip pim register-rp-reachability
!
interface lo
mtu 65536
ip address 127.0.0.1/8
ipv6 address ::1/128
!
interface eth0
ip address 10.12.26.89/24
!
interface eth1
!
interface eth2
ip address 10.10.10.11/24
!
interface eth3
!
interface eth4
!
interface eth5
!
interface eth6
!
router ospf 200
network 10.10.10.0/24 area 0.0.0.0
!
line con 0
login
line vty 0 39
login
!
end
 
#show ip ospf neighbor
 
Total number of full neighbors: 2
OSPF process 200 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
10.12.26.88 1 Full/Backup 00:00:30 10.10.10.10 eth2 0
10.12.26.90 10 Full/DR 00:00:31 10.10.10.13 eth2 0
R2#
 
R2#show ip ospf interface
eth2 is up, line protocol is up
Internet Address 10.10.10.11/24, Area 0.0.0.0, MTU 1500
Process ID 200, VRF (default), Router ID 10.12.26.89, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DROther, Priority 1, TE Metric 1
Designated Router (ID) 10.12.26.90, Interface Address 10.10.10.13
Backup Designated Router (ID) 10.12.26.88, Interface Address 10.10.10.10
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:08
Neighbor Count is 2, Adjacent neighbor count is 2
Suppress hello for 0 neighbor(s)
Hello received 71 sent 36, DD received 7 sent 7
LS-Req received 2 sent 2, LS-Upd received 9 sent 4
LS-Ack received 3 sent 4, Discarded 1
No authentication
R3
#show running-config
!
no service password-encryption
!
hostname R3
!
logging monitor 7
!
ip vrf management
!
ip domain-lookup
spanning-tree mode provider-rstp
data-center-bridging enable
ethernet cfm enable
!
interface lo
mtu 65536
ip address 127.0.0.1/8
ipv6 address ::1/128
!
interface eth0
ip address 10.12.26.90/24
!
interface eth1
!
interface eth2
ip address 10.10.10.13/24
ip ospf priority 10
!
interface eth3
!
interface eth4
!
interface eth5
!
interface eth6
!
router ospf 100
network 10.10.10.0/24 area 0.0.0.0
!
line con 0
login
line vty 0 39
login
!
end
 
#show ip ospf neighbor
 
Total number of full neighbors: 2
OSPF process 100 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
10.12.26.88 1 Full/Backup 00:00:33 10.10.10.10 eth2 0
10.12.26.89 1 Full/DROther 00:00:30 10.10.10.11 eth2 0
 
 
#show ip ospf interface
eth2 is up, line protocol is up
Internet Address 10.10.10.13/24, Area 0.0.0.0, MTU 1500
Process ID 100, VRF (default), Router ID 10.12.26.90, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DR, Priority 10, TE Metric 1
Designated Router (ID) 10.12.26.90, Interface Address 10.10.10.13
Backup Designated Router (ID) 10.12.26.88, Interface Address 10.10.10.10
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:05
Neighbor Count is 2, Adjacent neighbor count is 2
Suppress hello for 0 neighbor(s)
Hello received 99 sent 60, DD received 8 sent 6
LS-Req received 2 sent 2, LS-Upd received 9 sent 12
LS-Ack received 9 sent 6, Discarded 1
No authentication
Last modified date: 10/16/2023