OcNOS-RON : Layer 3 Guide : Layer 3 Unicast Configuration Guide : OSPFv2
OSPFv2
This chapter contains basic OSPFv2 (Open Shortest Path First) configuration examples.
Enable OSPF on an Interface
The diagram shows the minimum configuration required to enable OSPF on an interface. R1 and R2 are two routers in Area 0 connecting to network 10.10.10.0/24.
Note: Configure one interface so that it belongs to only one area. It is possible, however, to configure different interfaces on a router to belong to different areas.
Topology
Basic OSPF Topology
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).
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.
Validation
R1
#show ip ospf
Routing Process "ospf 100" with ID 10.12.26.88
Process uptime is 1 minute
Process bound to VRF default
Conforms to RFC2328, and RFC1583 Compatibility flag is disabled
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Graceful Restart
SPF schedule delay initial 0 secs 500 msecs
SPF schedule delay min 0 secs 500 msecs
SPF schedule delay max 50 secs 0 msecs
Refresh timer 10 secs
Number of incomming current DD exchange neighbors 0/64
Number of outgoing current DD exchange neighbors 0/64
Initial LSA throttle delay 0 secs 0 msecs
Minimum hold time for LSA throttle 5 secs 0 msecs
Maximum wait time for LSA throttle 5 secs 0 msecs
Minimum LSA arrival 1 secs 0 msecs
Number of external LSA 0. Checksum 0x000000
Number of opaque AS LSA 0. Checksum 0x000000
Number of non-default external LSA 0
External LSA database is unlimited.
Number of LSA originated 4
Number of LSA received 4
Number of areas attached to this router: 1
Area 0.0.0.0 (BACKBONE)
Number of interfaces in this area is 1(1)
Number of fully adjacent neighbors in this area is 1
Area has no authentication
SPF algorithm last executed 00:00:08.102 ago
SPF algorithm executed 3 times
Number of LSA 7. Checksum 0x0312b5
Dste Staus: Disabled
 
#show 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 DR, Priority 1, TE Metric 1
Designated Router (ID) 10.12.26.88, Interface Address 10.10.10.10
Backup Designated Router (ID) 10.12.26.89, Interface Address 10.10.10.11
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:11
Neighbor Count is 1, Adjacent neighbor count is 1
Suppress hello for 0 neighbor(s)
Hello received 13 sent 19, DD received 3 sent 4
LS-Req received 1 sent 1, LS-Upd received 3 sent 5
LS-Ack received 3 sent 3, Discarded 0
No authentication
 
 
#show ip ospf neighbor
 
Total number of full neighbors: 1
OSPF process 100 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
10.12.26.89 1 Full/Backup 00:00:39 10.10.10.11 eth2 0
 
 
#show ip ospf route
 
OSPF process 100:
Codes: C - connected, D - Discard, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
 
C 10.10.10.0/24 [1] is directly connected, eth2, Area 0.0.0.0
R2
#show ip ospf
Routing Process "ospf 200" with ID 10.12.26.89
Process uptime is 1 minute
Process bound to VRF default
Conforms to RFC2328, and RFC1583 Compatibility flag is disabled
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Graceful Restart
SPF schedule delay initial 0 secs 500 msecs
SPF schedule delay min 0 secs 500 msecs
SPF schedule delay max 50 secs 0 msecs
Refresh timer 10 secs
Number of incomming current DD exchange neighbors 0/64
Number of outgoing current DD exchange neighbors 0/64
Initial LSA throttle delay 0 secs 0 msecs
Minimum hold time for LSA throttle 5 secs 0 msecs
Maximum wait time for LSA throttle 5 secs 0 msecs
Minimum LSA arrival 1 secs 0 msecs
Number of external LSA 0. Checksum 0x000000
Number of opaque AS LSA 0. Checksum 0x000000
Number of non-default external LSA 0
External LSA database is unlimited.
Number of LSA originated 3
Number of LSA received 5
Number of areas attached to this router: 1
Area 0.0.0.0 (BACKBONE)
Number of interfaces in this area is 1(1)
Number of fully adjacent neighbors in this area is 1
Area has no authentication
SPF algorithm last executed 00:00:45.638 ago
SPF algorithm executed 4 times
Number of LSA 7. Checksum 0x0312b5
Dste Staus: Disabled
 
#show ip ospf interface
eth1 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 Backup, Priority 1, TE Metric 1
Designated Router (ID) 10.12.26.88, Interface Address 10.10.10.10
Backup Designated Router (ID) 10.12.26.89, Interface Address 10.10.10.11
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:06
Neighbor Count is 1, Adjacent neighbor count is 1
Suppress hello for 0 neighbor(s)
Hello received 30 sent 31, DD received 4 sent 3
LS-Req received 1 sent 1, LS-Upd received 5 sent 3
LS-Ack received 2 sent 3, Discarded 0
No authentication
 
 
#show ip ospf neighbor
 
Total number of full neighbors: 1
OSPF process 200 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
10.12.26.88 1 Full/DR 00:00:33 10.10.10.10 eth1 0
 
#show ip ospf route
 
OSPF process 200:
Codes: C - connected, D - Discard, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
 
C 10.10.10.0/24 [1] is directly connected, eth1, Area 0.0.0.0
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
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.
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).
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.
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
cspf disable-better-protection
!
line con 0
login
line vty 0 39
login
!
end
R2
#sh 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
cspf disable-better-protection
!
line con 0
login
line vty 0 39
login
!
end
 
#sh 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#sh 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
#sh running-config
!
no service password-encryption
!
hostname R3
!
logging monitor 7
!
ip vrf management
!
ip domain-lookup
spanning-tree mode provider-rstp
 
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
cspf disable-better-protection
!
line con 0
login
line vty 0 39
login
!
end
 
#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.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
 
 
#sh 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
Area Border Router
This example shows configuration for an Area Border Router. R2 is an Area Border Router (ABR). On R2, Interface eth0 is in Area 0, and Interface eth1 is in Area 1.
Topology
OSPF ABR Topology
Configuration
R2
 
#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.
(config-router)#network 10.10.10.0/24 area 0
Define one interface (10.10.10.0/24) on which OSPF runs, and associate the area ID (0) with the interface.
(config-router)#network 10.10.11.0/24 area 1
Define the other interface (10.10.11.0/24) on which OSPF runs, and associate the area ID (1) with the interface.
Validation
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
ip address 10.10.11.11/24
!
interface eth2
ip address 10.10.10.11/24
!
interface eth3
!
interface eth4
!
interface eth5
!
interface eth6
!
router ospf 100
network 10.10.10.0/24 area 0.0.0.0
network 10.10.11.0/24 area 0.0.0.1
cspf disable-better-protection
!
line con 0
login
line vty 0 39
login
!
end
 
#sh ip ospf
Routing Process "ospf 100" with ID 10.12.26.89
Process uptime is 4 minutes
Process bound to VRF default
Conforms to RFC2328, and RFC1583 Compatibility flag is disabled
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Graceful Restart
This router is an ABR, ABR Type is Alternative Cisco (RFC3509)
SPF schedule delay initial 0 secs 500 msecs
SPF schedule delay min 0 secs 500 msecs
SPF schedule delay max 50 secs 0 msecs
Refresh timer 10 secs
Number of incomming current DD exchange neighbors 0/64
Number of outgoing current DD exchange neighbors 0/64
Initial LSA throttle delay 0 secs 0 msecs
Minimum hold time for LSA throttle 5 secs 0 msecs
Maximum wait time for LSA throttle 5 secs 0 msecs
Minimum LSA arrival 1 secs 0 msecs
Number of external LSA 0. Checksum 0x000000
Number of opaque AS LSA 0. Checksum 0x000000
Number of non-default external LSA 0
External LSA database is unlimited.
Number of LSA originated 9
Number of LSA received 18
Number of areas attached to this router: 2
Area 0.0.0.0 (BACKBONE)
Number of interfaces in this area is 1(1)
Number of fully adjacent neighbors in this area is 2
Area has no authentication
SPF algorithm last executed 00:01:54.085 ago
SPF algorithm executed 7 times
Number of LSA 11. Checksum 0x0428ac
Area 0.0.0.1
Number of interfaces in this area is 1(1)
Number of fully adjacent neighbors in this area is 1
Number of fully adjacent virtual neighbors through this area is 0
Area has no authentication
SPF algorithm last executed 00:00:41.737 ago
SPF algorithm executed 3 times
Number of LSA 8. Checksum 0x043ce4
Dste Staus: Disabled
 
#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 100, VRF (default), Router ID 10.12.26.89, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DR, Priority 1, TE Metric 1
Designated Router (ID) 10.12.26.89, Interface Address 10.10.10.11
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:11
Neighbor Count is 2, Adjacent neighbor count is 2
Suppress hello for 0 neighbor(s)
Hello received 66 sent 38, DD received 11 sent 7
LS-Req received 2 sent 2, LS-Upd received 15 sent 14
LS-Ack received 14 sent 10, Discarded 0
No authentication
eth1 is up, line protocol is up
Internet Address 10.10.11.11/24, Area 0.0.0.1, MTU 1500
Process ID 100, VRF (default), Router ID 10.12.26.89, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State Backup, Priority 1, TE Metric 1
Designated Router (ID) 10.12.26.92, Interface Address 10.10.11.13
Backup Designated Router (ID) 10.12.26.89, Interface Address 10.10.11.11
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:03
Neighbor Count is 1, Adjacent neighbor count is 1
Suppress hello for 0 neighbor(s)
Hello received 22 sent 24, DD received 3 sent 9
LS-Req received 1 sent 1, LS-Upd received 4 sent 5
LS-Ack received 4 sent 3, Discarded 0
No authentication
 
#show ip ospf neighbor
 
Total number of full neighbors: 3
OSPF process 100 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
10.12.26.88 1 Full/Backup 00:00:34 10.10.10.10 eth2 0
10.12.26.90 1 Full/DROther 00:00:32 10.10.10.12 eth2 0
10.12.26.92 1 Full/DR 00:00:33 10.10.11.13 eth1 0
 
#show ip ospf database
 
OSPF Router with ID (10.12.26.89) (Process ID 100 VRF default)
 
