OcNOS-SP : Layer 3 Guide : Layer 3 Unicast Configuration Guide : OSPFv3 : Multiple Instances
Multiple Instances
By using multiple OSPFv3 instances, OSPFv3 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 OSPFv3 instances, refer to the topology diagram and follow the procedures below.
1. Enable OSPFv3 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
Enable Multiple OSPFv3 Instances on a Router Based on Tags
In this example, routers R1, R2, and R3 are in Area 0, and all run OSPFv3.
R1
 
(config)#router ipv6 ospf 5
Configure an OSPFv3 instance with an instance ID of 5.
(config-router)#router-id 5.5.5.5
Configure the router ID to use on this instance.
(config-router)#exit
Exit Router mode, and return to Interface mode.
(config)#interface eth1
Specify the interface on which OSPFv3 is to be enabled.
(config-if)#ipv6 address 4ffe:2::2/64
Configure the IPv6 address.
(config-if)#ipv6 router ospf area 0 tag 5
Configure the area number and instance value: match the instance ID with the instance ID created previously.
(config-if)#no shutdown
Activate the interface.
(config-if)#commit
Commit the candidate configuration to the running configuration.
R2
 
(config)#router ipv6 ospf 5
Configure an OSPFv3 instance with an instance ID of 5.
(config-router)#router-id 149.149.149.149
Configure the router ID to use on this instance.
(config-router)#exit
Exit Router mode, and return to Interface mode.
(config)#interface eth1
Configure the interface to connect to R1.
(config-if)#ipv6 address 4ffe:2::3/64
Configure the IPv6 address.
(config-if)#ipv6 router ospf area 0 tag 5
Configure the area number and instance value: match the instance ID with the instance ID created previously.
(config-if)#no shutdown
Activate the interface.
(config-if)#commit
Commit the candidate configuration to the running configuration.
(config-if)#exit
Exit Interface mode, and return to Configure terminal mode.
(config)#router ipv6 ospf 15
Configure an OSPFv3 instance with an instance ID of 15.
(config-router)#router-id 159.159.159.159
Configure the router ID to use on this instance.
(config-router)#exit
Exit Router mode, and return to Interface mode.
(config)#interface eth2
Configure the interface to connect to R3.
(config-if)#ipv6 address 3ffe:4::1/64
Configure the IPv6 address.
(config-if)#no shutdown
Activate the interface.
(config-if)#ipv6 router ospf area 0 tag 15
Configure the area number and instance value: match the instance ID with the instance ID created previously.
(config-if)#commit
Commit the candidate configuration to the running configuration.
R3
 
(config)#router ipv6 ospf 15
Configure an OSPFv3 instance with an instance ID of 15.
(config-router)#router-id 152.152.152.152
Configure the router ID to use on this instance.
(config-router)#exit
Exit Router mode, and return to Interface mode.
(config)#interface eth1
Specify the interface on which OSPFv3 is to be enabled.
(config-if)#ipv6 address 3ffe:4::2/64
Configure the IPv6 address.
(config-if)#ipv6 router ospf area 0 tag 15
Configure the area number and instance value: match the instance ID with the instance ID created previously.
(config-if)#no shutdown
Activate the interface.
(config-if)#commit
Commit the candidate configuration to the running configuration.
Validation
R1
R1#show ipv6 ospf route
OSPFv3 Process (5)
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
 
Destination Metric
Next-hop
C 4ffe:2::/64 1
directly connected, eth1, Area 0.0.0.0
 
R1#show ipv6 ospf neighbor
OSPFv3 Process (5)
Neighbor ID Pri State Dead Time Interface Instance ID
149.149.149.149 1 Full/Backup 00:00:32 eth1 0
R2
R2#show ipv6 ospf route
OSPFv3 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
 
Destination Metric
Next-hop
C 3ffe:4::/64 1
directly connected, eth2, Area 0.0.0.0
 
OSPFv3 Process (5)
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
 
Destination Metric
Next-hop
C 4ffe:2::/64 1
directly connected, eth1, Area 0.0.0.0
 
R2#sh ipv6 ospf neighbor
OSPFv3 Process (15)
Neighbor ID Pri State Dead Time Interface Instance ID
152.152.152.152 1 Full/DR 00:00:35 eth2 0
OSPFv3 Process (5)
Neighbor ID Pri State Dead Time Interface Instance ID
5.5.5.5 1 Full/DR 00:00:33 eth1 0
R3
R3#show ipv6 ospf route
OSPFv3 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
 
