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
Figure 8-73: 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)#commit | Commit the candidate configuration to the running configuration. |
(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)#commit | Commit the candidate configuration to the running configuration. |
(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