Router Link States (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum Link count
10.12.26.88 10.12.26.88 365 0x80000005 0x10bc 1
10.12.26.89 10.12.26.89 312 0x80000006 0x0fb8 1
10.12.26.90 10.12.26.90 363 0x80000003 0x10b8 1
 
Net Link States (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum
10.10.10.11 10.12.26.89 364 0x80000002 0xe7fd
 
Summary Link States (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum Route
10.10.11.0 10.12.26.89 312 0x80000001 0x95fd 10.10.11.0/24
 
Area-Local Opaque-LSA (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum Opaque ID
1.0.0.1 10.12.26.88 363 0x80000003 0xa972 1
1.0.0.1 10.12.26.89 362 0x80000003 0xad6c 1
1.0.0.1 10.12.26.90 363 0x80000001 0xb564 1
1.0.0.10 10.12.26.88 363 0x80000003 0x0a32 10
1.0.0.10 10.12.26.89 362 0x80000002 0x2417 10
1.0.0.10 10.12.26.90 363 0x80000001 0x3efb 10
 
Router Link States (Area 0.0.0.1)
 
Link ID ADV Router Age Seq# CkSum Link count
10.12.26.89 10.12.26.89 245 0x80000004 0x3d88 1
10.12.26.92 10.12.26.92 241 0x80000004 0x2698 1
 
Net Link States (Area 0.0.0.1)
Link ID ADV Router Age Seq# CkSum
10.10.11.13 10.12.26.92 246 0x80000001 0x6ffb
 
Summary Link States (Area 0.0.0.1)
 
Link ID ADV Router Age Seq# CkSum Route
10.10.10.0 10.12.26.89 312 0x80000001 0xa0f3 10.10.10.0/24
 
Area-Local Opaque-LSA (Area 0.0.0.1)
 
Link ID ADV Router Age Seq# CkSum Opaque ID
1.0.0.1 10.12.26.89 243 0x80000001 0xb16a 1
1.0.0.1 10.12.26.92 244 0x80000001 0xbd58 1
1.0.0.8 10.12.26.89 234 0x80000002 0x96a2 8
1.0.0.8 10.12.26.92 244 0x80000001 0xc272 8
Redistribute Routes into OSPF
In this example, the configuration causes BGP routes to be imported into the OSPF routing table, and advertised as Type 5 External LSAs into Area 0.
Topology
Redistribute Routes
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 one 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)#redistribute bgp
Specify redistributing routes from other routing protocol (BGP) into OSPF.
Validation
#show ip ospf route
 
OSPF process 100:
Codes: C - connected, D - Discard, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
 
C 10.10.9.0/24 [1] is directly connected, eth2, Area 0.0.0.0
C 10.10.10.0/24 [1] is directly connected, eth3, Area 0.0.0.0
O 10.10.11.0/24 [101] via 10.10.10.11, eth3, Area 0.0.0.0
C 10.10.12.0/24 [1] is directly connected, eth1, Area 0.0.0.0
O 10.10.13.0/24 [102] via 10.10.10.11, eth3, Area 0.0.0.0
O 10.10.14.0/24 [102] via 10.10.10.11, eth3, Area 0.0.0.0
Cost
A route can be made the preferred route by changing its cost. In this example, cost has been configured to make R2 the next hop for R1.
The default cost for each interface is 1. Interface eth2 on R2 has a cost of 100, and Interface eth2 on R3 has a cost of 150. The total cost to reach 10.10.14.0/24 (R4) through R2 and R3 is computed as follows:
R2: 1+100 = 101
R3: 1+150 = 151
Therefore, R1 chooses R2 as its next hop to destination 10.10.14.0/24 because it has the lower cost.
Topology
Configure Cost Topology
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.9.0/24 area 0
(config-router)#network 10.10.10.0/24 area 0
(config-router)#network 10.10.12.0/24 area 0
Define interfaces on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area).
R2
 
(config)#interface eth2
Enter interface mode.
(config-if)#ip ospf cost 100
Set the OSPF cost of this link to 100.
(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
(config-router)#network 10.10.11.0/24 area 0
Define interfaces on which OSPF runs, and associate the area ID (0) with the interface.
 
R3
 
(config)#interface eth2
Enter interface mode.
(config-if)#ip ospf cost 150
Set the OSPF cost of this link to 100.
(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.12.0/24 area 0
(config-router)#network 10.10.13.0/24 area 0
Define interfaces on which OSPF runs, and associate the area ID (0) with the interface.
 
R4
 
(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.11.0/24 area 0
(config-router)#network 10.10.13.0/24 area 0
(config-router)#network 10.10.14.0/24 area 0
Define interfaces on which OSPF runs, and associate the area ID (0) with the interface.
Validation
R1
#show ip ospf route
 
OSPF process 100:
Codes: C - connected, D - Discard, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
 
C 10.10.9.0/24 [1] is directly connected, eth2, Area 0.0.0.0
C 10.10.10.0/24 [1] is directly connected, eth3, Area 0.0.0.0
O 10.10.11.0/24 [101] via 10.10.10.11, eth3, Area 0.0.0.0
C 10.10.12.0/24 [1] is directly connected, eth1, Area 0.0.0.0
O 10.10.13.0/24 [102] via 10.10.10.11, eth3, Area 0.0.0.0
O 10.10.14.0/24 [102] via 10.10.10.11, eth3, Area 0.0.0.0
 
#sh ip ospf interface
eth3 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 DR, Priority 1, TE Metric 1
Designated Router (ID) 10.12.26.88, Interface Address 10.10.10.10
Backup Designated Router (ID) 10.12.26.89, Interface Address 10.10.10.11
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:03
Neighbor Count is 1, Adjacent neighbor count is 1
Suppress hello for 0 neighbor(s)
Hello received 43 sent 69, DD received 3 sent 4
LS-Req received 1 sent 1, LS-Upd received 16 sent 18
LS-Ack received 10 sent 11, Discarded 0
No authentication
eth2 is up, line protocol is up
Internet Address 10.10.9.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 DR, Priority 1, TE Metric 1
Designated Router (ID) 10.12.26.88, Interface Address 10.10.9.10
No backup designated router on this network
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:02
Neighbor Count is 0, Adjacent neighbor count is 0
Suppress hello for 0 neighbor(s)
Hello received 0 sent 68, DD received 0 sent 0
LS-Req received 0 sent 0, LS-Upd received 0 sent 0
LS-Ack received 0 sent 0, Discarded 0
No authentication
eth1 is up, line protocol is up
Internet Address 10.10.12.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 DR, Priority 1, TE Metric 1
Designated Router (ID) 10.12.26.88, Interface Address 10.10.12.10
Backup Designated Router (ID) 10.12.26.90, Interface Address 10.10.12.11
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:01
Neighbor Count is 1, Adjacent neighbor count is 1
Suppress hello for 0 neighbor(s)
Hello received 29 sent 66, DD received 3 sent 4
LS-Req received 1 sent 1, LS-Upd received 10 sent 12
LS-Ack received 10 sent 9, Discarded 0
No authentication
R2
#sh ip ospf route
 
OSPF process 100:
Codes: C - connected, D - Discard, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
 
O 10.10.9.0/24 [2] via 10.10.10.10, eth1, Area 0.0.0.0
C 10.10.10.0/24 [1] is directly connected, eth1, Area 0.0.0.0
C 10.10.11.0/24 [100] is directly connected, eth2, Area 0.0.0.0
O 10.10.12.0/24 [2] via 10.10.10.10, eth1, Area 0.0.0.0
O 10.10.13.0/24 [101] via 10.10.11.11, eth2, Area 0.0.0.0
O 10.10.14.0/24 [101] via 10.10.11.11, eth2, Area 0.0.0.0
 
#sh ip ospf interface
eth2 is up, line protocol is up
Internet Address 10.10.11.10/24, Area 0.0.0.0, MTU 1500
Process ID 100, VRF (default), Router ID 10.12.26.89, Network Type BROADCAST, Cost: 100
Transmit Delay is 1 sec, State DR, Priority 1, TE Metric 100
Designated Router (ID) 10.12.26.89, Interface Address 10.10.11.10
Backup Designated Router (ID) 10.12.26.92, Interface Address 10.10.11.11
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:01
Neighbor Count is 1, Adjacent neighbor count is 1
Suppress hello for 0 neighbor(s)
Hello received 56 sent 77, DD received 3 sent 4
LS-Req received 1 sent 1, LS-Upd received 11 sent 7
LS-Ack received 4 sent 8, Discarded 0
No authentication
eth1 is up, line protocol is up
Internet Address 10.10.10.11/24, Area 0.0.0.0, MTU 1500
Process ID 100, VRF (default), Router ID 10.12.26.89, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State Backup, Priority 1, TE Metric 1
Designated Router (ID) 10.12.26.88, Interface Address 10.10.10.10
Backup Designated Router (ID) 10.12.26.89, Interface Address 10.10.10.11
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:07
Neighbor Count is 1, Adjacent neighbor count is 1
Suppress hello for 0 neighbor(s)
Hello received 74 sent 75, DD received 4 sent 3
LS-Req received 1 sent 1, LS-Upd received 18 sent 16
LS-Ack received 10 sent 12, Discarded 0
No authentication
 
R3
#sh ip ospf route
 
OSPF process 100:
Codes: C - connected, D - Discard, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
 
O 10.10.9.0/24 [2] via 10.10.12.10, eth1, Area 0.0.0.0
O 10.10.10.0/24 [2] via 10.10.12.10, eth1, Area 0.0.0.0
O 10.10.11.0/24 [102] via 10.10.12.10, eth1, Area 0.0.0.0
C 10.10.12.0/24 [1] is directly connected, eth1, Area 0.0.0.0
O 10.10.13.0/24 [103] via 10.10.12.10, eth1, Area 0.0.0.0
O 10.10.14.0/24 [103] via 10.10.12.10, eth1, Area 0.0.0.0
 
#sh ip ospf interface
eth2 is up, line protocol is up
Internet Address 10.10.13.10/24, Area 0.0.0.0, MTU 1500
Process ID 100, VRF (default), Router ID 10.12.26.90, Network Type BROADCAST, Cost: 150
Transmit Delay is 1 sec, State DR, Priority 1, TE Metric 150
Designated Router (ID) 10.12.26.90, Interface Address 10.10.13.10
Backup Designated Router (ID) 10.12.26.92, Interface Address 10.10.13.11
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:02
Neighbor Count is 1, Adjacent neighbor count is 1
Suppress hello for 0 neighbor(s)
Hello received 85 sent 94, DD received 3 sent 4
LS-Req received 0 sent 0, LS-Upd received 3 sent 4
LS-Ack received 3 sent 3, Discarded 0
No authentication
eth1 is up, line protocol is up
Internet Address 10.10.12.11/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 Backup, Priority 1, TE Metric 1
Designated Router (ID) 10.12.26.88, Interface Address 10.10.12.10
Backup Designated Router (ID) 10.12.26.90, Interface Address 10.10.12.11
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:01
Neighbor Count is 1, Adjacent neighbor count is 1
Suppress hello for 0 neighbor(s)
Hello received 92 sent 92, DD received 4 sent 3
LS-Req received 1 sent 1, LS-Upd received 12 sent 10
LS-Ack received 8 sent 10, Discarded 0
No authentication
 
R4
#sh ip ospf route
 
OSPF process 100:
Codes: C - connected, D - Discard, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
 
O 10.10.9.0/24 [3] via 10.10.11.10, eth3, Area 0.0.0.0
via 10.10.13.10, eth1, Area 0.0.0.0
O 10.10.10.0/24 [2] via 10.10.11.10, eth3, Area 0.0.0.0
C 10.10.11.0/24 [1] is directly connected, eth3, Area 0.0.0.0
O 10.10.12.0/24 [2] via 10.10.13.10, eth1, Area 0.0.0.0
C 10.10.13.0/24 [1] is directly connected, eth1, Area 0.0.0.0
C 10.10.14.0/24 [1] is directly connected, eth2, Area 0.0.0.0
 
#sh ip ospf interface
eth3 is up, line protocol is up
Internet Address 10.10.11.11/24, Area 0.0.0.0, MTU 1500
Process ID 100, VRF (default), Router ID 10.12.26.92, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State Backup, Priority 1, TE Metric 1
Designated Router (ID) 10.12.26.89, Interface Address 10.10.11.10
Backup Designated Router (ID) 10.12.26.92, Interface Address 10.10.11.11
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:04
Neighbor Count is 1, Adjacent neighbor count is 1
Suppress hello for 0 neighbor(s)
Hello received 95 sent 96, DD received 4 sent 3
LS-Req received 1 sent 1, LS-Upd received 7 sent 11
LS-Ack received 7 sent 5, Discarded 0
No authentication
eth2 is up, line protocol is up
Internet Address 10.10.14.10/24, Area 0.0.0.0, MTU 1500
Process ID 100, VRF (default), Router ID 10.12.26.92, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DR, Priority 1, TE Metric 1
Designated Router (ID) 10.12.26.92, Interface Address 10.10.14.10
No backup designated router on this network
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:10
Neighbor Count is 0, Adjacent neighbor count is 0
Suppress hello for 0 neighbor(s)
Hello received 0 sent 95, DD received 0 sent 0
LS-Req received 0 sent 0, LS-Upd received 0 sent 0
LS-Ack received 0 sent 0, Discarded 0
No authentication
eth1 is up, line protocol is up
Internet Address 10.10.13.11/24, Area 0.0.0.0, MTU 1500
Process ID 100, VRF (default), Router ID 10.12.26.92, 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.13.10
Backup Designated Router (ID) 10.12.26.92, Interface Address 10.10.13.11
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:00
Neighbor Count is 1, Adjacent neighbor count is 1
Suppress hello for 0 neighbor(s)
Hello received 92 sent 93, DD received 4 sent 3
LS-Req received 0 sent 0, LS-Upd received 4 sent 3
LS-Ack received 3 sent 3, Discarded 0
No authentication
Path MTU for IPv4 and IPv6
In IPv4, path MTU discovery enables a host to actively identify and adapt to variations in the MTU size across different links along a data path. In contrast, IPv6 adopts an approach where fragmentation is managed by the packet's source when the path MTU of a specific link along the data path cannot accommodate the packet's size. This approach, where IPv6 hosts handle packet fragmentation, conserves processing resources in IPv6 devices and enhances the overall efficiency of IPv6 networks.
Topology
Path MTU Topology
R1
 
OcNOS#configure terminal
Enter configuration mode.
OcNOS(config)#interface cd31/1
Entering in to interface
OcNOS(config-if)#mtu 1500
Configure mtu
OcNOS(config-if)#ip address 12.12.12.1/24
Configure ipv4 address
OcNOS(config-if)#ipv6 address 1001::1/64
Configure ipv6 address
OcNOS(config)#router ospf 1
Configure ip ospf
OcNOS(config-router)#ospf router-id 20.20.20.1
Configure router id under ospf
OcNOS(config-router)#network 12.12.12.0/24 area 0.0.0.0
Add network under ospf
OcNOS(config)#router ipv6 ospf 1
Configure ipv6 ospf
OcNOS(config-router)#router-id 1.1.1.1
Configure router id under ospf
OcNOS(config-router)#commit
Commit all the transactions
OcNOS(config)#exit
Exit
R2
 
OcNOS#configure terminal
Enter configuration mode.
OcNOS(config)#interface cd31/1
Entering in to interface
OcNOS(config-if)#mtu 1500
Configure mtu
OcNOS(config-if)#ip address 12.12.12.1/24
Configure ipv4 address
OcNOS(config-if)#ipv6 address 1001::1/64
Configure ipv6 address
OcNOS(config)#router ospf 1
Configure ip ospf
OcNOS(config-router)#ospf router-id 20.20.20.1
Configure router id under ospf
OcNOS(config-router)#network 12.12.12.0/24 area 0.0.0.0
Add network under ospf
OcNOS(config)#router ipv6 ospf 1
Configure ipv6 ospf
OcNOS(config-router)#router-id 1.1.1.1
Configure router id under ospf
OcNOS(config-router)#commit
Commit all the transactions
OcNOS(config)#exit
Exit
Validation
OcNOS#sh in
installers interface
OcNOS#sh interface cd31/1
Interface cd31/1
Flexport: Non Control Port (Active)
Hardware is ETH Current HW addr: e49d.7356.df24
Physical:e49d.7356.df24 Logical:(not set)
Forward Error Correction (FEC) configured is Auto (default)
FEC status is N/A
Port Mode is Router
Protected Mode is Promiscuous
Interface index: 10142
Metric 1 mtu 1700 duplex-full link-speed 10g
Debounce timer: disable
ARP ageing timeout 1500
<UP,BROADCAST,RUNNING,MULTICAST>
VRF Binding: Not bound
DHCP client is disabled.
Last Flapped: Never
Statistics last cleared: 2023 Apr 03 17:24:58 (18:36:43 ago)
inet6 fe80::e69d:73ff:fe56:df24/64
ND router advertisements are sent approximately every 411 seconds
ND next router advertisement due in 176 seconds.
ND router advertisements live for 1800 seconds
Hosts use stateless autoconfig for addresses.
5 minute input rate 3 bits/sec, 0 packets/sec
5 minute output rate 1 bits/sec, 0 packets/sec
RX
unicast packets 0 multicast packets 180 broadcast packets 0
input packets 180 bytes 15000
jumbo packets 0
undersize 0 oversize 0 CRC 0 fragments 0 jabbers 0
input error 0
input with dribble 0 input discard 0
Rx pause 0
TX
unicast packets 0 multicast packets 176 broadcast packets 0
output packets 176 bytes 14632
jumbo packets 0
output errors 0 collision 0 deferred 0 late collision 0
output discard 0
Tx pause 0
Virtual Links
Virtual links are used to connect a temporarily-disjointed non-backbone area to the backbone area, or to repair a non-contiguous backbone area. In this example, the ABR R3 has temporarily lost connection to Area 0, in turn, disconnecting Area 2 from the backbone area. The virtual link between ABR R1 and ABR R2 connects Area 2 to Area 0. Area 1 is used as a transit area.
Topology
Virtual Links Topology
R1
 
#configure terminal
Enter configure mode.
(config)#interface lo
Specify loopback as the interface you want to configure.
(config-if)#ip address 192.168.1.62/32
Configure the IP address on this interface.
(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)#ospf router-id 192.168.1.62
Configure the OSPF Router ID (192.168.1.62) for this router.
(config-router)#network 10.10.21.0/24 area 0
(config-router)#network 10.10.22.0/24 area 1
Define interfaces on which OSPF runs, and associate the area IDs (0 and 1) with the interface.
 
(config-router)#area 1 virtual-link 192.168.2.63
Configure a virtual link between this router R1 and R2 (Router ID 192.168.2.63) through transit area 1.
R2
 
(config)#interface lo
Specify loopback as the interface you want to configure.
(config-if)#ip address 192.168.2.63/32
Configure the IP address on this interface.
(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)#ospf router-id 192.168.2.63
Configure the OSPF Router ID (192.168.1.63) for this router.
(config-router)#network 10.10.23.0/24 area 1
(config-router)#network 10.10.24.0/24 area 2
(config-router)#network 192.168.2.63/32 area 2
Define interfaces on which OSPF runs, and associate the area IDs (1 and 2) with the interface.
 
(config-router)#area 1 virtual-link 192.168.1.62
Configure a virtual link between this router R2 and R1 (Router ID 192.168.2.62) through transit area 1.
Validation
R1#show ip ospf virtual-links
Virtual Link VLINK0 to router 2.2.2.2 is up
Transit area 0.0.0.1 via interface eth2
Hello suppression enabled
DoNotAge LSA allowed
Local address 13.13.13.1/32
Remote address 12.12.12.1/32
Transmit Delay is 1 sec, State Point-To-Point,
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:05
No authentication
Adjacency state Down
 
R2#show ip ospf virtual-links
Virtual Link VLINK0 to router 1.1.1.1 is up
Transit area 0.0.0.1 via interface eth1
Hello suppression enabled
DoNotAge LSA allowed
Local address 12.12.12.1/32
Remote address 13.13.13.1/32
Transmit Delay is 1 sec, State Point-To-Point,
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:05
No authentication
Adjacency state Init
 
R1#show ip ospf neighbor
 
Total number of full neighbors: 1
OSPF process 100 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
192.168.20.5 1 Full/DR 00:00:34 13.13.13.2 eth2 0
 
 
R2#show ip ospf neighbor
 
Total number of full neighbors: 1
OSPF process 100 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
192.168.20.5 1 Full/DR 00:00:36 12.12.12.2 eth1 0
1.1.1.1 1 Init/ - 00:00:32 13.13.13.1 VLINK0
R1#show ip ospf route
 
OSPF process 100:
Codes: C - connected, D - Discard, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
 
IA 2.2.2.2/32 [12] via 13.13.13.2, eth2, Area 0.0.0.1
O 12.12.12.0/24 [2] via 13.13.13.2, eth2, Area 0.0.0.1
C 13.13.13.0/24 [1] is directly connected, eth2, Area 0.0.0.1
 
R2#show ip ospf route
 
OSPF process 100:
Codes: C - connected, D - Discard, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
 
C 2.2.2.2/32 [10] is directly connected, lo, Area 0.0.0.2
C 12.12.12.0/24 [1] is directly connected, eth1, Area 0.0.0.1
O 13.13.13.0/24 [2] via 12.12.12.2, eth1, Area 0.0.0.1
 
R1#show ip ospf
Routing Process "ospf 100" with ID 1.1.1.1
Process uptime is 39 minutes
Process bound to VRF default
Conforms to RFC2328, and RFC1583 Compatibility flag is disabled
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Graceful Restart
This router is an ABR, ABR Type is Alternative Cisco (RFC3509)
SPF schedule delay initial 0 secs 500 msecs
SPF schedule delay min 0 secs 500 msecs
SPF schedule delay max 50 secs 0 msecs
Refresh timer 10 secs
Number of incoming current DD exchange neighbors 0/64
Number of outgoing current DD exchange neighbors 0/64
Initial LSA throttle delay 0 secs 0 msecs
Minimum hold time for LSA throttle 5 secs 0 msecs
Maximum wait time for LSA throttle 5 secs 0 msecs
Minimum LSA arrival 1 secs 0 msecs
Number of external LSA 0. Checksum 0x000000
Number of opaque AS LSA 0. Checksum 0x000000
Number of non-default external LSA 0
External LSA database is unlimited.
Number of LSA originated 6
Number of LSA received 15
Number of areas attached to this router: 2
MemPool - struct ospf lsa : (0-16) | Total (16/100000) blk_size:160
MemPool - struct rxmt : | Total (0/0) blk_size:8
Area 0.0.0.0 (BACKBONE)
Number of interfaces in this area is 1(1)
Number of fully adjacent neighbors in this area is 0
Area has no authentication
SPF algorithm last executed 00:10:05.434 ago
SPF algorithm executed 1 times
Number of LSA 3. Checksum 0x01bf9c
Area 0.0.0.1
Number of interfaces in this area is 1(1)
Number of fully adjacent neighbors in this area is 1
Number of fully adjacent virtual neighbors through this area is 0
Area has no authentication
SPF algorithm last executed 00:09:57.432 ago
SPF algorithm executed 7 times
Number of LSA 13. Checksum 0x076e78
Dste Staus: Disabled
 
R2#show ip ospf
Routing Process "ospf 100" with ID 2.2.2.2
Process uptime is 16 hours 48 minutes
Process bound to VRF default
Conforms to RFC2328, and RFC1583 Compatibility flag is disabled
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Graceful Restart
This router is an ABR, ABR Type is Alternative Cisco (RFC3509)
SPF schedule delay initial 0 secs 500 msecs
SPF schedule delay min 0 secs 500 msecs
SPF schedule delay max 50 secs 0 msecs
Refresh timer 10 secs
Number of incoming current DD exchange neighbors 0/64
Number of outgoing current DD exchange neighbors 0/64
Initial LSA throttle delay 0 secs 0 msecs
Minimum hold time for LSA throttle 5 secs 0 msecs
Maximum wait time for LSA throttle 5 secs 0 msecs
Minimum LSA arrival 1 secs 0 msecs
Number of external LSA 0. Checksum 0x000000
Number of opaque AS LSA 0. Checksum 0x000000
Number of non-default external LSA 0
External LSA database is unlimited.
Number of LSA originated 11
Number of LSA received 12
Number of areas attached to this router: 3
MemPool - struct ospf lsa : (0-20) | Total (20/100000) blk_size:160
MemPool - struct rxmt : | Total (0/0) blk_size:8
Area 0.0.0.0 (BACKBONE)
Number of interfaces in this area is 1(1)
Number of fully adjacent neighbors in this area is 0
Area has no authentication
SPF algorithm last executed 00:11:05.618 ago
SPF algorithm executed 1 times
Number of LSA 4. Checksum 0x018ce2
Area 0.0.0.1
Number of interfaces in this area is 1(1)
Number of fully adjacent neighbors in this area is 1
Number of fully adjacent virtual neighbors through this area is 0
Area has no authentication
SPF algorithm last executed 00:11:03.619 ago
SPF algorithm executed 6 times
Number of LSA 13. Checksum 0x076e78
Area 0.0.0.2
Number of interfaces in this area is 1(1)
Number of fully adjacent neighbors in this area is 0
Number of fully adjacent virtual neighbors through this area is 0
Area has no authentication
SPF algorithm last executed 00:11:05.618 ago
SPF algorithm executed 3 times
Number of LSA 3. Checksum 0x0139cf
Dste Staus: Disabled
 
OSPF Authentication
There are three types of OSPF authentications--Null (Type 0), Simple Text (Type 1), and MD5 (Type 2). With Null authentication, routing exchanges over the network are not authenticated. In Simple Text authentication, the authentication type is the same for all routers that communicate using OSPF in a network. For MD5 authentication, configure a key and a key ID on each router. The router generates a message digest on the basis of the key, key ID, and OSPF packet, and adds it to the OSPF packet.
The authentication type can be configured on a per-interface basis or a per-area basis. Additionally, Interface and Area authentication can be used together. Area authentication is used for an area, and interface authentication is used for a specific interface in the area. If the Interface authentication type is different from the Area authentication type, the Interface authentication type overrides the Area authentication type. If the Authentication type is not specified for an interface, the Authentication type for the area is used. The authentication command descriptions contain details of each type of authentication.
In the example below, R1 and R2 are configured for both the interface and area authentications. The authentication type of interface eth1 on R1 and interface eth0 on R2 is MD5 mode, and is defined by the area authentication command; however, the authentication type of interface eth2 on R1 and interface eth1 on R2 is plain text mode, and is defined by the ip ospf authentication command. This interface command overrides the area authentication command.
Topology
OSPF Authentication Topology
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
(config-router)#network 10.10.11.0/24 area 0
Define interfaces on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area).
(config-router)#area 0 authentication message-digest
Enable MD5 authentication on area 0.
(config-router)#exit
Exit Router mode, and return to Configure mode.
(config)#interface eth1
Enter interface mode.
(config-if)#ip ospf message-digest-key 1 md5 test
Register the MD5 key test for OSPF authentication. The key ID is 1.
(config-if)#exit
Exit interface mode
(config)#interface eth2
Enter interface mode.
(config-if)#ip ospf authentication
Enable the OSPF packet to use text authentication on the current interface (eth2).
(config-if)#ip ospf authentication-key test
Specify an OSPF authentication password (test) for the neighboring routers.
R2
 
#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
(config-router)#network 10.10.11.0/24 area 0
Define interfaces on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area).
(config-router)#area 0 authentication message-digest
Enable MD5 authentication on area 0.
(config-router)#exit
Exit Router mode, and return to Configure mode.
(config)#interface eth2
Enter interface mode.
(config-if)#ip ospf message-digest-key 1 md5 test
Register MD5 key test for OSPF authentication. The key ID is 1.
(config-if)#exit
Exit interface mode.
(config)#interface eth1
Enter interface mode.
(config-if)#ip ospf authentication
Enable the OSPF packet to use text authentication on the current interface (eth1).
(config-if)#ip ospf authentication-key test
Specify an OSPF authentication password test for the neighboring routers.
Validation
R1
R1#sh running-config
!
no service password-encryption
!
hostname R1
!
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
ip address 10.10.10.10/24
ip ospf message-digest-key 1 md5 0x293da85becc67703
!
interface eth2
ip address 10.10.11.10/24
ip ospf authentication
ip ospf authentication-key 0x293da85becc67703
!
interface eth3
!
interface eth4
!
interface eth5
!
interface eth6
!
interface eth7
!
router ospf 100
area 0.0.0.0 authentication message-digest
network 10.10.9.0/24 area 0.0.0.0
network 10.10.10.0/24 area 0.0.0.0
network 10.10.11.0/24 area 0.0.0.0
network 10.10.12.0/24 area 0.0.0.0
cspf disable-better-protection
!
line con 0
login
line vty 0 39
login
!
end
 
 
R1#sh ip ospf neighbor
 
Total number of full neighbors: 1
OSPF process 100 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
10.12.26.89 1 Full/DR 00:00:38 10.10.10.50 eth1 0
R2
R2#sh 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
ip address 10.10.11.50/24
ip ospf authentication
ip ospf authentication-key 0x293da85becc67703
!
interface eth2
ip address 10.10.10.50/24
ip ospf message-digest-key 1 md5 0x293da85becc67703
ip ospf cost 100
!
interface eth3
!
interface eth4
!
interface eth5
!
interface eth6
!
router ospf 100
area 0.0.0.0 authentication message-digest
network 10.10.10.0/24 area 0.0.0.0
network 10.10.11.0/24 area 0.0.0.0
cspf disable-better-protection
!
line con 0
login
line vty 0 39
login
!
end
 
R2#sh ip ospf neighbor
 
Total number of full neighbors: 1
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
Multiple OSPF Instances
By using multiple OSPF instances, OSPF routes can be segregated, based on their instance number. Routes of one instance are stored differently from routes of another instance running in the same router.
To configure multiple OSPF instances, perform the following procedures referring to the topology diagram below:
1. Enable OSPF on an interface.
2. Enable multiple instances.
3. Configure redistribution among multiple instances.
Note: Optionally, redistribution can be configured with the metric, type or route-map options.
Topology
.
Multiple OSPF Instances
Enable Multiple OSPF Instances on a Router
In this example, routers R1, R2, and R3 are in Area 0, and all run OSPF.
R1
 
(config)#interface eth1
Enter interface mode for eth1.
(config-if)#ip address 2.2.2.2/24
Specify the IP address of the interface.
(config-if)#no shutdown
Activate the interface.
(config-if)#exit
Exit interface mode.
(config)#router ospf 10
Configure an OSPF instance with an instance ID of 10.
(config-router)#router-id 5.5.5.5
Configure the router ID to use on this instance.
(config-router)#network 2.2.2.0/24 area 0
Advertise the network with the area ID.
R2
 
(config)#interface eth1
Enter interface mode for eth1.
(config-if)#ip address 2.2.2.3/24
Specify the IP address of the interface.
(config-if)#no shutdown
Activate the interface.
(config-if)#exit
Exit interface mode.
(config)#router ospf 10
Configure an OSPF instance with an instance ID of 10.
(config-router)#router-id 6.6.6.6
Configure the router ID to use on this instance.
(config-router)#network 2.2.2.0/24 area 0
Advertise the network with the area ID.
(config-router)#exit
Exit router mode.
(config)#interface eth2
Enter interface mode for eth2.
(config-if)#ip address 4.4.4.4/24
Configure the IP address.
(config-if)#no shutdown
Activate the interface.
(config-if)#exit
Exit interface mode.
(config)#router ospf 15
Configure an OSPF instance with an instance ID of 15.
(config-router)#router-id 8.8.8.8
Configure the router ID to use on this instance.
(config-router)#network 4.4.4.0/24 area 0
Advertise the network with the area ID.
R3
 
(config)#interface eth1
Enter interface mode for eth1.
(config-if)#ip address 4.4.4.5/24
Configure the IP address.
(config-if)#no shutdown
Activate the interface.
(config-if)#exit
Exit interface mode.
(config)#router ospf 15
Configure an OSPF instance with an instance ID of 15.
(config-router)#router-id 7.7.7.7
Configure the router ID to use on this instance.
(config-router)#network 4.4.4.0/24 area 0
Advertise the network with the area ID.
Validation
R1
R1#sh running-config
!
no service password-encryption
!
hostname R1
!
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
ip address 2.2.2.2/24
!
interface eth2
ip address 10.10.11.10/24
!
interface eth3
!
interface eth4
!
interface eth5
!
interface eth6
!
interface eth7
!
router ospf 10
ospf router-id 5.5.5.5
network 2.2.2.0/24 area 0.0.0.0
cspf disable-better-protection
!
line con 0
login
line vty 0 39
login
!
end
 
R1#sh ip ospf neighbor
 
Total number of full neighbors: 1
OSPF process 10 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
6.6.6.6 1 Full/Backup 00:00:39 2.2.2.3 eth1 0
 
R1#sh ip ospf route
 
OSPF process 10:
Codes: C - connected, D - Discard, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
 
C 2.2.2.0/24 [1] is directly connected, eth1, Area 0.0.0.0
R2
R2#sh 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
ip address 2.2.2.3/24
!
interface eth2
ip address 4.4.4.4/24
!
interface eth3
!
interface eth4
!
interface eth5
!
interface eth6
!
router ospf 10
ospf router-id 6.6.6.6
network 2.2.2.0/24 area 0.0.0.0
cspf disable-better-protection
!
router ospf 15
ospf router-id 8.8.8.8
network 4.4.4.0/24 area 0.0.0.0
no capability cspf
!
line con 0
login
line vty 0 39
login
!
end
 
R2#sh ip ospf neighbor
 
Total number of full neighbors: 1
OSPF process 10 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
5.5.5.5 1 Full/DR 00:00:33 2.2.2.2 eth1 0
 
Total number of full neighbors: 1
OSPF process 15 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
7.7.7.7 1 Full/Backup 00:00:31 4.4.4.5 eth2 0
 
R2#sh ip ospf route
 
OSPF process 10:
Codes: C - connected, D - Discard, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
 
C 2.2.2.0/24 [1] is directly connected, eth1, Area 0.0.0.0
 
OSPF process 15:
Codes: C - connected, D - Discard, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
 
C 4.4.4.0/24 [1] is directly connected, eth2, Area 0.0.0.0
R3
R3#sh running-config
!
no service password-encryption
!
hostname R3
!
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.90/24
!
interface eth1
ip address 4.4.4.5/24
!
interface eth2
ip address 10.10.13.10/24
!
interface eth3
!
interface eth4
!
interface eth5
!
interface eth6
!
router ospf 15
ospf router-id 7.7.7.7
network 4.4.4.0/24 area 0.0.0.0
cspf disable-better-protection
!
line con 0
login
line vty 0 39
login
!
end
 
R3#sh ip ospf neighbor
 
Total number of full neighbors: 1
OSPF process 15 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
8.8.8.8 1 Full/DR 00:00:30 4.4.4.4 eth1 0
Redistribute among Multiple Instances
In this example, routes of one instance are redistributed to another instance to enable ping from R1 to R3 or vice versa; and R2 redistributes routes from one instance to another.
R2
 
(config)#router ospf 15
Configure an OSPF instance with instance ID 15.
(config-router)#router-id 8.8.8.8
Configure the router ID.
(config-router)#redistribute ospf 10
Redistribute instance 10 routes.
(config-router)#redistribute connected
Redistribute connected routes to instance 15.
(config-router)#exit
Exit Router mode, and return to Configure mode.
(config)#router ospf 10
Configure an OSPF instance with instance ID 10.
(config-router)#router-id 6.6.6.6
Configure the router ID.
(config-router)#redistribute ospf 15
Redistribute instance 15 routes.
(config-router)#redistribute connected
Redistribute connected routes to instance 10.
Redistribute with the Metric Option
In this example, on R3, R1 and R2 have each other’s routes with a metric of 100.
R2
 
(config)#router ospf 15
Configure an OSPF instance with instance ID 15.
(config-router)#router-id 8.8.8.8
Configure the router ID.
(config-router)#redistribute ospf 10 metric 100
Redistribute instance 10 routes with metric 100.
(config-router)#redistribute connected
Redistribute connected routes to instance 15.
(config-router)#exit
Exit Router mode, and return to Configure mode.
(config)#router ospf 10
Configure an OSPF instance with instance ID 10.
(config-router)#router-id 6.6.6.6
Configure the router ID.
(config-router)#redistribute ospf 15 metric 100
Redistribute instance 15 routes with metric 100.
(config-router)#redistribute connected
Redistribute connected routes to instance 10.
Redistribute with the Type Option
In this example, on R3, R1 has R3 routes as type 2, and R2 has R1 routes as type 1.
R2
 
(config)#router ospf 15
Configure an OSPF instance with instance ID 15.
(config-router)#router-id 8.8.8.8
Configure the router ID.
(config-router)#redistribute ospf 10 metric-type 1
Redistribute instance 10 routes with metric-type 1.
(config-router)#redistribute connected
Redistribute connected routes to instance 15.
(config-router)#exit
Exit Router mode, and return to Configure mode.
(config)#router ospf 10
Configure an OSPF instance with instance ID 10.
(config-router)#router-id 6.6.6.6
Configure the router ID.
(config-router)#redistribute ospf 15 metric-type 2
Redistribute instance 15 routes with type 2.
(config-router)#redistribute connected
Redistribute connected routes to instance 10.
Redistribute with the Route-Map Option
R2
 
(config)#route-map 1 permit 10
Enter route-map mode, specifying route-map ID.
(config-route-map)#set metric 100
Set metric value.
(config-route-map)#set metric-type type-2
Set metric-type.
(config-route-map)#exit
Exit route-map mode.
(config)#route-map 2 permit 10
Enter route-map mode, specifying route-map ID.
(config-route-map)#set metric 200
Set metric value.
(config-route-map)#set metric-type type-1
Set metric-type.
(config-route-map)#exit
Exit route-map mode.
(config)#router ospf 15
Configure an OSPF instance with instance ID 15.
(config-router)#router-id 8.8.8.8
Configure the router ID.
(config-router)#redistribute ospf 10 route-map 1
Redistribute instance 10 routes with route map 1.
(config-router)#redistribute connected
Redistribute connected routes to instance 15.
(config-router)#exit
Exit Router mode, and return to Configure mode.
(config)#router ospf 10
Configure an OSPF instance with instance ID 10.
(config-router)#router-id 6.6.6.6
Configure the router ID.
(config-router)#redistribute ospf 15 route-map 2
Redistribute instance 15 routes with route map 2.
(config-router)#redistribute connected
Redistribute connected routes to instance 10.
Validation
R1#show ip ospf neighbor
 
Total number of full neighbors: 1
OSPF process 10 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
6.6.6.6 1 Full/DR 00:00:39 2.2.2.3 eth1 0
 
R2#show ip ospf neighbor
 
Total number of full neighbors: 1
OSPF process 10 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
5.5.5.5 1 Full/Backup 00:00:35 2.2.2.2 eth1 0
 
Total number of full neighbors: 1
OSPF process 15 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
7.7.7.7 1 Full/Backup 00:00:36 4.4.4.5 eth2 0
R3#show ip ospf neighbor
 
Total number of full neighbors: 1
OSPF process 15 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
8.8.8.8 1 Full/DR 00:00:40 4.4.4.4 eth2 0
R1#show ip route
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2,
ia - IS-IS inter area, E - EVPN,
v - vrf leaked
* - candidate default
 
IP Route Table for VRF "default"
C 2.2.2.0/24 is directly connected, eth1, 00:08:40
O E1 4.4.4.0/24 [110/201] via 2.2.2.3, eth1, 00:01:18
C 5.5.5.5/32 is directly connected, lo, 00:08:41
O E2 6.6.6.6/32 [110/20] via 2.2.2.3, eth1, 00:01:10
O E2 8.8.8.8/32 [110/20] via 2.2.2.3, eth1, 00:01:10
C 127.0.0.0/8 is directly connected, lo, 00:08:44
C 192.168.20.0/24 is directly connected, eth0, 00:08:40
 
Gateway of last resort is not set
 
R2#show ip route
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2,
ia - IS-IS inter area, E - EVPN,
v - vrf leaked
* - candidate default
 
IP Route Table for VRF "default"
C 2.2.2.0/24 is directly connected, eth1, 5d00h02m
C 4.4.4.0/24 is directly connected, eth2, 5d00h02m
C 6.6.6.6/32 is directly connected, lo, 4d23h59m
C 8.8.8.8/32 is directly connected, lo, 4d23h59m
C 127.0.0.0/8 is directly connected, lo, 5d00h09m
C 192.168.20.0/24 is directly connected, eth0, 5d00h08m
 
Gateway of last resort is not set
 
R3#show ip route
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2,
ia - IS-IS inter area, E - EVPN,
v - vrf leaked
* - candidate default
 
IP Route Table for VRF "default"
O E2 2.2.2.0/24 [110/20] via 4.4.4.4, eth2, 00:02:45
C 4.4.4.0/24 is directly connected, eth2, 00:07:12
C 5.5.5.5/32 is directly connected, lo, 00:16:35
O E2 6.6.6.6/32 [110/20] via 4.4.4.4, eth2, 00:02:45
O E2 8.8.8.8/32 [110/20] via 4.4.4.4, eth2, 00:02:45
C 127.0.0.0/8 is directly connected, lo, 00:16:39
C 192.168.20.0/24 is directly connected, eth0, 00:15:36
 
Gateway of last resort is not set
 
#show ip ospf route
 
OSPF process 100:
Codes: C - connected, D - Discard, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
 
C 10.10.9.0/24 [1] is directly connected, eth2, Area 0.0.0.0
C 10.10.10.0/24 [1] is directly connected, eth3, Area 0.0.0.0
O 10.10.11.0/24 [101] via 10.10.10.11, eth3, Area 0.0.0.0
C 10.10.12.0/24 [1] is directly connected, eth1, Area 0.0.0.0
O 10.10.13.0/24 [102] via 10.10.10.11, eth3, Area 0.0.0.0
O 10.10.14.0/24 [102] via 10.10.10.11, eth3, Area 0.0.0.0
 
R2#show route-map
 
route-map 1, permit, sequence 10
Match clauses:
Set clauses:
metric 100
metric-type type-2
route-map 2, permit, sequence 10
Match clauses:
Set clauses:
metric 200
metric-type type-1
 
R1#show ip ospf route
 
OSPF process 10:
Codes: C - connected, D - Discard, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
 
C 2.2.2.0/24 [1] is directly connected, eth1, Area 0.0.0.0
E1 4.4.4.0/24 [201] via 2.2.2.3, eth1
E2 6.6.6.6/32 [1/20] via 2.2.2.3, eth1
E2 8.8.8.8/32 [1/20] via 2.2.2.3, eth1
E2 192.168.20.0/24 [1/20] via 2.2.2.3, eth1
 
R2#show ip ospf route
 
OSPF process 10:
Codes: C - connected, D - Discard, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
 
C 2.2.2.0/24 [1] is directly connected, eth1, Area 0.0.0.0
 
OSPF process 15:
Codes: C - connected, D - Discard, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
 
C 4.4.4.0/24 [1] is directly connected, eth2, Area 0.0.0.0
 
R3#show ip ospf route
 
OSPF process 15:
Codes: C - connected, D - Discard, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
 
E2 2.2.2.0/24 [1/20] via 4.4.4.4, eth2
C 4.4.4.0/24 [1] is directly connected, eth2, Area 0.0.0.0
E2 6.6.6.6/32 [1/20] via 4.4.4.4, eth2
E2 8.8.8.8/32 [1/20] via 4.4.4.4, eth2
E2 192.168.20.0/24 [1/20] via 4.4.4.4, eth2
 
Multiple OSPF Instances on Same Subnet
Multiple OSPF instances can be configured on the same subnet. The OSPF instance ID supports separate OSPFv2 protocol instances. With this feature, an adjacency is formed only if the received packet’s instance ID is the same as the instance ID configured for that interface.
Topology
Multiple Instances on the Same Subnet
Configuration
R1
 
#configure terminal
Enter configure mode.
(config)#enable ext-ospf-multi-inst
Enable multiple-instance capability.
(config)#router ospf 1
Configure an OSPF instance with an instance ID of 1.
(config-router)#network 1.1.1.0/24 area 0 instance-id 1
Advertise the network in Area 0 with an instance ID of 1.
(config-router)#exit
Exit Router mode, and return to Configure mode.
(config)#router ospf 2
Configure an OSPF instance with an instance ID of 2.
(config-router)#network 1.1.1.0/24 area 0 instance-id 2
Advertise the network in Area 0 with an instance ID of 2.
(config-router)#exit
Exit Router mode, and return to Configure mode.
R2
 
#configure terminal
Enter configure mode.
(config)#enable ext-ospf-multi-inst
Enable multiple-instance capability.
(config)#router ospf 1
Configure an OSPF instance with an instance ID of 1.
(config-router)#network 1.1.1.0/24 area 0 instance-id 1
Advertise the network in Area 0 with an instance ID of 1.
(config-router)#exit
Exit Router mode, and return to Configure mode.
(config)#router ospf 2
Configure an OSPF instance with an instance ID of 2.
(config-router)#network 1.1.1.0/24 area 0 instance-id 2
Advertise the network in Area 0 with an instance ID of 2.
(config-router)#exit
Exit Router mode, and return to Configure mode.
Validation
R1
R1#show ip ospf interface
eth1 is up, line protocol is up
Internet Address 1.1.1.1/24, Area 0.0.0.0, MTU 1500
Process ID 1, VRF (default), Router ID 10.12.26.88, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DR, Priority 1, TE Metric 1
Designated Router (ID) 10.12.26.88, Interface Address 1.1.1.1
Backup Designated Router (ID) 10.12.26.89, Interface Address 1.1.1.2
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:10
Neighbor Count is 1, Adjacent neighbor count is 1
Suppress hello for 0 neighbor(s)
Hello received 7 sent 16, DD received 3 sent 4
LS-Req received 1 sent 1, LS-Upd received 3 sent 5
LS-Ack received 3 sent 3, Discarded 0
No authentication
Internet Address 1.1.1.1/24, Area 0.0.0.0, MTU 1500
Process ID 2, VRF (default), Router ID 10.12.26.88, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DR, Priority 1, TE Metric 1
Designated Router (ID) 10.12.26.88, Interface Address 1.1.1.1
Backup Designated Router (ID) 10.12.26.89, Interface Address 1.1.1.2
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:04
Neighbor Count is 1, Adjacent neighbor count is 1
Suppress hello for 0 neighbor(s)
Hello received 4 sent 12, DD received 3 sent 4
LS-Req received 1 sent 1, LS-Upd received 3 sent 5
LS-Ack received 3 sent 3, Discarded 0
No authentication
 
R1#show ip ospf neighbor
 
Total number of full neighbors: 1
OSPF process 1 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
10.12.26.89 1 Full/Backup 00:00:35 1.1.1.2 eth1 1
 
Total number of full neighbors: 1
OSPF process 2 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
10.12.26.89 1 Full/Backup 00:00:33 1.1.1.2 eth1 2
R2
R2#sh ip ospf interface
eth1 is up, line protocol is up
Internet Address 1.1.1.2/24, Area 0.0.0.0, MTU 1500
Process ID 1, VRF (default), Router ID 10.12.26.89, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State Backup, Priority 1, TE Metric 1
Designated Router (ID) 10.12.26.88, Interface Address 1.1.1.1
Backup Designated Router (ID) 10.12.26.89, Interface Address 1.1.1.2
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:08
Neighbor Count is 1, Adjacent neighbor count is 1
Suppress hello for 0 neighbor(s)
Hello received 17 sent 17, DD received 4 sent 3
LS-Req received 1 sent 1, LS-Upd received 5 sent 3
LS-Ack received 2 sent 3, Discarded 0
No authentication
Internet Address 1.1.1.2/24, Area 0.0.0.0, MTU 1500
Process ID 2, VRF (default), Router ID 10.12.26.89, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State Backup, Priority 1, TE Metric 1
Designated Router (ID) 10.12.26.88, Interface Address 1.1.1.1
Backup Designated Router (ID) 10.12.26.89, Interface Address 1.1.1.2
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:07
Neighbor Count is 1, Adjacent neighbor count is 1
Suppress hello for 0 neighbor(s)
Hello received 13 sent 14, DD received 4 sent 3
LS-Req received 1 sent 1, LS-Upd received 5 sent 3
LS-Ack received 2 sent 3, Discarded 0
No authentication
 
R2#sh ip ospf neighbor
 
Total number of full neighbors: 1
OSPF process 1 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
10.12.26.88 1 Full/DR 00:00:32 1.1.1.1 eth1 1
 
Total number of full neighbors: 1
OSPF process 2 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
10.12.26.88 1 Full/DR 00:00:37 1.1.1.1 eth1 2
Multi-Area Adjacency Configuration
Multiple OSPF areas for a same subnet can be configured between two routers. In the diagram below, OSPF is enabled between R2 and R3 under area 0 and area 1, though there is only one link available between these two routers. Multi-area adjacency allows establishing adjacency on multiple areas between the Area Border Routers (ABRs). The specified interface of the ABR is associated with multiple areas.
Each multi-area-adjacency internally implements point-to-point functionality, once the adjacency reaches the FULL state. This point-to-point link provides a topological path for that area. Like a virtual link, there is no restriction for multi‑area adjacency that the packets always go through the backbone.
Topology
One Subnet with Multiple OSPF Areas
Configuration
R1
 
#configure terminal
Enter configure mode.
(config)#router ospf 1
Configure an OSPF instance with an instance ID of 1.
(config-router)#network 1.1.1.0/24 area 1
Configure OSPF between R1 and R2 under area 1.
(config-router)#exit
Exit Router mode, and return to Configure mode.
R2
 
#configure terminal
Enter configure mode.
(config)#router ospf 1
Configure an OSPF instance with an instance ID of 1.
(config-router)#network 1.1.1.0/24 area 1
Configure OSPF between R1 and R2 under area 1.
(config-router)#network 2.2.2.0/24 area 0
Configure OSPF between R2 and R3 under area 0.
(config-router)#exit
Exit Router mode, and return to Configure mode.
(config)#interface eth1
Enter interface mode.
(config-if)#ip address 2.2.2.1/24
Configure IP address on the interface.
(config-if)#ip ospf 1 multi-area 0.0.0.1 neighbor 2.2.2.2
Configure multi area adjacency.
(config-if)#exit
Exit interface mode.
R3
 
#configure terminal
Enter configure mode.
(config)#router ospf 1
Configure an OSPF instance with an instance ID of 1.
(config-router)#network 2.2.2.0/24 area 0
Configure OSPF between R2 and R3 under area 0.
(config-router)#network 3.3.3.0/24 area 1
Configure OSPF between R3 and R4 under area 1.
(config-router)#exit
Exit Router mode, and return to Configure mode.
(config)#interface eth1
Enter interface mode.
(config-if)#ip address 2.2.2.2/24
Configure IP address on the interface.
(config-if)#ip ospf 1 multi-area 0.0.0.1 neighbor 2.2.2.1
Configure multi area adjacency.
(config-if)#exit
Exit interface mode.
R4
 
#configure terminal
Enter configure mode.
(config)#router ospf 1
Configure an OSPF instance with an instance ID of 1.
(config-router)#network 3.3.3.0/24 area 1
Configure OSPF between R3 and R4 under area 1.
(config-router)#exit
Exit Router mode, and return to Configure mode.
Validation
show ip ospf multi-area-adjacencies, show ip ospf neighbor, show ip ospf route, show ip route
R2
R2#show ip ospf multi-area-adjacencies
Multi-area-adjacency link on interface eth1 to neighbor 2.2.2.2
Internet Address 2.2.2.1/24, Area 0.0.0.1, MTU 1500
Process ID 1, Router ID 10.12.26.89, Network Type POINTTOPOINT, Cost: 1
Transmit Delay is 1 sec, State Point-To-Point, TE Metric 1
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:00
Neighbor Count is 1, Adjacent neighbor count is 1
Hello received 16 sent 53, DD received 3 sent 4
LS-Req received 1 sent 1, LS-Upd received 10 sent 5
LS-Ack received 3 sent 9, Discarded 0
 
R2#show ip ospf neighbor
 
Total number of full neighbors: 3
OSPF process 1 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
10.12.26.88 1 Full/DR 00:00:35 1.1.1.1 eth2 0
10.12.26.90 1 Full/Backup 00:00:33 2.2.2.2 eth1 0
10.12.26.90 1 Full/ - 00:00:35 2.2.2.2 eth1
 
R2#show ip ospf route
 
OSPF process 1:
Codes: C - connected, D - Discard, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
 
C 1.1.1.0/24 [1] is directly connected, eth2, Area 0.0.0.1
C 2.2.2.0/24 [1] is directly connected, eth1, Area 0.0.0.0
O 3.3.3.0/24 [2] via 2.2.2.2, eth1, Area 0.0.0.1
 
 
R2#show ip route
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default
 
IP Route Table for VRF "default"
C 1.1.1.0/24 is directly connected, eth2
C 2.2.2.0/24 is directly connected, eth1
O 3.3.3.0/24 [110/2] via 2.2.2.2, eth1, 00:05:44
C 10.12.26.0/24 is directly connected, eth0
C 127.0.0.0/8 is directly connected, lo
 
Gateway of last resort is not set
R3
R3#show ip ospf multi-area-adjacencies
Multi-area-adjacency link on interface eth1 to neighbor 2.2.2.1
Internet Address 2.2.2.2/24, Area 0.0.0.1, MTU 1500
Process ID 1, Router ID 10.12.26.90, Network Type POINTTOPOINT, Cost: 1
Transmit Delay is 1 sec, State Point-To-Point, TE Metric 1
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:05
Neighbor Count is 1, Adjacent neighbor count is 1
Hello received 41 sent 41, DD received 4 sent 3
LS-Req received 1 sent 1, LS-Upd received 5 sent 10
LS-Ack received 8 sent 3, Discarded 0
 
R3#sh ip ospf neighbor
 
Total number of full neighbors: 3
OSPF process 1 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
10.12.26.89 1 Full/DR 00:00:39 2.2.2.1 eth1 0
10.12.26.92 1 Full/Backup 00:00:36 3.3.3.2 eth2 0
10.12.26.89 1 Full/ - 00:00:30 2.2.2.1 eth1
R3#sh ip ospf route
 
OSPF process 1:
Codes: C - connected, D - Discard, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
 
O 1.1.1.0/24 [2] via 2.2.2.1, eth1, Area 0.0.0.1
C 2.2.2.0/24 [1] is directly connected, eth1, Area 0.0.0.0
C 3.3.3.0/24 [1] is directly connected, eth2, Area 0.0.0.1
 
R3#sh ip route
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default
 
IP Route Table for VRF "default"
O 1.1.1.0/24 [110/2] via 2.2.2.1, eth1, 00:07:31
C 2.2.2.0/24 is directly connected, eth1
C 3.3.3.0/24 is directly connected, eth2
C 10.12.26.0/24 is directly connected, eth0
C 127.0.0.0/8 is directly connected, lo
 
Gateway of last resort is not set
LSA Throttling
This section contains basic OSPF LSA throttling configuration examples.
The OSPF Link-State Advertisement (LSA) throttling feature provides a mechanism to dynamically slow down link-state advertisement (LSA) updates in OSPF during times of network instability. It also allows faster OSPF convergence by providing LSA rate limiting in milliseconds, when the network is stable.
How OSPF LSA Throttling Works
The timers throttle lsa all command controls the generation (sending) of LSAs. The first LSA is always generated immediately upon an OSPF topology change, and the next LSA generated is controlled by the minimum start interval. The subsequent LSAs generated for the same LSA are rate-limited until the maximum interval is reached. The “same LSA” is defined as an LSA instance that contains the same LSA ID number, LSA type, and advertising router ID.
The timers lsa arrival command controls the minimum interval for accepting the same LSA. If an instance of the same LSA arrives sooner than the interval that is set, the LSA is dropped. It is recommended that the arrival interval be less than or equal to the hold-time interval of the timers throttle lsa all command.
Topology
The diagram shows the minimum configuration required to enable OSPF LSA Throttling Timers feature. R1 and R2 are two routers in Area 0 connecting to network 10.10.10.0/24.
Note: Configure one interface so that it belongs to only one area. It is possible, however, to configure different interfaces on a router to belong to different areas.
Basic OSPF Topology
R1
 
#configure terminal
Enter configure mode.
(config)#interface lo
Specify the interface loopback to configure.
(config-if)#ip address 1.1.1.1/32
Configure the ip address (1.1.1.1) to interface loopback.
(config-if)#exit
Exit interface mode.
(config)#router ospf 1
Configure the routing process, and specify the Process ID (1). 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)#network 1.1.1.1/32 area 0
Define the interface (1.1.1.1/32) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area).
(config-router)#timers throttle lsa all 10000 20000 45000
Configure LSA Throttling timers (Starting interval: <0-600000>, Min Hold Interval: <1-600000> and Max Wait Interval:< 1-600000>) in milliseconds. The Default value for corresponding timers are: Starting interval: 0, Min Hold Interval: 5 sec and Max Wait Interval: 5 sec.
(config-router)#logging monitor 7
 
Enable logging monitor globally.
 
(config-router)#logging level ospf 7
Enable logging level ospf globally.
(config-router)#end
Exit router mode
R2
 
#configure terminal
Enter configure mode.
(config)#router ospf 1
Configure the routing process, and specify the Process ID (1). 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.
Validation
R1
Check the output of show ip ospf and verify the initial throttle delay, minimum hold time for LSA throttle and maximum wait time for LSA throttle.
#show ip ospf 1
Routing Process "ospf 1" with ID 1.1.1.1
Process uptime is 11 minutes
Process bound to VRF default
Conforms to RFC2328, and RFC1583 Compatibility flag is disabled
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Graceful Restart
SPF schedule delay initial 0 secs 500 msecs
SPF schedule delay min 0 secs 500 msecs
SPF schedule delay max 50 secs 0 msecs
Refresh timer 10 secs
Number of incoming current DD exchange neighbors 0/64
Number of outgoing current DD exchange neighbors 0/64
Initial LSA throttle delay 10 secs 0 msecs
Minimum hold time for LSA throttle 20 secs 0 msecs
Maximum wait time for LSA throttle 45 secs 0 msecs
Minimum LSA arrival 1 secs 0 msecs
Number of external LSA 0. Checksum 0x000000
Number of opaque AS LSA 0. Checksum 0x000000
Number of non-default external LSA 0
External LSA database is unlimited.
Number of LSA originated 4
Number of LSA received 4
Number of areas attached to this router: 1
MemPool - struct ospf lsa : (0-8) | Total (8/100000) blk_size:160
MemPool - struct rxmt : | Total (0/0) blk_size:8
Area 0.0.0.0 (BACKBONE)
Number of interfaces in this area is 2(2)
Number of fully adjacent neighbors in this area is 1
Area has no authentication
SPF algorithm last executed 00:10:12.807 ago
SPF algorithm executed 5 times
Number of LSA 7. Checksum 0x02c480
Dste Staus: Disabled
 
 
#show ip ospf neighbor
 
Total number of full neighbors: 1
OSPF process 1 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
3.1.1.1 1 Full/Backup 00:00:34 10.10.10.11 eth1 0
 
 
#debug ospf database-timer rate-limit
 
#show debugging ospf
OSPF debugging status:
OSPF rate limit timer events debugging is on
Here, we administratively shutdown and then bring up the loopback interface to generate Rate Limit Timer events for OSPF debugging to capture.
(config)#int lo
(config-if)#shutdown
2019 Mar 29 16:32:36.838 : OcNOS : OSPF : NOTIF : [OSPF_OPR_LINK_DOWN_4]: Received Link down for interface: lo
2019 Mar 29 16:32:36.838 : OcNOS : OSPF : INFO : Starting Rate Limit Timer for LSA[0.0.0.0:Type1:1.1.1.1:(self)]: with 10000 msec delay
2019 Mar 29 16:32:36.838 : OcNOS : OSPF : NOTIF : [OSPF_OPR_STATE_4]: [lo:1.1.1.1]: Status change Loopback -> Down
 
(config-if)#no shutdown
2019 Mar 29 16:32:42.705 : OcNOS : OSPF : NOTIF : [OSPF_OPR_LINK_UP_4]: Received Link up for interface: lo
2019 Mar 29 16:32:42.705 : OcNOS : OSPF : NOTIF : [OSPF_OPR_STATE_4]: [lo:1.1.1.1]: Status change Down -> Loopback
2019 Mar 29 16:32:46.853 : OcNOS : OSPF : INFO : Rate Limit Timer for LSA[0.0.0.0:Type1:1.1.1.1:(self)]: expired
2019 Mar 29 16:32:46.853 : OcNOS : OSPF : INFO : For Next Instance of LSA[0.0.0.0:Type1:1.1.1.1:(self)]: generation wait 20000 msec
 
 
(config-if)#shutdown
2019 Mar 29 16:32:54.353 : OcNOS : OSPF : NOTIF : [OSPF_OPR_LINK_DOWN_4]: Received Link down for interface: lo
2019 Mar 29 16:32:54.353 : OcNOS : OSPF : INFO : Starting Rate Limit Timer for LSA[0.0.0.0:Type1:1.1.1.1:(self)]: with 12499 msec delay
2019 Mar 29 16:32:54.353 : OcNOS : OSPF : NOTIF : [OSPF_OPR_STATE_4]: [lo:1.1.1.1]: Status change Loopback -> Down
 
(config-if)#no shutdown
2019 Mar 29 16:32:59.252 : OcNOS : OSPF : NOTIF : [OSPF_OPR_LINK_UP_4]: Received Link up for interface: lo
2019 Mar 29 16:32:59.252 : OcNOS : OSPF : NOTIF : [OSPF_OPR_STATE_4]: [lo:1.1.1.1]: Status change Down -> Loopback
2019 Mar 29 16:33:06.870 : OcNOS : OSPF : INFO : Rate Limit Timer for LSA[0.0.0.0:Type1:1.1.1.1:(self)]: expired
2019 Mar 29 16:33:06.870 : OcNOS : OSPF : INFO : For Next Instance of LSA[0.0.0.0:Type1:1.1.1.1:(self)]: generation wait 40000 msec
R2
Check the output of “show ip ospf neighbor” and verify that OSPF adjacency is up.
#show ip ospf neighbor
 
Total number of full neighbors: 1
OSPF process 1 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
1.1.1.1 1 Full/DR 00:00:33 10.10.10.10 eth1 0
 
Check the output of show ip ospf database and verify that LSA (router LSA in this example) is updated according to the configured LSA throttling timers configured on its neighbor.
#show ip ospf database
 
OSPF Router with ID (3.1.1.1) (Process ID 1 VRF default)
 
Router Link States (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum Link count
3.1.1.1 3.1.1.1 373 0x80000004 0xc60c 1
1.1.1.1 1.1.1.1 71 0x80000008 0xb9f2 2
 
Net Link States (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum
10.10.10.10 1.1.1.1 375 0x80000001 0x18e5
 
Area-Local Opaque-LSA (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum Opaque ID
1.0.0.1 3.1.1.1 372 0x80000001 0x2cf6 1
1.0.0.1 1.1.1.1 373 0x80000001 0x2af6 1
1.0.0.8 3.1.1.1 372 0x80000001 0x7d45 8
1.0.0.8 1.1.1.1 373 0x80000001 0x566c 8
 
 
#show ip ospf database
 
OSPF Router with ID (3.1.1.1) (Process ID 1 VRF default)
 
Router Link States (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum Link count
3.1.1.1 3.1.1.1 378 0x80000004 0xc60c 1
1.1.1.1 1.1.1.1 76 0x80000008 0xb9f2 2
 
Net Link States (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum
10.10.10.10 1.1.1.1 380 0x80000001 0x18e5
 
Area-Local Opaque-LSA (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum Opaque ID
1.0.0.1 3.1.1.1 377 0x80000001 0x2cf6 1
1.0.0.1 1.1.1.1 378 0x80000001 0x2af6 1
1.0.0.8 3.1.1.1 377 0x80000001 0x7d45 8
1.0.0.8 1.1.1.1 378 0x80000001 0x566c 8
 
 
#show ip ospf database
 
OSPF Router with ID (3.1.1.1) (Process ID 1 VRF default)
 
Router Link States (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum Link count
3.1.1.1 3.1.1.1 380 0x80000004 0xc60c 1
1.1.1.1 1.1.1.1 78 0x80000008 0xb9f2 2
 
Net Link States (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum
10.10.10.10 1.1.1.1 382 0x80000001 0x18e5
 
Area-Local Opaque-LSA (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum Opaque ID
1.0.0.1 3.1.1.1 379 0x80000001 0x2cf6 1
1.0.0.1 1.1.1.1 380 0x80000001 0x2af6 1
1.0.0.8 3.1.1.1 379 0x80000001 0x7d45 8
1.0.0.8 1.1.1.1 380 0x80000001 0x566c 8
 
 
#show ip ospf database
 
OSPF Router with ID (3.1.1.1) (Process ID 1 VRF default)
 
Router Link States (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum Link count
3.1.1.1 3.1.1.1 381 0x80000004 0xc60c 1
1.1.1.1 1.1.1.1 79 0x80000008 0xb9f2 2
 
Net Link States (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum
10.10.10.10 1.1.1.1 383 0x80000001 0x18e5
 
Area-Local Opaque-LSA (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum Opaque ID
1.0.0.1 3.1.1.1 380 0x80000001 0x2cf6 1
1.0.0.1 1.1.1.1 381 0x80000001 0x2af6 1
1.0.0.8 3.1.1.1 380 0x80000001 0x7d45 8
1.0.0.8 1.1.1.1 381 0x80000001 0x566c 8
 
 
#show ip ospf database
 
OSPF Router with ID (3.1.1.1) (Process ID 1 VRF default)
 
Router Link States (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum Link count
3.1.1.1 3.1.1.1 382 0x80000004 0xc60c 1
1.1.1.1 1.1.1.1 80 0x80000008 0xb9f2 2
 
Net Link States (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum
10.10.10.10 1.1.1.1 384 0x80000001 0x18e5
 
Area-Local Opaque-LSA (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum Opaque ID
1.0.0.1 3.1.1.1 381 0x80000001 0x2cf6 1
1.0.0.1 1.1.1.1 382 0x80000001 0x2af6 1
1.0.0.8 3.1.1.1 381 0x80000001 0x7d45 8
1.0.0.8 1.1.1.1 382 0x80000001 0x566c 8
 
 
#show ip ospf database
 
OSPF Router with ID (3.1.1.1) (Process ID 1 VRF default)
 
Router Link States (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum Link count
3.1.1.1 3.1.1.1 383 0x80000004 0xc60c 1
1.1.1.1 1.1.1.1 81 0x80000008 0xb9f2 2
 
Net Link States (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum
10.10.10.10 1.1.1.1 385 0x80000001 0x18e5
 
Area-Local Opaque-LSA (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum Opaque ID
1.0.0.1 3.1.1.1 382 0x80000001 0x2cf6 1
1.0.0.1 1.1.1.1 383 0x80000001 0x2af6 1
1.0.0.8 3.1.1.1 382 0x80000001 0x7d45 8
1.0.0.8 1.1.1.1 383 0x80000001 0x566c 8
Configure OSPF LSA Arrival Timers
The diagram shows the minimum configuration required to enable OSPF Minimum LSA Arrival Timers feature. R1 and R2 are two routers in Area 0 connecting to network 10.10.10.0/24.
Note: Configure one interface so that it belongs to only one area. It is possible, however, to configure different interfaces on a router to belong to different areas.
Topology
Basic OSPF Topology
Configuration
R1
 
#configure terminal
Enter configure mode.
(config)#interface lo
Specify the interface loopback to configure.
(config-if)#ip address 1.1.1.1/32
Configure the ip address (1.1.1.1) to interface loopback.
(config-if)#exit
Exit interface mode.
(config)#router ospf 1
Configure the routing process, and specify the Process ID (1). 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)#network 1.1.1.1/32 area 0
Define the interface (1.1.1.1/32) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area).
(config-router)#end
Exit router mode
R2
 
#configure terminal
Enter configure mode.
(config)#router ospf 1
Configure the routing process, and specify the Process ID (1). 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)#timers lsa arrival 100000
Configure Minimum LSA Arrival timers (Minimum LSA arrival Interval:< 0-600000>) in milliseconds. The Default value for Minimum LSA Arrival timer is: 1 sec.
Validation
R1
Check the output of show ip ospf and verify that the minimum LSA arrival timer by default is set to 1 sec.
#show ip ospf
Routing Process "ospf 1" with ID 1.1.1.1
Process uptime is 11 minutes
Process bound to VRF default
Conforms to RFC2328, and RFC1583 Compatibility flag is disabled
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Graceful Restart
SPF schedule delay initial 0 secs 500 msecs
SPF schedule delay min 0 secs 500 msecs
SPF schedule delay max 50 secs 0 msecs
Refresh timer 10 secs
Number of incoming current DD exchange neighbors 0/64
Number of outgoing current DD exchange neighbors 0/64
Initial LSA throttle delay 10 secs 0 msecs
Minimum hold time for LSA throttle 20 secs 0 msecs
Maximum wait time for LSA throttle 45 secs 0 msecs
Minimum LSA arrival 1 secs 0 msecs
Number of external LSA 0. Checksum 0x000000
Number of opaque AS LSA 0. Checksum 0x000000
Number of non-default external LSA 0
External LSA database is unlimited.
Number of LSA originated 4
Number of LSA received 4
Number of areas attached to this router: 1
MemPool - struct ospf lsa : (0-8) | Total (8/100000) blk_size:160
MemPool - struct rxmt : | Total (0/0) blk_size:8
Area 0.0.0.0 (BACKBONE)
Number of interfaces in this area is 2(2)
Number of fully adjacent neighbors in this area is 1
Area has no authentication
SPF algorithm last executed 00:10:12.807 ago
SPF algorithm executed 5 times
Number of LSA 7. Checksum 0x02c480
Dste Staus: Disabled
 
#show ip ospf neighbor
 
Total number of full neighbors: 1
OSPF process 1 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
3.1.1.1 1 Full/Backup 00:00:34 10.10.10.11 eth1
R2
Check the output of show ip ospf and verify that the minimum LSA arrival timer is set to 100 sec.
#show ip ospf
Routing Process "ospf 1" with ID 3.1.1.1
Process uptime is 23 minutes
Process bound to VRF default
Conforms to RFC2328, and RFC1583 Compatibility flag is disabled
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Graceful Restart
SPF schedule delay initial 0 secs 500 msecs
SPF schedule delay min 0 secs 500 msecs
SPF schedule delay max 50 secs 0 msecs
Refresh timer 10 secs
Number of incoming current DD exchange neighbors 0/64
Number of outgoing current DD exchange neighbors 0/64
Initial LSA throttle delay 0 secs 0 msecs
Minimum hold time for LSA throttle 5 secs 0 msecs
Maximum wait time for LSA throttle 5 secs 0 msecs
Minimum LSA arrival 100 secs 0 msecs
Number of external LSA 0. Checksum 0x000000
Number of opaque AS LSA 0. Checksum 0x000000
Number of non-default external LSA 0
External LSA database is unlimited.
Number of LSA originated 3
Number of LSA received 10
Number of areas attached to this router: 1
MemPool - struct ospf lsa : (0-9) | Total (9/100000) blk_size:160
MemPool - struct rxmt : | Total (0/0) blk_size:8
Area 0.0.0.0 (BACKBONE)
Number of interfaces in this area is 1(1)
Number of fully adjacent neighbors in this area is 1
Area has no authentication
SPF algorithm last executed 00:22:12.911 ago
SPF algorithm executed 4 times
Number of LSA 7. Checksum 0x02c281
Dste Staus: Disabled
Check the output of show ip ospf neighbor and verify that OSPF adjacency is up.
#show ip ospf neighbor
 
Total number of full neighbors: 1
OSPF process 1 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
1.1.1.1 1 Full/DR 00:00:35 10.10.10.10 eth1 0
Check the output of “show ip ospf database” and verify that LSA is accepted only after a time difference of 100 sec between two consecutive LSAs.
#show ip ospf database
 
OSPF Router with ID (3.1.1.1) (Process ID 1 VRF default)
 
Router Link States (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum Link count
3.1.1.1 3.1.1.1 1131 0x80000004 0xc60c 1
1.1.1.1 1.1.1.1 829 0x80000008 0xb9f2 2
 
Net Link States (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum
10.10.10.10 1.1.1.1 1133 0x80000001 0x18e5
 
Area-Local Opaque-LSA (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum Opaque ID
1.0.0.1 3.1.1.1 1130 0x80000001 0x2cf6 1
1.0.0.1 1.1.1.1 1131 0x80000001 0x2af6 1
1.0.0.8 3.1.1.1 1130 0x80000001 0x7d45 8
1.0.0.8 1.1.1.1 1131 0x80000001 0x566c 8
 
 
#show ip ospf database
 
OSPF Router with ID (3.1.1.1) (Process ID 1 VRF default)
 
Router Link States (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum Link count
3.1.1.1 3.1.1.1 1132 0x80000004 0xc60c 1
1.1.1.1 1.1.1.1 831 0x80000008 0xb9f2 2
 
Net Link States (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum
10.10.10.10 1.1.1.1 1134 0x80000001 0x18e5
 
Area-Local Opaque-LSA (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum Opaque ID
1.0.0.1 3.1.1.1 1131 0x80000001 0x2cf6 1
1.0.0.1 1.1.1.1 1132 0x80000001 0x2af6 1
1.0.0.8 3.1.1.1 1131 0x80000001 0x7d45 8
1.0.0.8 1.1.1.1 1132 0x80000001 0x566c 8
 
 
#show ip ospf database
 
OSPF Router with ID (3.1.1.1) (Process ID 1 VRF default)
 
Router Link States (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum Link count
3.1.1.1 3.1.1.1 1133 0x80000004 0xc60c 1
1.1.1.1 1.1.1.1 831 0x80000008 0xb9f2 2
 
Net Link States (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum
10.10.10.10 1.1.1.1 1135 0x80000001 0x18e5
 
Area-Local Opaque-LSA (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum Opaque ID
1.0.0.1 3.1.1.1 1132 0x80000001 0x2cf6 1
1.0.0.1 1.1.1.1 1133 0x80000001 0x2af6 1
1.0.0.8 3.1.1.1 1132 0x80000001 0x7d45 8
1.0.0.8 1.1.1.1 1133 0x80000001 0x566c 8
 
 
#show ip ospf database
 
OSPF Router with ID (3.1.1.1) (Process ID 1 VRF default)
 
Router Link States (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum Link count
3.1.1.1 3.1.1.1 1134 0x80000004 0xc60c 1
1.1.1.1 1.1.1.1 832 0x80000008 0xb9f2 2
 
Net Link States (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum
10.10.10.10 1.1.1.1 1136 0x80000001 0x18e5
 
Area-Local Opaque-LSA (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum Opaque ID
1.0.0.1 3.1.1.1 1133 0x80000001 0x2cf6 1
1.0.0.1 1.1.1.1 1134 0x80000001 0x2af6 1
1.0.0.8 3.1.1.1 1133 0x80000001 0x7d45 8
1.0.0.8 1.1.1.1 1134 0x80000001 0x566c 8
#
#show ip ospf database
 
OSPF Router with ID (3.1.1.1) (Process ID 1 VRF default)
 
Router Link States (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum Link count
3.1.1.1 3.1.1.1 1135 0x80000004 0xc60c 1
1.1.1.1 1.1.1.1 834 0x80000008 0xb9f2 2
 
Net Link States (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum
10.10.10.10 1.1.1.1 1137 0x80000001 0x18e5
 
Area-Local Opaque-LSA (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum Opaque ID
1.0.0.1 3.1.1.1 1134 0x80000001 0x2cf6 1
1.0.0.1 1.1.1.1 1135 0x80000001 0x2af6 1
1.0.0.8 3.1.1.1 1134 0x80000001 0x7d45 8
1.0.0.8 1.1.1.1 1135 0x80000001 0x566c 8
 
 
#show ip ospf database
 
OSPF Router with ID (3.1.1.1) (Process ID 1 VRF default)
 
Router Link States (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum Link count
3.1.1.1 3.1.1.1 1136 0x80000004 0xc60c 1
1.1.1.1 1.1.1.1 834 0x80000008 0xb9f2 2
 
Net Link States (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum
10.10.10.10 1.1.1.1 1138 0x80000001 0x18e5
 
Area-Local Opaque-LSA (Area 0.0.0.0)
 
Link ID ADV Router Age Seq# CkSum Opaque ID
1.0.0.1 3.1.1.1 1135 0x80000001 0x2cf6 1
1.0.0.1 1.1.1.1 1136 0x80000001 0x2af6 1
1.0.0.8 3.1.1.1 1135 0x80000001 0x7d45 8
1.0.0.8 1.1.1.1 1136 0x80000001 0x566c 8
 
Loop-Free Alternate Fast Reroute
This section contains basic OSPF Loop-Free Alternate Fast Reroute (LFA-FRR) configuration examples.
Overview
The goal of (LFA-FRR) is to reduce failure reaction time to 10s of milliseconds by using a pre-computed alternate next- hop in the event that the currently selected primary next-hop fails, so that the alternate can be rapidly used when the failure is detected. A network with this feature experiences less traffic loss and less micro-looping of packets than a network without LFA-FRR.
After enabling LFA-FRR on routers, routers calculate a backup path for each primary path to reach the destination.The backup path is calculated based on the attributes such as node protecting, link protecting, broadcast-link protecting and secondary path.
Topology
The diagram shows the configuration required to enable the OSPF LFA feature.
Figure 4-13: Basic OSPF-LFA Topology
R1
#configure terminal
Enter configure mode.
(config)#int eth1
Enter interface mode.
(config-if)#ip address 10.1.1.1/24
Configure the IP address of the interface
(config-if)#exit
Exit interface mode.
(config)#int eth2
Enter interface mode.
(config-if)#ip address 20.1.1.1/24
Configure the IP address of the interface.
(config-if)#exit
Exit interface mode.
(config)#int eth3
Enter interface mode.
(config-if)#ip address 30.1.1.1/24
Configure the IP address of the interface.
(config-if)#exit
Exit interface mode.
(config)#router ospf 1
Configure the routing process and specify the Process ID (1).
(config-router)#network 10.1.1.0/24 area 0
Define the interface (10.1.1.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area).
(config-router)#network 20.1.1.0/24 area 0
Define the interface (20.1.1.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area).
(config-router)#network 30.1.1.0/24 area 0
Define the interface (30.1.1.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area).
(config-router)#fast-reroute keep-all- paths
Configure LFA-FRR to calculate the available backup path.
(config-router)#end
Exit router mode.
 
R2
#configure terminal
Enter configure mode.
(config)#int eth1
Enter interface mode.
(config-if)#ip address 10.1.1.2/24
Configure the IP address of the interface
(config-if)#exit
Exit interface mode.
(config)#int eth2
Enter interface mode.
(config-if)#ip address 40.1.1.1/24
Configure the IP address of the interface.
(config-if)#exit
Exit interface mode.
(config)#router ospf 1
Configure the routing process, and specify the Process ID (1). The Process ID should be a unique positive integer identifying the routing process.
(config-router)#network 10.1.1.0/24 area 0
Define the interface (20.1.1.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area).
(config-router)#network 40.1.1.0/24 area 0
Define the interface (40.1.1.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area).
(config-router)#end
Exit router mode.
R3
#configure terminal
Enter configure mode.
(config)#int eth1
Enter interface mode.
(config-if)#ip address 20.1.1.2/24
Configure the IP address of the interface
(config-if)#exit
Exit interface mode.
(config)#int eth2
Enter interface mode.
(config-if)#ip address 50.1.1.1/24
Configure the IP address of the interface.
(config-if)#exit
Exit interface mode.
(config)#router ospf 1
Configure the routing process, and specify the Process ID (1). The Process ID should be a unique positive integer identifying the routing process.
(config-router)#network 20.1.1.0/24 area 0
Define the interface (20.1.1.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area).
(config-router)#network 50.1.1.0/24 area 0
Define the interface (50.1.1.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area).
(config-router)#end
Exit router mode.
 
 
R4
 
#configure terminal
Enter configure mode.
(config)#int eth1
Enter interface mode.
(config-if)#ip address 30.1.1.2/24
Configure the IP address of the interface
(config-if)#exit
Exit interface mode.
(config)#int eth2
Enter interface mode.
(config-if)#ip address 60.1.1.1/24
Configure the IP address of the interface.
(config-if)#exit
Exit interface mode.
(config)#router ospf 1
Configure the routing process, and specify the Process ID (1). The Process ID should be a unique positive integer identifying the routing process.
(config-router)#network 30.1.1.0/24 area 0
Define the interface (30.1.1.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area).
(config-router)#network 60.1.1.0/24 area 0
Define the interface (60.1.1.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area).
(config-router)#end
Exit router mode.
 
R5
#configure terminal
Enter configure mode.
(config)#int eth1
Enter interface mode.
(config-if)#ip address 40.1.1.2/24
Configure the IP address of the interface
(config-if)#exit
Exit interface mode.
(config)#int eth2
Enter interface mode.
(config-if)#ip address 50.1.1.1/24
Configure the IP address of the interface.
(config-if)#exit
Exit interface mode.
(config)#int eth3
Enter interface mode.
(config-if)#ip address 60.1.1.1/24
Configure the IP address of the interface.
(config-if)#exit
Exit interface mode.
(config)#router ospf 1
Configure the routing process, and specify the Process ID (1). The Process ID should be a unique positive integer identifying the routing process.
(config-router)#network 40.1.1.0/24 area 0
Define the interface (30.1.1.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area).
(config-router)#network 50.1.1.0/24 area 0
Define the interface (30.1.1.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area).
(config-router)#network 60.1.1.0/24 area 0
Define the interface (30.1.1.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area).
(config-router)#end
Exit router mode.
 
Validation
R1
 
Check OSPF neighborship.
#show ip ospf neighbor
OSPF Process 100 VRF (default)
Neighbor ID Pri State Dead Time Address Interface Intance ID
2.2.2.2 1 Full/DR 00:00:33 10.1.1.2 eth1 0
3.3.3.3 1 Full/DR 00:00:33 20.1.1.2 eth2 0
4.4.4.4 1 Full/DR 00:00:39 30.1.1.2 eth2 0
#
Check the OSPF route installation and LFA-FRR backup path for the primary path.
#show ip route
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter
area
* - candidate default
 
IP Route Table for VRF "default"
C 10.1.1.0/24 is directly connected, eth1
C 20.1.1.0/24 is directly connected, eth2
C 30.1.1.0/24 is directly connected, eth3
O 40.1.1.0/24 [110/10] via 10.1.1.2, eth1, 00:16:43
O 50.1.1.0/24 [110/15] via 20.1.1.2, eth2, 00:16:43
O IA 60.1.1.0/24 [110/15] via 10.1.1.2, eth1, 00:16:43
O E2 70.1.1.0/24 [110/20] via 30.1.1.2, eth3, 00:16:43
O E2 80.1.1.0/24 [110/20] via 10.1.1.2, eth1, 00:16:43
C 127.0.0.0/8 is directly connected, lo
C 192.168.100.0/24 is directly connected, eth0
Gateway of last resort is not set
 
Not mandatory that for all primary path, there exists an LFA backup path only if inequality equation satisfies according to attributes configured on routers, backup path will be calculated.
 
#show ip route fast-reroute
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area ,p - stale info
* - candidate default
 
IP Route Table for VRF "default"
O 50.1.1.0/24 [110/15] via 20.1.1.2, eth2, 00:00:34
[FRR-NH] via 10.1.1.2, eth1
 
O 60.1.1.0/24 [110/15] via 10.1.1.2, eth1, 00:00:34
[FRR-NH] via 20.1.1.2, eth2
 
O 70.1.1.0/24 [110/20] via 30.1.1.2, eth3, 00:02:27
[FRR-NH] via 10.1.1.2, eth1
 
O 80.1.1.0/24 [110/20] via 10.1.1.2, eth1, 00:02:27
[FRR-NH] via 20.1.1.2, eth2
 
Not mandatory that for all primary path, there exists an LFA backup path only if inequality equation satisfies according to attributes configured on routers, backup path will be calculated.
To prohibit an interface from being used as a repair path, disable fast reroute calculation on the interface.
(config)#int eth3
(config-if)#ip ospf fast-reroute per-prefix candidate disable
(config-if)#end
Verify that the eth3 interface is not used for backup path calculation.
#show ip route
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default
 
IP Route Table for VRF "default"
O 10.1.1.0/24 [110/10] via 20.1.1.1, eth1, 00:34:04
C 20.1.1.0/24 is directly connected, eth1
O 30.1.1.0/24 [110/20] via 20.1.1.1, eth1, 00:34:04
O 40.1.1.0/24 [110/15] via 20.1.1.1, eth1, 00:34:04
[110/15] via 50.1.1.2, eth2, 00:34:04
C 50.1.1.0/24 is directly connected, eth2
O IA 60.1.1.0/24 [110/15] via 50.1.1.2, eth2, 01:08:29
O E2 70.1.1.0/24 [110/20] via 20.1.1.1, eth1, 00:34:03
O E2 80.1.1.0/24 [110/20] via 50.1.1.2, eth2, 01:11:17
C 127.0.0.0/8 is directly connected, lo
C 192.168.100.0/24 is directly connected, eth0
#show ip route fast-reroute
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area ,p - stale info
* - candidate default
 
IP Route Table for VRF "default"
O 10.1.1.0/24 [110/10] via 20.1.1.1, eth1, 00:00:34
[FRR-NH] via 50.1.1.2, eth2
 
O 30.1.1.0/24 [110/20] via 20.1.1.1, eth1, 00:00:34
[FRR-NH] via 50.1.1.2, eth2
 
O 60.1.1.0/24 [110/15] via 50.1.1.2, eth2, 00:02:27
[FRR-NH] via 20.1.1.1, eth1
 
O 70.1.1.0/24 [110/20] via 20.1.1.1, eth1, 00:02:27
[FRR-NH] via 50.1.1.2, eth2
 
O 80.1.1.0/24 [110/20] via 50.1.1.2, eth2, 00:02:27
 
Note: Now the LFA backup paths have been changed, eth3 is not used.
 
LFA Tie-Breaker
Based on the index values configured, if inequalities are satisfied, protections will be provided:
Lower the index will have the highest priority, the path which provides protection with highest priority will be selected. If there are multiple paths providing the highest priority protection, then we will check which path provides the protection which has 2nd highest priority and so on.
If all the paths provide same priority, then the LFA route is chosen on the basis of path cost.
If none of the paths provides the protection with highest priority, then we will see which path provides the 2nd highest priority and so on.
config)#router ospf 100
(config-router)#fast-reroute tie-break ?
broadcast-interface-disjoint Prefer broadcast link protecting backup path
 
*Default value is 70
 
downstream-path Prefer backup path from downstream
 
*Default value is 90
 
interface-disjoint Prefer link protecting backup path
 
*Default value is 60
 
node-protecting Prefer node protecting backup path
 
*Default value is 30
 
primary-path Prefer backup path from ECMP set
 
*Default value is 20
 
secondary-path Prefer non-ECMP backup path
 
*Default value is 255
(config-router)#fast-reroute tie-break broadcast-interface-disjoint index 1
(config-router)#fast-reroute tie-break node-protecting index 2
Verify show ip route and show ip route fast-reroute for backup path calculated according to attributes configured above.
#show ip route
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter
area
* - candidate default
 
IP Route Table for VRF "default"
C 10.1.1.0/24 is directly connected, eth1
C 20.1.1.0/24 is directly connected, eth2
C 30.1.1.0/24 is directly connected, eth3
O 40.1.1.0/24 [110/10] via 10.1.1.2, eth1, 01:07:26
O 50.1.1.0/24 [110/15] via 20.1.1.2, eth2, 01:07:26
O IA 60.1.1.0/24 [110/15] via 10.1.1.2, eth1, 01:07:26
O E2 70.1.1.0/24 [110/20] via 30.1.1.2, eth3, 01:07:26
O E2 80.1.1.0/24 [110/20] via 10.1.1.2, eth1, 01:07:26
C 127.0.0.0/8 is directly connected, lo
C 192.168.100.0/24 is directly connected, eth0
 
Gateway of last resort is not set
#show ip route fast-reroute
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area ,p - stale info
* - candidate default
 
IP Route Table for VRF "default"
 
O 50.1.1.0/24 [110/15] via 20.1.1.2, eth2, 00:00:34
[FRR-NH] via 10.1.1.2, eth1
 
O 60.1.1.0/24 [110/15] via 10.1.1.2, eth1, 00:02:27
[FRR-NH] via 20.1.1.2, eth2
 
O 70.1.1.0/24 [110/20] via 30.1.1.2, eth3, 00:02:27
[FRR-NH] via 10.1.1.2, eth1
 
O 80.1.1.0/24 [110/20] via 10.1.1.2, eth1, 00:02:27
[FRR-NH] via 20.1.1.2, eth2
 
#show ip ospf route fast-reroute
 
OSPF process 0:
Codes: C - connected, D - Discard, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
OSPF LFA attributes:
P - Primary, SP - Secondary-Path, ID - Interface Disjoint,
NP - Node Protecting, BID - Broadcast Interface Disjoint
 
O 50.1.1.0/24 [15] via 20.1.1.1, eth2, Area 0.0.0.0
Backup path:
via 10.1.1.2, eth1, Area 0.0.0.0
Attributes: Metric: [20] ,LP ,NP, BP
O 60.1.1.0/24 [15] via 10.1.1.2, eth1, Area 0.0.0.0
Backup path:
via 20.1.1.2, eth2, Area 0.0.0.0
Attributes: Metric: [15] ,LP ,NP,BP
O 70.1.1.0/24 [20] via 30.1.1.2, eth3, Area 0.0.0.0
Backup path:
via 10.1.1.2, eth1, Area 0.0.0.0
Attributes: Metric: [20] ,LP ,NP,BP
O 80.1.1.0/24 [20] via 10.1.1.2, eth1, Area 0.0.0.0
Backup path:
via 20.1.1.2, eth2, Area 0.0.0.0
Attributes: Metric: [20] ,LP,NP,BP
LFA Termination
A router MUST limit the amount of time an alternate next-hop is used after the primary next-hop has become unavailable. This ensures that the router will start using the new primary next-hops.
LFA termination avoids a micro looping in topology, when particular network goes down, LFA backup path will be installed and if termination interval is configured, LFA backup will be still used till the interval and it is used in order to verify new primary path is loop free.
R1
Configure termination interval on R1 in router mode:
(config)#router ospf 1
Configure the routing process, and specify the Process ID (1). The Process ID should be a unique positive integer identifying the routing process.
(config-router)#fast-reroute terminate-hold-on interval 100000
Configure LFA termination interval
(config-router)#exit
Exit router mode.
(config)#exit
Exit config mode.
 
If you check "show ip ospf" you can see the configured termination-hold on interval value along with ospf output:
#show ip ospf
IPFRR per-prefix tiebreakers:
Name Index
Primary path 20
Node Protecting 30
Interface disjoint 60
Broadcast interface disjoint 70
Secondary path 255
LFA termination hold-on timer : 100 secs 0 msecs
 
#show ip route fast-reroute
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area ,p - stale info
* - candidate default
 
IP Route Table for VRF "default"
O 50.1.1.0/24 [110/15] via 20.1.1.2, eth2, 00:00:34
[FRR-NH] via 10.1.1.2, eth1
 
O 60.1.1.0/24 [110/15 via 10.1.1.2, eth1, 00:00:34
[FRR-NH] via 20.1.1.2, eth2
 
O 70.1.1.0/24 [110/20] via 30.1.1.2, eth3, 00:02:27
[FRR-NH] via 10.1.1.2, eth1
 
O 80.1.1.0/24 [110/20] via 10.1.1.2, eth1, 00:02:27
[FRR-NH] via 20.1.1.2, eth2
 
Shut down one of the primary nexthops, here eth2 of rtr1:
(config)#interface eth2
Enter interface mode.
(config-if)#shutdown
Shutdown the interface
(config-if)#exit
Exit interface mode
(config-if)#exit
Exit interface mode.
 
#show ip route fast-reroute
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area ,p - stale info
* - candidate default
 
IP Route Table for VRF "default"
O 50.1.1.0/24 [110/15] via 20.1.1.2, eth1, 00:00:34 <<<eth1 which was back-up path before got installed as new primary path
[FRR-NH] via 30.1.1.2, eth3
 
O 60.1.1.0/24 [110/15] via 10.1.1.2, eth1, 00:00:34
[FRR-NH] via 30.1.1.2, eth3
 
O 70.1.1.0/24 [110/20] via 30.1.1.2, eth3, 00:02:27
[FRR-NH] via 10.1.1.2, eth1
 
O 80.1.1.0/24 [110/20] via 10.1.1.2, eth1, 00:02:27
[FRR-NH] via 30.1.1.2, eth3
SNMP Support for Multiple Instance of OSPF Configuration
Overview
SNMP operation by default are tied to a specific OID which is unique. However protocol like OSPF can have multiple instances, and have different values of same parameters for different OSPF instances. To be able to support SNMP for each of these instances, it is needed that each instance of the protocol has its own instance of the MIBs. It is aimed to achieve that with mapping each instance to a context. Each context will point to a different copy of the same OID for the protocol.
Topology
SNMP OSPF instance
Enable SNMP and create SNMP Context & Group for OSPF Instances on a Router with SNMPv2
In this example, routers R1 & R2 are in Area 0, and all run OSPF. SNMPv2 user is created and Mapping of user with group and context for SNMPwalk /SNMP get operation on context.
R1
 
#configure terminal
Enter configure mode.
(config)#snmp-server enable snmp vrf management
Use this command to start the SNMP agent.
(config)#commit
Commit the candidate configuration to the running configuration
(config)#exit
Exit configure mode.
#configure terminal
Enter configure mode.
(config)#snmp-server context context1 vrf management
Creates SNMP Context with Context name.
(config)#snmp-server group group1 version 2c context context1 vrf management
Creates SNMP group with Group name and for specific context in SNMP v2 version.
(config)#snmp-server user user1 group1 vrf management
Creates SNMP User in SNMPv2 and attach user into a group
(config)#snmp-server community cm1 vrf management
Set community string as "cm1"
(config)#snmp-server community-map cm1 context context1 user user1 vrf management
Creates Community map SNMPv2 with community name mapping user with a context.
(config)#commit
Commit the candidate configuration to the running configuration
(config)#exit
Exit configure mode.
(config)#interface xe1
Enter interface mode for xe1.
(config-if)#ip address 94.94.94.3/24
Specify the IP address of the interface.
(config-if)#no shutdown
Activate the interface.
(config-if)#exit
Exit interface mode.
(config)#router ospf 100
Configure an OSPF instance with an instance ID of 100.
(config-router)#router-id 21.21.21.21
Configure the router ID to use on this instance.
(config-router)#network 94.94.94.0/24 area 0
Advertise the network with the area ID.
(config-router)#snmp context-name context1
SNMP Context is mapped with OSPF Instance
(config-router)#commit
Commit the candidate configuration to the running configuration.
R2
 
#configure terminal
Enter configure mode.
(config)#snmp-server enable snmp vrf management
Use this command to start the SNMP agent.
(config)#commit
Commit the candidate configuration to the running configuration
(config)#exit
Exit configure mode.
#configure terminal
Enter configure mode.
(config)#snmp-server context context1 vrf management
Creates SNMP Context with Context name.
(config)#snmp-server group group1 version 2c context context1 vrf management
Creates SNMP group with Group name and for specific context in SNMP v2 version.
(config)#snmp-server user user1 group1 vrf management
Creates SNMP User in SNMPv2 and attach user into a group
(config)#snmp-server community cm1 vrf management
Set community string as "cm1"
(config)#snmp-server community-map cm1 context context1 user user1 vrf management
Creates Community map SNMPv2 with community name mapping user with a context.
(config)#commit
Commit the candidate configuration to the running configuration
(config)#exit
Exit configure mode.
(config)#interface xe1
Enter interface mode for xe1.
(config-if)#ip address 94.94.94.2/24
Specify the IP address of the interface.
(config-if)#no shutdown
Activate the interface.
(config-if)#exit
Exit interface mode.
(config)#router ospf 100
Configure an OSPF instance with an instance ID of 100.
(config-router)#router-id 23.23.23.23
Configure the router ID to use on this instance.
(config-router)#network 94.94.94.0/24 area 0
Advertise the network with the area ID.
(config-router)#snmp context-name context1
SNMP Context is mapped with OSPF Instance
(config-router)#commit
Commit the candidate configuration to the running configuration.
Validation
R1
 
R1#sh running-config
!
! Software version: EC_AS7326-56X-OcNOS-5.1.194-DC-MPLS-S0-P0 04/20/2022 18:27:17
!
!Last configuration change at 12:56:57 UTC Fri Apr 22 2022 by ocnos
!
no service password-encryption
!
snmp-server enable traps link linkDown
snmp-server enable traps link linkUp
!
ip vrf management
!
hostname R1
!
feature telnet vrf management
no feature telnet
feature ssh vrf management
no feature ssh
snmp-server enable snmp vrf management
snmp-server view all .1 included vrf management
snmp-server context context1 vrf management
snmp-server group group1 version 2c context context1 vrf management
snmp-server user user1 group1 vrf management
snmp-server community cm1 vrf management
snmp-server community-map cm1 context context1 user user1 vrf management
 
!
interface ce1
!
interface ce2
!
interface eth0
ip vrf forwarding management
ip address dhcp
!
interface lo
ip address 127.0.0.1/8
ip address 21.21.21.21/32 secondary
ipv6 address ::1/128
!
interface lo.management
ip vrf forwarding management
ip address 127.0.0.1/8
ipv6 address ::1/128
!
interface xe1
ip address 94.94.94.3/24
!
interface xe2
!
interface xe3
!
interface xe4
!
interface xe5
!
interface xe6
!
interface xe7
!
interface xe8
!
interface xe9
!
router ospf 100
ospf router-id 21.21.21.21
snmp context-name context1
network 21.21.21.21/32 area 0.0.0.0
network 94.94.94.0/24 area 0.0.0.0
!
end
 
R1#
 
R1#show ip ospf neighbor
 
Total number of full neighbors: 1
OSPF process 100 VRF(default):
Neighbor ID Pri State Dead Time Address Interface
Instance ID
23.23.23.23 1 Full/ - 00:00:37 94.94.94.2 xe1
 
R1#sh snmp context
 
---------------------------------------------------------------------
context groups
---------------------------------------------------------------------
context1 group1
R1#
R2
 
R2#sh running-config
!
! Software version: EC_AS5912-54X-OcNOS-5.1.194-SP-MPLS-S0-P0 04/20/2022 18:28:57
!
!Last configuration change at 13:01:05 UTC Fri Apr 22 2022 by root
!
no service password-encryption
!
logging console 5
logging level all 5
snmp-server enable traps link linkDown
snmp-server enable traps link linkUp
!
hostname R2
bridge 1 protocol ieee vlan-bridge
feature telnet vrf management
no feature telnet
feature ssh vrf management
no feature ssh
snmp-server enable snmp vrf management
snmp-server view all .1 included vrf management
snmp-server context context1 vrf management
snmp-server group group1 version 2c context context1 vrf management
snmp-server user user1 group1 vrf management
snmp-server community cm1 vrf management
snmp-server community-map cm1 context context1 user user1 vrf management
feature ntp vrf management
ntp enable vrf management
!
interface ce49
!
interface ce50
!
interface ce51
!
interface eth0
ip vrf forwarding management
ip address dhcp
!
interface lo
ip address 127.0.0.1/8
ip address 23.23.23.23/32 secondary
ipv6 address ::1/128
!
interface lo.management
ip vrf forwarding management
ip address 127.0.0.1/8
ipv6 address ::1/128
!
interface xe1
ip address 94.94.94.2/24
!
interface xe3
!
interface xe4
!
interface xe5
!
interface xe6
!
interface xe7
!
interface xe8
!
interface xe9
!
interface xe10
!
router ospf 100
ospf router-id 23.23.23.23
snmp context-name context1
network 23.23.23.23/32 area 0.0.0.0
network 94.94.94.0/24 area 0.0.0.0
!
end
 
R2#
R2#sh snmp context
 
---------------------------------------------------------------------
context groups
---------------------------------------------------------------------
context1 group1
R2#
SNMP WALK Command
Perform snmpwalk as mentioned below with IPv4 address using SNMPv2
 
snmpwalk -v2c -c cm1 10.12.86.116 .1.3
 
 
[root@localhost ~]# snmpwalk -v2c -c cm1 10.12.86.116 .1.3
OSPF-MIB::ospfRouterId.0 = IpAddress: 23.23.23.23
OSPF-MIB::ospfAdminStat.0 = INTEGER: enabled(1)
OSPF-MIB::ospfVersionNumber.0 = INTEGER: version2(2)
OSPF-MIB::ospfExternLsaCount.0 = Gauge32: 0
OSPF-MIB::ospfExternLsaCksumSum.0 = INTEGER: 0
OSPF-MIB::ospfTOSSupport.0 = INTEGER: false(2)
OSPF-MIB::ospfOriginateNewLsas.0 = Counter32: 3
OSPF-MIB::ospfRxNewLsas.0 = Counter32: 14
OSPF-MIB::ospfExtLsdbLimit.0 = INTEGER: -1
OSPF-MIB::ospfMulticastExtensions.0 = INTEGER: 0
OSPF-MIB::ospfExitOverflowInterval.0 = INTEGER: 0
OSPF-MIB::ospfDemandExtensions.0 = INTEGER: false(2)
OSPF-MIB::ospfRFC1583Compatibility.0 = INTEGER: false(2)
OSPF-MIB::ospfOpaqueLsaSupport.0 = INTEGER: true(1)
OSPF-MIB::ospfReferenceBandwidth.0 = Gauge32: 100000 kilobits per second
OSPF-MIB::ospfRestartSupport.0 = INTEGER: plannedAndUnplanned(3)
OSPF-MIB::ospfRestartInterval.0 = INTEGER: 120 seconds
OSPF-MIB::ospfRestartStrictLsaChecking.0 = INTEGER: true(1)
OSPF-MIB::ospfRestartStatus.0 = INTEGER: notRestarting(1)
OSPF-MIB::ospfRestartAge.0 = Gauge32: 0 seconds
OSPF-MIB::ospfRestartExitReason.0 = INTEGER: none(1)
OSPF-MIB::ospfAsLsaCount.0 = Gauge32: 0
OSPF-MIB::ospfAsLsaCksumSum.0 = Gauge32: 0
OSPF-MIB::ospfStubRouterSupport.0 = INTEGER: false(2)
OSPF-MIB::ospfStubRouterAdvertisement.0 = INTEGER: doNotAdvertise(1)
OSPF-MIB::ospfDiscontinuityTime.0 = Timeticks: (0) 0:00:00.00
OSPF-MIB::ospfAreaId.0.0.0.0 = IpAddress: 0.0.0.0
OSPF-MIB::ospfAuthType.0.0.0.0 = INTEGER: none(0)
OSPF-MIB::ospfImportAsExtern.0.0.0.0 = INTEGER: importExternal(1)
OSPF-MIB::ospfSpfRuns.0.0.0.0 = Counter32: 5
OSPF-MIB::ospfAreaBdrRtrCount.0.0.0.0 = Gauge32: 0
OSPF-MIB::ospfAsBdrRtrCount.0.0.0.0 = Gauge32: 0
OSPF-MIB::ospfAreaLsaCount.0.0.0.0 = Gauge32: 6
OSPF-MIB::ospfAreaLsaCksumSum.0.0.0.0 = INTEGER: 199510
OSPF-MIB::ospfAreaSummary.0.0.0.0 = INTEGER: sendAreaSummary(2)
OSPF-MIB::ospfAreaStatus.0.0.0.0 = INTEGER: active(1)
OSPF-MIB::ospfAreaNssaTranslatorRole.0.0.0.0 = INTEGER: 0
OSPF-MIB::ospfAreaNssaTranslatorState.0.0.0.0 = INTEGER: 0
OSPF-MIB::ospfAreaNssaTranslatorStabilityInterval.0.0.0.0 = INTEGER: 40 seconds
OSPF-MIB::ospfAreaLsaCountNumber.0.0.0.0 = Gauge32: 6
OSPF-MIB::ospfAreaLsaCountNumber.0.0.0.0 = No more variables left in this MIB View (It is past the end of the MIB tree)
[root@localhost ~]#
Perform snmpwalk as mentioned below with IPv4 address using SNMPv2 for R2
snmpwalk -v2c -c cm1 10.12.86.111 .1.3
 
Enable SNMP and create SNMP Context & Group for OSPF Instances on a Router with SNMPv3 Configuration
In this example, routers R1 & R2 are in Area 0, and all run OSPF. SNMPv3 user is created and Mapping of user with group and context for SNMPwalk /SNMP get operation on context.
R1
 
#configure terminal
Enter configure mode.
(config)#snmp-server enable snmp vrf management
Use this command to start the SNMP agent.
(config)#commit
Commit the candidate configuration to the running configuration
(config)#exit
Exit configure mode.
#configure terminal
Enter configure mode.
(config)#snmp-server context context1 vrf management
Creates SNMP Context with Context name.
(config)#snmp-server group group2 version 3 auth context context1 vrf management
Creates SNMP group with Group name and for specific context in SNMP v3 version.
(config)#snmp-server user user2 group2 auth md5 password vrf management
Creates SNMP User in SNMPv3 and attach user into a group
(config)#commit
Commit the candidate configuration to the running configuration
(config)#exit
Exit configure mode.
(config)#interface xe1
Enter interface mode for xe1.
(config-if)#ip address 94.94.94.3/24
Specify the IP address of the interface.
(config-if)#no shutdown
Activate the interface.
(config-if)#exit
Exit interface mode.
(config)#router ospf 100
Configure an OSPF instance with an instance ID of 100.
(config-router)#router-id 21.21.21.21
Configure the router ID to use on this instance.
(config-router)#network 94.94.94.0/24 area 0
Advertise the network with the area ID.
(config-router)#snmp context-name context1
SNMP Context is mapped with OSPF Instance
(config-router)#commit
Commit the candidate configuration to the running configuration.
R2
 
#configure terminal
Enter configure mode.
(config)#snmp-server enable snmp vrf management
Use this command to start the SNMP agent.
(config)#commit
Commit the candidate configuration to the running configuration
(config)#exit
Exit configure mode.
#configure terminal
Enter configure mode.
(config)#snmp-server context context1 vrf management
Creates SNMP Context with Context name.
(config)#snmp-server group group2 version 3 auth context context1 vrf management
Creates SNMP group with Group name and for specific context in SNMP v3 version.
(config)#snmp-server user user2 group2 auth md5 password vrf management
Creates SNMP User in SNMPv2 and attach user into a group
(config)#commit
Commit the candidate configuration to the running configuration
(config)#exit
Exit configure mode.
(config)#interface xe1
Enter interface mode for xe1.
(config-if)#ip address 94.94.94.2/24
Specify the IP address of the interface.
(config-if)#no shutdown
Activate the interface.
(config-if)#exit
Exit interface mode.
(config)#router ospf 100
Configure an OSPF instance with an instance ID of 100.
(config-router)#router-id 23.23.23.23
Configure the router ID to use on this instance.
(config-router)#network 94.94.94.0/24 area 0
Advertise the network with the area ID.
(config-router)#snmp context-name context1
SNMP Context is mapped with OSPF Instance
(config-router)#commit
Commit the candidate configuration to the running configuration.
Validation
R1
 
R1#sh running-config
!
! Software version: EC_AS7326-56X-OcNOS-5.1.194-DC-MPLS-S0-P0 04/20/2022 18:27:1
7
!
!Last configuration change at 14:06:07 UTC Fri Apr 22 2022 by root
!
no service password-encryption
!
snmp-server enable traps link linkDown
snmp-server enable traps link linkUp
!
ip vrf management
!
hostname R1
ip name-server vrf management 10.12.3.23
feature telnet vrf management
no feature telnet
feature ssh vrf management
no feature ssh
snmp-server enable snmp vrf management
snmp-server view all .1 included vrf management
snmp-server context context1 vrf management
snmp-server group grp2 version 3 auth context context2 vrf management
snmp-server user user2 grp2 auth md5 encrypt 0x2eaaa9043312c907 vrf management
feature ntp vrf management
ntp enable vrf management
feature rsyslog vrf management
!
interface ce49
!
interface ce50
!
interface ce51
!
interface ce52
!
interface ce53
!
interface ce54
!
interface ce55
!
interface ce56
!
interface eth0
ip vrf forwarding management
ip address dhcp
!
interface lo
ip address 127.0.0.1/8
ip address 21.21.21.21/32 secondary
ipv6 address ::1/128
!
interface lo.management
ip vrf forwarding management
ip address 127.0.0.1/8
ipv6 address ::1/128
!
interface xe1
ip address 94.94.94.3/24
!
interface xe2
!
interface xe3
!
interface xe4
!
interface xe5
!
interface xe6
!
interface xe7
!
interface xe8
!
interface xe9
!
interface xe10
!
router ospf 100
ospf router-id 21.21.21.21
snmp context-name context1
network 21.21.21.21/32 area 0.0.0.0
network 94.94.94.0/24 area 0.0.0.0
!
line console 0
exec-timeout 0 0
line vty 0 871
exec-timeout 0 0
privilege level 16
!
!
end
 
R1#
R2
 
R2# sh run
!
! Software version: EC_AS5912-54X-OcNOS-5.1.194-SP-MPLS-S0-P0 04/20/2022 18:28:5
7
!
!Last configuration change at 14:28:48 UTC Fri Apr 22 2022 by root
!
no service password-encryption
!
logging console 5
logging level all 5
snmp-server enable traps link linkDown
snmp-server enable traps link linkUp
!
hostname R2
no ip domain-lookup
ip domain-lookup vrf management
feature telnet vrf management
no feature telnet
feature ssh vrf management
no feature ssh
snmp-server enable snmp vrf management
snmp-server view all .1 included vrf management
snmp-server context context1 vrf management
snmp-server group group2 version 3 auth context context1 vrf management
snmp-server user user2 group2 auth md5 encrypt 0x2eaaa9043312c907 vrf management
feature ntp vrf management
ntp enable vrf management
feature rsyslog vrf management
!
interface ce49
!
interface ce50
!
interface ce51
!
interface ce52
!
interface ce53
!
interface ce54
!
interface eth0
ip vrf forwarding management
ip address dhcp
!
interface lo
ip address 127.0.0.1/8
ip address 23.23.23.23/32 secondary
ipv6 address ::1/128
!
interface lo.management
ip vrf forwarding management
ip address 127.0.0.1/8
ipv6 address ::1/128
!
interface xe1
ip address 94.94.94.2/24
!
interface xe2
!
interface xe3
!
interface xe4
!
interface xe5
!
interface xe6
!
interface xe7
!
interface xe8
!
interface xe9
!
interface xe10
!
router ospf 100
ospf router-id 23.23.23.23
bfd all-interfaces
network 23.23.23.23/32 area 0.0.0.0
network 91.91.91.0/24 area 0.0.0.0
network 94.94.94.0/24 area 0.0.0.0
network 96.96.96.0/24 area 0.0.0.0
!
!
end
 
R2#
SNMP WALK Command
Perform snmpwalk as mentioned below with IPv4 address using SNMPv3 of R2
 
snmpwalk -v 3 -u user2 -l auth -r 0 -t 10 -n "context1" -a MD5 -A password 10.12.86.116 iso.3.6.1.2.1
 
[root@localhost ~]# snmpwalk -v 3 -u user2 -l auth -r 0 -t 10 -n "context1" -a MD5 -A password 10.12.86.116 iso.3.6.1.2.1
OSPF-MIB::ospfRouterId.0 = IpAddress: 23.23.23.23
OSPF-MIB::ospfAdminStat.0 = INTEGER: enabled(1)
OSPF-MIB::ospfVersionNumber.0 = INTEGER: version2(2)
OSPF-MIB::ospfExternLsaCount.0 = Gauge32: 0
OSPF-MIB::ospfExternLsaCksumSum.0 = INTEGER: 0
OSPF-MIB::ospfTOSSupport.0 = INTEGER: false(2)
OSPF-MIB::ospfOriginateNewLsas.0 = Counter32: 3
OSPF-MIB::ospfRxNewLsas.0 = Counter32: 7
OSPF-MIB::ospfExtLsdbLimit.0 = INTEGER: -1
OSPF-MIB::ospfMulticastExtensions.0 = INTEGER: 0
OSPF-MIB::ospfExitOverflowInterval.0 = INTEGER: 0
OSPF-MIB::ospfDemandExtensions.0 = INTEGER: false(2)
OSPF-MIB::ospfRFC1583Compatibility.0 = INTEGER: false(2)
OSPF-MIB::ospfOpaqueLsaSupport.0 = INTEGER: true(1)
OSPF-MIB::ospfReferenceBandwidth.0 = Gauge32: 100000 kilobits per second
OSPF-MIB::ospfRestartSupport.0 = INTEGER: plannedAndUnplanned(3)
OSPF-MIB::ospfRestartInterval.0 = INTEGER: 120 seconds
OSPF-MIB::ospfRestartStrictLsaChecking.0 = INTEGER: true(1)
OSPF-MIB::ospfRestartStatus.0 = INTEGER: notRestarting(1)
OSPF-MIB::ospfRestartAge.0 = Gauge32: 0 seconds
OSPF-MIB::ospfRestartExitReason.0 = INTEGER: none(1)
OSPF-MIB::ospfAsLsaCount.0 = Gauge32: 0
OSPF-MIB::ospfAsLsaCksumSum.0 = Gauge32: 0
OSPF-MIB::ospfStubRouterSupport.0 = INTEGER: false(2)
OSPF-MIB::ospfStubRouterAdvertisement.0 = INTEGER: doNotAdvertise(1)
OSPF-MIB::ospfDiscontinuityTime.0 = Timeticks: (0) 0:00:00.00
OSPF-MIB::ospfAreaId.0.0.0.0 = IpAddress: 0.0.0.0
OSPF-MIB::ospfAuthType.0.0.0.0 = INTEGER: none(0)
OSPF-MIB::ospfAreaLsaCountNumber.0.0.0.0 = No more variables left in this MIB View (It is past the end of the MIB tree)
[root@localhost ~]#
Perform snmpwalk as mentioned below with IPv4 address using SNMPv3 for R1.
snmpwalk -v 3 -u user2 -l auth -r 0 -t 10 -n "context1" -a MD5 -A password 10.12.86.111 iso.3.6.1.2.1
Enable SNMP and create SNMP Context & Group for Multiple OSPF Instances on a Router with SNMPv2/v3
In this example, routers R1, R2 & R3 are in Area 0, and all run OSPF. SNMPv2/v3 user is created and Mapping of user with group and context for SNMPwalk /SNMP get operation on context.
Topology
SNMP OSPF multiple instance
Configurations
R1
 
#configure terminal
Enter configure mode.
(config)#snmp-server enable snmp vrf management
Use this command to start the SNMP agent.
(config)#commit
Commit the candidate configuration to the running configuration
(config)#exit
Exit configure mode.
#configure terminal
Enter configure mode.
(config)#snmp-server context context1 vrf management
Creates SNMP Context with Context name.
(config)#snmp-server group group1 version 2c context context1 vrf management
Creates SNMP group with Group name and for specific context in SNMP v2 version.
(config)#snmp-server group group2 version 3 auth context context1 vrf ma
Creates SNMP group with Group name and for specific context in SNMP v3 version
(config)#snmp-server user user1 group1 vrf management
Creates SNMP User in SNMPv2 and attach user into a group
(config)#snmp-server user user2 group2 auth md5 password vrf management
Creates SNMP User in SNMPv3 and attach user into a group
(config)#snmp-server community cm1 vrf management
Set community string as "cm1"
(config)#snmp-server community-map cm1 context context1 user user1 vrf management
Creates Community map SNMPv2 with community name mapping user with a context.
(config)#commit
Commit the candidate configuration to the running configuration
(config)#exit
Exit configure mode.
(config)#interface xe1
Enter interface mode for xe1.
(config-if)#ip address 94.94.94.3/24
Specify the IP address of the interface.
(config-if)#no shutdown
Activate the interface.
(config-if)#exit
Exit interface mode.
(config)#router ospf 100
Configure an OSPF instance with an instance ID of 100.
(config-router)#router-id 21.21.21.21
Configure the router ID to use on this instance.
(config-router)#network 94.94.94.0/24 area 0
Advertise the network with the area ID.
(config-router)#snmp context-name context1
SNMP Context is mapped with OSPF Instance
(config-router)#commit
Commit the candidate configuration to the running configuration.
R2
 
#configure terminal
Enter configure mode.
(config)#snmp-server enable snmp vrf management
Use this command to start the SNMP agent.
(config)#commit
Commit the candidate configuration to the running configuration
(config)#exit
Exit configure mode.
#configure terminal
Enter configure mode.
(config)#snmp-server context context1 vrf management
Creates SNMP Context with Context name "context1".
(config)#snmp-server context context2 vrf management
Creates SNMP Context with Context name"context2".
(config)#snmp-server group group1 version 3 auth context context1 vrf management
Creates SNMP group with Group name and for context 1 in SNMP v3 version.
(config)#snmp-server group group1 version 3 auth context context2 vrf management
Creates SNMP group with Group name and for context 2 in SNMP v3 version.
(config)#snmp-server user user1 group1 auth md5 password vrf management
Creates SNMP User in SNMPv3 and attach user into a group
(config)#commit
Commit the candidate configuration to the running configuration
(config)#exit
Exit configure mode.
(config)#interface xe1
Enter interface mode for xe1.
(config-if)#ip address 94.94.94.2/24
Specify the IP address of the interface.
(config-if)#no shutdown
Activate the interface.
(config-if)#exit
Exit interface mode.
(config)#interface xe2
Enter interface mode for xe2.
(config-if)#ip address 10.1.2.2/24
Specify the IP address of the interface.
(config-if)#no shutdown
Activate the interface.
(config-if)#exit
Exit interface mode.
(config)#router ospf 100
Configure an OSPF instance with an instance ID of 100.
(config-router)#router-id 23.23.23.23
Configure the router ID to use on this instance.
(config-router)#network 94.94.94.0/24 area 0
Advertise the network with the area ID.
(config-router)#snmp context-name context1
SNMP Context is mapped with OSPF Instance
(config-router)#commit
Commit the candidate configuration to the running configuration.
(config)#router ospf 200
Configure an OSPF instance with an instance ID of 200.
(config-router)#router-id 24.24.24.24
Configure the router ID to use on this instance.
(config-router)#network 10.1.2.0/24 area 0
Advertise the network with the area ID.
(config-router)#snmp context-name context2
SNMP Context is mapped with OSPF Instance
(config-router)#commit
Commit the candidate configuration to the running configuration.
R3
 
#configure terminal
Enter configure mode.
(config)#snmp-server enable snmp vrf management
Use this command to start the SNMP agent.
(config)#commit
Commit the candidate configuration to the running configuration
(config)#exit
Exit configure mode.
#configure terminal
Enter configure mode.
(config)#snmp-server context context2 vrf management
Creates SNMP Context with Context name.
(config)#snmp-server group group1 version 2c context context2 vrf management
Creates SNMP group with Group name and for specific context in SNMP v2 version.
(config)#snmp-server group group2 version 3 auth context context2 vrf management
Creates SNMP group with Group name and for specific context in SNMP v3 version
(config)#snmp-server user user1 group1 vrf management
Creates SNMP User in SNMPv2 and attach user into a group
(config)#snmp-server user user2 group2 auth md5 password vrf management
Creates SNMP User in SNMPv3 and attach user into a group
(config)#snmp-server community cm1 vrf management
Set community string as "cm1"
(config)#snmp-server community-map cm1 context context1 user user1 vrf management
Creates Community map SNMPv2 with community name mapping user with a context.
(config)#commit
Commit the candidate configuration to the running configuration
(config)#exit
Exit configure mode.
(config)#interface xe2
Enter interface mode for xe2.
(config-if)#ip address 10.1.2.3/24
Specify the IP address of the interface.
(config-if)#no shutdown
Activate the interface.
(config-if)#exit
Exit interface mode.
(config)#router ospf 200
Configure an OSPF instance with an instance ID of 200.
(config-router)#router-id 24.24.24.24
Configure the router ID to use on this instance.
(config-router)#network 10.1.2.0/24 area 0
Advertise the network with the area ID.
(config-router)#snmp context-name context2
SNMP Context is mapped with OSPF Instance
(config-router)#commit
Commit the candidate configuration to the running configuration.
Validation
R1
 
R1#show run
!
! Software version: EC_AS7326-56X-OcNOS-5.1.194-DC-MPLS-S0-P0 04/20/2022 18:27:1
7
!
!Last configuration change at 15:10:23 UTC Fri Apr 22 2022 by root
!
no service password-encryption
!
snmp-server enable traps link linkDown
snmp-server enable traps link linkUp
!
ip vrf management
!
hostname R1
no ip domain-lookup
ip domain-lookup vrf management
ip name-server vrf management 10.12.3.23
tfo Disable
errdisable cause stp-bpdu-guard
feature telnet vrf management
no feature telnet
feature ssh vrf management
no feature ssh
snmp-server enable snmp vrf management
snmp-server view all .1 included vrf management
snmp-server context context1 vrf management
snmp-server group grp1 version 2c context context1 vrf management
snmp-server group grp2 version 3 auth context context1 vrf management
snmp-server user user1 grp1 vrf management
snmp-server user user2 grp2 auth md5 encrypt 0x2eaaa9043312c907 vrf management
snmp-server community cx1 vrf management
snmp-server community-map cx1 context context1 user user1 vrf management
feature ntp vrf management
ntp enable vrf management
feature rsyslog vrf management
!
interface ce49
!
interface ce50
!
interface ce51
!
interface ce52
!
interface ce53
!
interface ce54
!
interface ce55
!
interface ce56
!
interface eth0
ip vrf forwarding management
ip address dhcp
!
interface lo
ip address 127.0.0.1/8
ip address 21.21.21.21/32 secondary
ipv6 address ::1/128
!
interface lo.management
ip vrf forwarding management
ip address 127.0.0.1/8
ipv6 address ::1/128
!
interface xe1
ip address 94.94.94.3/24
!
interface xe2
!
interface xe3
!
interface xe4
!
interface xe5
!
interface xe6
 
interface xe7
!
interface xe8
!
interface xe9
!
interface xe10
!
router ospf 100
ospf router-id 21.21.21.21
snmp context-name context1
network 21.21.21.21/32 area 0.0.0.0
network 94.94.94.0/24 area 0.0.0.0
!
line console 0
exec-timeout 0 0
line vty 0 871
exec-timeout 0 0
privilege level 16
!
!
end
 
R1#
 
R2
 
R2(config)#show run
!
! Software version: EC_AS5912-54X-OcNOS-5.1.194-SP-MPLS-S0-P0 04/20/2022 18:28:5
7
!
!Last configuration change at 15:19:14 UTC Fri Apr 22 2022 by ocnos
!
no service password-encryption
!
logging console 5
logging level all 5
snmp-server enable traps link linkDown
snmp-server enable traps link linkUp
!
p vrf management
!
hostname R2
no ip domain-lookup
ip domain-lookup vrf management
feature telnet vrf management
no feature telnet
feature ssh vrf management
no feature ssh
snmp-server enable snmp vrf management
snmp-server view all .1 included vrf management
snmp-server context context1 vrf management
snmp-server context context2 vrf management
snmp-server group group1 version 3 auth context context1 vrf management
snmp-server group group1 version 3 auth context context2 vrf management
snmp-server user user1 group1 auth md5 encrypt 0x2eaaa9043312c907 vrf management
feature ntp vrf management
ntp enable vrf management
feature rsyslog vrf management
!
interface ce49
!
interface ce50
!
interface ce51
!
interface ce52
!
interface ce53
!
interface ce54
!
interface eth0
ip vrf forwarding management
ip address dhcp
!
interface lo
ip address 127.0.0.1/8
ip address 23.23.23.23/32 secondary
ipv6 address ::1/128
!
interface lo.management
ip vrf forwarding management
ip address 127.0.0.1/8
ipv6 address ::1/128
!
interface xe1
ip address 94.94.94.2/24
!
interface xe2
ip address 10.1.2.2/24
!
interface xe3
!
interface xe4
!
interface xe5
!
interface xe6
!
interface xe7
!
interface xe8
!
interface xe9
!
interface xe10
!
router ospf 100
ospf router-id 23.23.23.23
snmp context-name context1
network 23.23.23.23/32 area 0.0.0.0
network 94.94.94.0/24 area 0.0.0.0
!
router ospf 200
snmp context-name context2
network 10.1.2.0/24 area 0.0.0.0
!
end
 
R2#
R3
 
R3#show run
!
! Software version: EC_AS7316-26XB-OcNOS-5.1.194-SP-CSR-S0-P0 04/20/2022 18:28:5
9
!
!Last configuration change at 11:05:18 UTC Mon Feb 25 2019 by ocnos
!
no service password-encryption
!
snmp-server enable traps link linkDown
snmp-server enable traps link linkUp
!
ip vrf management
!
hostname R3
no ip domain-lookup
ip domain-lookup vrf management
tfo Disable
errdisable cause stp-bpdu-guard
feature telnet vrf management
no feature telnet
feature ssh vrf management
no feature ssh
snmp-server enable snmp vrf management
snmp-server view all .1 included vrf management
snmp-server context context2 vrf management
snmp-server group group2 version 3 auth context context2 vrf management
snmp-server group group1 version 2c context context2 vrf management
snmp-server user user2 group2 auth md5 encrypt 0x2eaaa9043312c907 vrf management
snmp-server user user1 group1 vrf management
snmp-server community cx1 vrf management
snmp-server community-map cx1 context context2 user user1 vrf management
feature ntp vrf management
ntp enable vrf management
feature rsyslog vrf management
!
interface ce0
!
interface ce1
!
interface eth0
ip vrf forwarding management
ip address 192.168.3.10/24
!
interface lo
ip address 127.0.0.1/8
ip address 24.24.24.24/24 secondary
ipv6 address ::1/128
!
interface lo.management
ip vrf forwarding management
ip address 127.0.0.1/8
ipv6 address ::1/128
!
interface xe0
!
interface xe1
!
interface xe2
ip address 10.1.2.3/24
!
interface xe3
!
interface xe4
!
interface xe5
!
interface xe6
!
interface xe7
!
interface xe8
!
interface xe9
!
interface xe10
!
router ospf 200
ospf router-id 24.24.24.24
snmp context-name context2
network 10.1.2.0/24 area 0.0.0.0
network 24.24.24.0/24 area 0.0.0.0
!
!
end
 
R3#
 
SNMP WALK Command
Perform snmpwalk as mentioned below with IPv4 address using SNMPv3 for R1:
snmpwalk -v 3 -u user2 -l auth -r 0 -t 10 -n "context1" -a MD5 -A password 10.12.86.111 iso.3.6.1.2.1
Perform snmpwalk as mentioned below with IPv4 address using SNMPv2/SNMPv3 for R2:
snmpwalk -v 3 -u user1 -l auth -r 0 -t 10 -n "context2" -a MD5 -A password 10.12.86.116 iso.3.6.1.2.1
Perform snmpwalk as mentioned below with IPv4 address using SNMPv3 for R3:
snmpwalk -v 3 -u user2 -l auth -r 0 -t 10 -n "context2" -a MD5 -A password 10.12.86.132 iso.3.6.1.2.1
OSPF Stub Router Advertisement
The OSPF Stub router feature lets you to prevent a new router in any network from being used as a transit router.
This feature enables the new router to originate link-state advertisement(LSAs) with a maximum metric, thereby causing other routers in the network to prefer alternate-paths instead of using the new router as a transit path to forward traffic. Thereby this feature allows switching and routing functions to be up and running and routing tables to converge before transit traffic is routed again through this new router
Also a startup timer can be configured on this new router enabling it to advertise a maximum metric when the router is started or reloaded
The configuration given below enables the router R3 to advertise router-LSAs/summary-LSAs with maximum metric two routers in Area 0 connecting to network 10.10.10.0/24.
Note: Configure one interface so that it belongs to only one area. It is possible, however, to configure different interfaces on a router to belong to different areas.
Topology
OSPF Stub Router Advertisement Topology
 
 
Configuration
R1
 
#configure terminal
Enter configure mode
(config)#router ospf 1
Configure the routing process, and specify the Process ID (1). The Process ID should be a unique positive integer identifying the routing process.
(config)#ospf router-id 1.1.1.1
Configure the OSPF router-id
(config-router)#network 10.1.2.0/24 area 0
Define the interface (10.1.2.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area).
(config-router)#network 10.1.3.0/24 area 0
Define the interface (10.1.3.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area).
(config-router)#exit
Exit router mode
(config)#interface eth1
Enter the interface configuration mode for interface eth1
(config-if)#ip ospf cost 10
Configure the OSPF cost for the interface
(config-if)#exit
Exit the interface configuration mode
(config)#commit
Commit the candidate configuration to the running configuration.
R2
 
#configure terminal
Enter configure mode
(config)#router ospf 1
Configure the routing process, and specify the Process ID (1). The Process ID should be a unique positive integer identifying the routing process.
(config)#ospf router-id 1.1.1.2
Configure the OSPF router-id
(config-router)#network 10.1.2.0/24 area 0
Define the interface (10.1.2.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area).
(config-router)#network 10.2.4.0/24 area 1
Define the interface (10.2.4.0/24) on which OSPF runs, and associate the area ID (1) with the interface
(config-router)#exit
Exit router mode
(config)#commit
Commit the candidate configuration to the running configuration.
R3
 
#configure terminal
Enter configure mode
(config)#router ospf 1
Configure the routing process, and specify the Process ID (1). The Process ID should be a unique positive integer identifying the routing process.
(config)#ospf router-id 1.1.1.3
Configure the OSPF router-id
(config-router)#network 1.1.1.3/32 area 0
Define the interface (1.1.1.3/32) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area).
(config-router)#network 10.1.3.0/24 area 0
Define the interface (10.1.3.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area).
(config-router)#network 10.3.4.0/24 area 1
Define the interface (10.3.4.0/24) on which OSPF runs, and associate the area ID (1) with the interface
(config-router)#max-metric router-lsa include-stub summary-lsa 100
Configure the router to advertise max-metric for router-LSAs, for stub-networks of router-LSAs and to advertise a metric value of 100 for summary-LSAs
(config-router)# max-metric router-lsa on-startup 300 include-stub summary-lsa 222
Configure the router to advertise max-metric for router-LSAs, for stub-networks of router-LSAs and to advertise a metric value of 222 for summary-LSAs on-startup
(config-router)#exit
Exit router mode
(config)#commit
Commit the candidate configuration to the running configuration.
R4
 
#configure terminal
Enter configure mode
(config)#router ospf 1
Configure the routing process, and specify the Process ID (1). The Process ID should be a unique positive integer identifying the routing process.
(config)#ospf router-id 1.1.1.4
Configure the OSPF router-id
(config-router)#network 10.2.4.0/24 area 1
Define the interface (10.2.4.0/24) on which OSPF runs, and associate the area ID (1) with the interface
(config-router)#network 10.3.4.0/24 area 1
Define the interface (10.3.4.0/24) on which OSPF runs, and associate the area ID (1) with the interface
(config-router)#network 200.1.1.0/24 area 1
Define the interface (200.1.1.0/24) on which OSPF runs, and associate the area ID (1) with the interface
(config-router)#exit
Exit router mode
(config)#commit
Commit the candidate configuration to the running configuration.
Validation
R3
R3#show running-config ospf
!
router ospf 1
ospf router-id 1.1.1.3
max-metric router-lsa include-stub summary-lsa 100
max-metric router-lsa on-startup 300 include-stub summary-lsa 222
network 1.1.1.3/32 area 0.0.0.0
network 10.1.3.0/24 area 0.0.0.0
network 10.3.4.0/24 area 0.0.0.1
!
R3#
 
 
R3#show ip ospf
Routing Process "ospf 1" with ID 1.1.1.3
Process uptime is 1 hour 20 minutes
Process bound to VRF default
Conforms to RFC2328, and RFC1583 Compatibility flag is disabled
Supports only single TOS(TOS0) routes
Supports opaque LSA
Originating router-LSAs with maximum metric
Condition: always State: active
Advertise stub links with maximum metric in router-LSAs
Advertise summary-LSAs with metric 100
Condition: on start-up for 300 seconds State: Inactive
Advertise stub links with maximum metric in router-LSAs
Advertise summary-LSAs with metric 222
Supports Graceful Restart
This router is an ABR, ABR Type is Alternative Cisco (RFC3509)
SPF schedule delay initial 0 secs 500 msecs
SPF schedule delay min 0 secs 500 msecs
SPF schedule delay max 50 secs 0 msecs
Refresh timer 10 secs
Number of incoming current DD exchange neighbors 0/64
Number of outgoing current DD exchange neighbors 0/64
Initial LSA throttle delay 0 secs 0 msecs
Minimum hold time for LSA throttle 5 secs 0 msecs
Maximum wait time for LSA throttle 5 secs 0 msecs
Minimum LSA arrival 1 secs 0 msecs
Number of external LSA 0. Checksum 0x000000
Number of opaque AS LSA 0. Checksum 0x000000
Number of non-default external LSA 0
External LSA database is unlimited.
Number of LSA originated 17
Number of LSA received 98
IPFRR per-prefix tiebreakers:
Name Index
Primary path 20
Node Protecting 30
Interface disjoint 60
Broadcast interface disjoint 70
Downstream path 90
Secondary path 255
LFA termination hold-on timer : 0 secs 600 msecs
Number of areas attached to this router: 2
MemPool - struct ospf lsa : (0-38) | Total (38/100000) blk_size:168
MemPool - struct rxmt : | Total (0/0) blk_size:8
MemPool - OSPF RIB msg4 : | Total (0/0) blk_size:2920
MemPool - OSPF RIB msg4 nh 1 : | Total (0/0) blk_size:24
MemPool - OSPF RIB msg4 nh 2 : | Total (0/0) blk_size:48
MemPool - OSPF RIB msg4 nh 4 : | Total (0/0) blk_size:96
MemPool - OSPF RIB msg4 nh 8 : | Total (0/0) blk_size:192
MemPool - OSPF RIB msg4 nh 16 : | Total (0/0) blk_size:384
MemPool - OSPF RIB msg4 nh 32 : | Total (0/0) blk_size:768
MemPool - OSPF RIB msg4 nh 64 : | Total (0/0) blk_size:1536
MemPool - OSPF RIB msg4 nh 128 : | Total (0/0) blk_size:3072
MemPool - OSPF RIB msg4 nh 255 : | Total (0/0) blk_size:6120
Area 0.0.0.0 (BACKBONE)
Number of interfaces in this area is 2(2)
Number of fully adjacent neighbors in this area is 1
Area has no authentication
SPF algorithm last executed 00:03:05.287 ago
SPF algorithm executed 12 times
Number of LSA 18. Checksum 0x070234
Area 0.0.0.1
Number of interfaces in this area is 1(1)
Number of fully adjacent neighbors in this area is 1
Number of fully adjacent virtual neighbors through this area is 0
Area has no authentication
SPF algorithm last executed 00:03:34.838 ago
SPF algorithm executed 7 times
Number of LSA 18. Checksum 0x09c738
 
R3#
 
 
R3#show ip ospf database router self-originate
 
OSPF Router with ID (1.1.1.3) (Process ID 1 VRF default)
 
Router Link States (Area 0.0.0.0)
 
LS age: 188
Options: 0x22 (-|-|DC|-|-|-|E|-)
Flags: 0x1 : ABR
LS Type: Router-LSA
Link State ID: 1.1.1.3
Advertising Router: 1.1.1.3
LS Seq Number: 8000000b
Checksum: 0x9c4b
Length: 48
Number of Links: 2
 
Link connected to: Stub Network
(Link ID) Network/subnet number: 1.1.1.3
(Link Data) Network Mask: 255.255.255.255
Number of TOS metrics: 0
TOS 0 Metric: 65535
 
Link connected to: a Transit Network
(Link ID) Designated Router address: 10.1.3.1
(Link Data) Router Interface address: 10.1.3.2
Number of TOS metrics: 0
TOS 0 Metric: 65535
 
 
Router Link States (Area 0.0.0.1)
 
LS age: 188
Options: 0x22 (-|-|DC|-|-|-|E|-)
Flags: 0x1 : ABR
LS Type: Router-LSA
Link State ID: 1.1.1.3
Advertising Router: 1.1.1.3
LS Seq Number: 8000000c
Checksum: 0xc531
Length: 36
Number of Links: 1
 
Link connected to: a Transit Network
(Link ID) Designated Router address: 10.3.4.2
(Link Data) Router Interface address: 10.3.4.1
Number of TOS metrics: 0
TOS 0 Metric: 65535
 
R3#
 
 
R3#show ip ospf database summary self-originate
 
OSPF Router with ID (1.1.1.3) (Process ID 1 VRF default)
 
Summary Link States (Area 0.0.0.0)
 
LS age: 204
Options: 0x22 (-|-|DC|-|-|-|E|-)
LS Type: Summary-LSA
Link State ID: 10.2.4.0 (summary Network Number)
Advertising Router: 1.1.1.3
LS Seq Number: 80000009
Checksum: 0x7446
Length: 28
Network Mask: /24
TOS: 0 Metric: 100
 
LS age: 204
Options: 0x22 (-|-|DC|-|-|-|E|-)
LS Type: Summary-LSA
Link State ID: 10.3.4.0 (summary Network Number)
Advertising Router: 1.1.1.3
LS Seq Number: 80000008
Checksum: 0x6a50
Length: 28
Network Mask: /24
TOS: 0 Metric: 100
 
LS age: 204
Options: 0x22 (-|-|DC|-|-|-|E|-)
LS Type: Summary-LSA
Link State ID: 200.1.1.0 (summary Network Number)
Advertising Router: 1.1.1.3
LS Seq Number: 80000009
Checksum: 0xf10e
Length: 28
Network Mask: /24
TOS: 0 Metric: 100
 
 
Summary Link States (Area 0.0.0.1)
 
LS age: 204
Options: 0x22 (-|-|DC|-|-|-|E|-)
LS Type: Summary-LSA
Link State ID: 1.1.1.3 (summary Network Number)
Advertising Router: 1.1.1.3
LS Seq Number: 80000008
Checksum: 0xfaca
Length: 28
Network Mask: /32
TOS: 0 Metric: 100
 
LS age: 203
Options: 0x22 (-|-|DC|-|-|-|E|-)
LS Type: Summary-LSA
Link State ID: 10.1.2.0 (summary Network Number)
Advertising Router: 1.1.1.3
LS Seq Number: 8000000c
Checksum: 0x902a
Length: 28
Network Mask: /24
TOS: 0 Metric: 100
 
LS age: 204
Options: 0x22 (-|-|DC|-|-|-|E|-)
LS Type: Summary-LSA
Link State ID: 10.1.3.0 (summary Network Number)
Advertising Router: 1.1.1.3
LS Seq Number: 80000008
Checksum: 0x8d30
Length: 28
Network Mask: /24
TOS: 0 Metric: 100
 
R3#