Destination Metric
Next-hop
C 3ffe:4::/64 1
directly connected, eth1, Area 0.0.0.0
 
 
R3#sh ipv6 ospf neighbor
OSPFv3 Process (15)
Neighbor ID Pri State Dead Time Interface Instance ID
159.159.159.159 1 Full/Backup 00:00:34 eth1 0
Redistribute among Multiple Instances
In this example, routes of one ospfv3 instance are redistributed to another ospfv3 instance to enable ping from R1 to R3 or vice-versa; and R2 redistributes routes from one instance to another.
R2
 
(config)#router ipv6 ospf 15
Configure an OSPFv3 instance with instance ID 15.
(config-router)#router-id 159.159.159.159
Configure the router ID.
(config-router)#redistribute ospf 5
Redistribute instance 5 routes.
(config-router)#exit
Exit OSPF router mode.
(config)#router ipv6 ospf 5
Configure an OSPFv3 instance with instance ID 5.
(config-router)#router-id 149.149.149.149
Configure the router ID.
(config-router)#redistribute ospf 15
Redistribute instance 15 routes.
(config-router)#commit
Commit the candidate configuration to the running configuration.
Validation
R1
R1#show ipv6 ospf route
OSPFv3 Process (5)
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
 
Destination Metric
Next-hop
E2 3ffe:4::/64 1/20
via fe80::a00:27ff:fef9:2432, eth1
C 4ffe:2::/64 1
directly connected, eth1, Area 0.0.0.0
 
 
rtr1#show ipv6 ospf neighbor
OSPFv3 Process (5)
Neighbor ID Pri State Dead Time Interface Instance ID
149.149.149.149 1 Full/Backup 00:00:32 eth1 0
 
R2
 
R2#show ipv6 ospf route
OSPFv3 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
 
Destination Metric
Next-hop
C 3ffe:4::/64 1
directly connected, eth2, Area 0.0.0.0
OSPFv3 Process (5)
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
 
Destination Metric
Next-hop
C 4ffe:2::/64 1
directly connected, eth1, Area 0.0.0.0
 
R2#show ipv6 ospf neighbor
OSPFv3 Process (15)
Neighbor ID Pri State Dead Time Interface Instance ID
152.152.152.152 1 Full/DR 00:00:34 eth2 0
OSPFv3 Process (5)
Neighbor ID Pri State Dead Time Interface Instance ID
5.5.5.5 1 Full/DR 00:00:30 eth1 0
R3
R3#show ipv6 ospf route
OSPFv3 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
 
Destination Metric
Next-hop
C 3ffe:4::/64 1
directly connected, eth1, Area 0.0.0.0
E2 4ffe:2::/64 1/20
via fe80::a00:27ff:fe0d:fbe3, eth1
 
 
R3#show ipv6 ospf neighbor
OSPFv3 Process (15)
Neighbor ID Pri State Dead Time Interface Instance ID
159.159.159.159 1 Full/Backup 00:00:33 eth1 0
 
 
Redistribute with Metric Option
In this example, on R3, routes of instance 15 are redistributed into instance and vice-versa with metric of 100 so that R1 and R2 have each other's routes with a metric of 100.
R2
 
(config)#router ipv6 ospf 15
Configure an OSPFv3 instance with instance ID 15.
(config-router)#router-id 159.159.159.159
Configure the router ID.
(config-router)#redistribute ospf 5 metric 100
Redistribute instance 5 routes with metric 100.
(config-router)#exit
Exit OSPF router mode.
(config)#router ipv6 ospf 5
Redistribute routes into instance 5.
(config-router)#router-id 149.149.149.149
Configure the router ID.
(config-router)#redistribute ospf 15 metric 100
Redistribute instance 15 routes with metric 100.
(config-router)#commit
Commit the candidate configuration to the running configuration.
Validation
R1
R1#show ipv6 ospf route
OSPFv3 Process (5)
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
 
Destination Metric
Next-hop
E2 3ffe:4::/64 1/100
via fe80::a00:27ff:fef9:2432, eth1
C 4ffe:2::/64 1
directly connected, eth1, Area 0.0.0.0
R1#
 
R1#show ipv6 route
IPv6 Routing Table
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
IA - OSPF inter area, E1 - OSPF external type 1,
E2 - OSPF external type 2, E - EVPN N1 - OSPF NSSA external type 1,
N2 - OSPF NSSA external type 2, i - IS-IS, B - BGP
Timers: Uptime
 
IP Route Table for VRF "default"
C ::1/128 via ::, lo, 18:08:02
O E2 3ffe:4::/64 [110/100] via fe80::5054:ff:fe0e:46b7, eth1, 00:00:25
C 4ffe:2::/64 via ::, eth1, 00:20:39
C fe80::/64 via ::, eth9, 18:08:02
R1#
 
 
R1#show ipv6 ospf neighbor
OSPFv3 Process (5)
Neighbor ID Pri State Dead Time Interface Instance ID
149.149.149.149 1 Full/Backup 00:00:36 eth1 0
 
 
R2
R2#show ipv6 ospf route
OSPFv3 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
 
Destination Metric
Next-hop
C 3ffe:4::/64 1
directly connected, eth2, Area 0.0.0.0
OSPFv3 Process (5)
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
 
Destination Metric
Next-hop
C 4ffe:2::/64 1
directly connected, eth1, Area 0.0.0.0
 
 
 
R2#show ipv6 ospf neighbor
OSPFv3 Process (15)
Neighbor ID Pri State Dead Time Interface Instance ID
152.152.152.152 1 Full/DR 00:00:33 eth2 0
OSPFv3 Process (5)
Neighbor ID Pri State Dead Time Interface Instance ID
5.5.5.5 1 Full/DR 00:00:40 eth1 0
 
 
 
R3
R3#show ipv6 ospf route
OSPFv3 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
 
Destination Metric
Next-hop
C 3ffe:4::/64 1
directly connected, eth1, Area 0.0.0.0
E2 4ffe:2::/64 1/100
via fe80::a00:27ff:fe0d:fbe3, eth1
 
R3#
 
R3#show ipv6 route
IPv6 Routing Table
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
IA - OSPF inter area, E1 - OSPF external type 1,
E2 - OSPF external type 2, E - EVPN N1 - OSPF NSSA external type 1,
N2 - OSPF NSSA external type 2, i - IS-IS, B - BGP
Timers: Uptime
 
IP Route Table for VRF "default"
C ::1/128 via ::, lo, 18:08:13
C 3ffe:4::/64 via ::, eth1, 00:17:55
O E2 4ffe:2::/64 [110/100] via fe80::5054:ff:fe3d:e317, eth1, 00:01:05
C fe80::/64 via ::, eth9, 18:08:13
R3#
 
 
R3#show ipv6 ospf neighbor
OSPFv3 Process (15)
Neighbor ID Pri State Dead Time Interface Instance ID
159.159.159.159 1 Full/Backup 00:00:37 eth1 0
 
Redistribute with Type Option
In this example, on R3, R1 has R3 routes as type 2, and R3 has R1 routes as type 1.
R2
 
(config)#router ipv6 ospf 15
Configure an OSPFv3 instance with instance ID 15.
(config-router)#router-id 159.159.159.159
Configure the router ID.
(config-router)#redistribute ospf 5 metric-type 1
Redistribute instance 5 routes as type 1.
(config-router)#exit
Exit OSPF router mode.
(config)#router ipv6 ospf 5
Redistribute routes into instance 5.
(config-router)#router-id 149.149.149.149
Configure the router ID.
(config-router)#redistribute ospf 15 metric-type 2
Redistribute instance 15 routes as type 2.
(config-router)#commit
Commit the candidate configuration to the running configuration.
Validation
R1
R1#show ipv6 ospf route
OSPFv3 Process (5)
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
 
Destination Metric
Next-hop
E2 3ffe:4::/64 1/20
via fe80::a00:27ff:fef9:2432, eth1
C 4ffe:2::/64 1
directly connected, eth1, Area 0.0.0.0
 
 
rtr1#show ipv6 ospf neighbor
OSPFv3 Process (5)
Neighbor ID Pri State Dead Time Interface Instance I
D
149.149.149.149 1 Full/Backup 00:00:32 eth1 0
R2
 
R2#show ipv6 ospf route
OSPFv3 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
 
Destination Metric
Next-hop
C 3ffe:4::/64 1
directly connected, eth2, Area 0.0.0.0
OSPFv3 Process (5)
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
 
Destination Metric
Next-hop
C 4ffe:2::/64 1
directly connected, eth1, Area 0.0.0.0
 
R2#show ipv6 ospf neighbor
OSPFv3 Process (15)
Neighbor ID Pri State Dead Time Interface Instance I
D
152.152.152.152 1 Full/DR 00:00:36 eth2 0
OSPFv3 Process (5)
Neighbor ID Pri State Dead Time Interface Instance I
D
5.5.5.5 1 Full/DR 00:00:32 eth1 0
R3
R3#show ipv6 ospf route
OSPFv3 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
 
Destination Metric
Next-hop
C 3ffe:4::/64 1
directly connected, eth1, Area 0.0.0.0
E2 4ffe:2::/64 1/21
via fe80::a00:27ff:fe0d:fbe3, eth1
 
 
R3#show ipv6 ospf neighbor
OSPFv3 Process (15)
Neighbor ID Pri State Dead Time Interface Instance I
D
159.159.159.159 1 Full/Backup 00:00:36 eth1 0
Redistribute with Route-Map Option
R1
(config)#interface eth2
Configure the interface eth2 on R1.
(config-if)#ipv6 address 4ffe:1::2/64
Configure the IPv6 address.
(config-if)#ipv6 router ospf area 0 tag 5
Configure interface eth2 for ospfv3 with area 0 and instance 5
(config-if)#commit
Commit the candidate configuration to the running configuration.
Validation
R3
R3#show ipv6 ospf route
OSPFv3 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
 
Destination Metric
Next-hop
C 3ffe:4::/64 1
directly connected, eth1, Area 0.0.0.0
E1 4ffe:1::/64 20
via fe80::5054:ff:fe3d:e317, eth1
E1 4ffe:2::/64 20
via fe80::5054:ff:fe3d:e317, eth1
R3#
R2
 
R2(config)#ipv6 prefix-list permit-4ffe-2
Configure and ipv6 prefix-list
R2 (config-ipv6-prefix-list)#seq 5 permit 4ffe:2::/64
Create an access-list to permit the prefix 4ffe:2::/64
R2(config-ipv6-prefix-list)#exit
Exit the prefix-list mode
R2(config)#route-map permit-only-4ffe-2
Configure a route-map to permit only the prefix 4ffe:2::/64
R2(config-route-map)#match ipv6 address prefix-list permit-4ffe-2
Configure a match statement to match the configured ipv6 prefix-list
R2(config-route-map)#exit
Exit route-map mode and return to configure terminal mode
R2(config)#router ipv6 ospf 15
Enter router ipv6 mode for instance 15
R2(config-router)#redistribute ospf 5 route-map permit-only-4ffe-2
Redistribute instance 5 routes with route-map to permit only the ipv6 prefix 4ffe:2::/64
(config-router)#exit
Exit OSPF router mode.
(config)#router ipv6 ospf 5
Redistribute routes into instance 5.
(config-router)#router-id 149.149.149.149
Configure the router ID.
(config-router)#redistribute ospf 15 route-map 1
Redistribute instance 15 routes with route map 1.
(config-router)#redistribute connected
Redistribute connected routes to instance 15.
(config-router)#commit
Commit the candidate configuration to the running configuration.
Validation
R1
R1#show ipv6 ospf route
OSPFv3 Process (5)
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
 
Destination Metric
Next-hop
E2 3ffe:4::/64 1/20
via fe80::5054:ff:fe0e:46b7, eth1
C 4ffe:1::/64 1
directly connected, eth2, Area 0.0.0.0
C 4ffe:2::/64 1
directly connected, eth1, Area 0.0.0.0
R1#
 
R1#show ipv6 ospf neighbor
OSPFv3 Process (5)
Neighbor ID Pri State Dead Time Interface Instance I
D
149.149.149.149 1 Full/DR 00:00:34 eth1 0
R2
R2#show ipv6 ospf route
OSPFv3 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
 
Destination Metric
Next-hop
C 3ffe:4::/64 1
directly connected, eth2, Area 0.0.0.0
OSPFv3 Process (5)
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
 
Destination Metric
Next-hop
O 4ffe:1::/64 2
via fe80::5054:ff:fe0c:40ed, eth1, Area 0.0.0.0
C 4ffe:2::/64 1
directly connected, eth1, Area 0.0.0.0
R2#
 
 
R2#sh ipv6 ospf neighbor
OSPFv3 Process (15)
Neighbor ID Pri State Dead Time Interface Instance ID
152.152.152.152 1 Full/Backup 00:00:32 eth2 0
OSPFv3 Process (5)
Neighbor ID Pri State Dead Time Interface Instance ID
5.5.5.5 1 Full/Backup 00:00:38 eth1 0
 
 
R3
R3#show ipv6 ospf route
OSPFv3 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
 
Destination Metric
Next-hop
C 3ffe:4::/64 1
directly connected, eth1, Area 0.0.0.0
E2 4ffe:2::/64 1/20
via fe80::5054:ff:fe3d:e317, eth1
R3#
Last modified date: 10/16/2023