OcNOS-SP : Layer 3 Guide : Layer 3 Unicast Configuration Guide : OSPFv3 : Distribute List
Distribute List
To filter the routes that Open Shortest Path First Version 3 (OSPFv3) installs in the Routing Information Base (RIB), use the distribute-list in command in an appropriate configuration mode.
To filter the routes redistributed into Open Shortest Path First Version 3 (OSPFv3) from other routing protocols, use the distribute-list out command in an appropriate configuration mode.
Topology
Figure 12-99 shows the configuration to illustrate the distribute-list support for OSPFv3
Figure 12-99: Basic Topology for Distribute-list
Configuration
R1
#configure terminal
Enter configure mode.
(config)#interface eth1
Enter interface mode.
(config-if)#ipv6 address 2000::1/64
Configure the IPv6 address of the interface.
(config-if)#ipv6 router ospf area 0 tag proc1
Configure the interface in an area assigned with the area ID (0) which uniquely identifies the routing process
(config-if)#exit
Exit interface mode.
(config)#interface lo
Enter interface mode.
(config-if)# ipv6 address 1111::1/128
Configure the IPv6 address of the interface.
(config-if)# ipv6 address 2222::2/128
Configure the IPv6 address of the interface.
(config-if)#exit
Exit interface mode.
(config)#router ipv6 ospf proc1
Configure the routing process
(config-router)#router-id 1.1.1.1
Configure router-id to uniquely identify the router
(config-router)#redistribute connected
Redistribute connected routes into ospfv3
(config-router)#commit
Commit the candidate configuration to the running configuration.
(config-router)#end
Exit router mode.
R2
 
#configure terminal
Enter configure mode.
(config)#interface eth1
Enter interface mode.
(config-if)#ipv6 address 2000::50/64
Configure the IPv6 address of the interface
(config-if)#ipv6 router ospf area 0 tag proc1
Configure the interface in an area assigned with the area ID (0) which uniquely identifies the routing process
(config-if)#exit
Exit interface mode
(config)#interface eth2
Enter interface mode
(config-if)#ipv6 address 4000::50/64
Configure the IPv6 address of the interface.
(config-if)#exit
Exit interface mode
(config-if)#ipv6 router rip
Configure rip instance under interface
(config-if)#exit
Exit interface mode
(config)#router ipv6 rip
Configure the rip routing process
(config-router)#neighbor fe80::5054:ff:fe85:19bc eth2
Configure RIP neighbor peer
(config-router)#exit
Exit router mode.
(config)#ipv6 access-list 1
Configure ipv6 access list
(config-ipv6-acl)# permit any 7777::/64 any
Configure ipv6 access-list to permit 7777::/64 and deny 8888::/64
(config-ipv6-acl)#exit
Exit ipv6 access-list mode
(config)#ipv6 access-list 2
Configure ipv6 access-list
(config-ipv6-acl)#permit any 1111::1/128 any
Configure ipv6 access-list to permit 1111::1/128 and deny 2222::2/128
(config-ipv6-acl)#exit
Exit ipv6 access-list mode
(config)#router ipv6 ospf proc1
Configure the ospfv3 routing process
(config-router)#router-id 2.2.2.2
Configure router-id to uniquely identify the router
(config-router)#redistribute rip
Redistribute rip routes
(config-router)#distribute-list 1 out rip
Configure distribute list to allow only the permitted routes redistributed from RIP
(config-router)#distribute-list 2 in
Configure distribute list to allow the installation of only the permitted OSPFv3 routes in RIB
(config-router)#exit
Exit router mode
(config)#ipv6 access-list 1
Enter access-list mode
(config-ipv6-acl)#permit any 8888::/64 any
Configure the ipv6 access-list to permit 8888::/64 alongwith 7777::/64
(config-ipv6-acl)#exit
Exit access-list mode
(config)#ipv6 access-list 2
Enter access-list mode
(config-ipv6-acl)#permit any 2222::2/128 any
Configure the ipv6 access-list to permit 2222::2/128 alongwith 1111::1/128
(config-ipv6-acl)#exit
Exit access-list mode
(config)#commit
Commit the candidate configuration to the running configuration.
(config)#exit
Exit configure mode
R3
 
#configure terminal
Enter configure mode
(config)#interface eth1
Enter interface mode
(config-if)#ipv6 address 4000::51/64
Configure the IPv6 address of the interface.
(config-if)#ipv6 router rip
Configure rip instance under interface
(config-if)#exit
Exit interface mode
(config)#router ipv6 rip
Configure the rip routing process
(config-router)#neighbor fe80::5054:ff:fec6:69f eth1
Configure rip neighbor peer
(config-router)#exit
Exit router mode
(config)#ipv6 route 7777::/64 eth2
Configure static route
(config)#ipv6 route 8888::/64 eth3
Configure static route
(config)#router ipv6 rip
Configure the rip routing process
(config-router)#redistribute static
Redistribute configured static routes
(config-router)#commit
Commit the candidate configuration to the running configuration.
(config-router)#end
Exit router mode
Validation 1
Verify OSPF neighborship is up between R1and R2
R2
R2#show ipv6 ospf neighbor
OSPFv3 Process (Proc1)
Neighbor ID Pri State Dead Time Interface Instance ID
1.1.1.1 1 Full/Backup 00:00:38 eth1 0
Validation 2
Check if permitted route 7777::/64 is present in R1's routing table and denied route 8888::/64 is not present.
R1
R1#show ipv6 ospf route
OSPFv3 Process (Proc1)
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 2000::/64 1 directly connected, eth1, Area 0.0.0.0
E2 7777::/64 1/20 via fe80::5054:ff:fe1e:269d, eth1
Validation 3
Check both the routes 7777::/64 and 8888::/64 are present after 8888::/64 is permitted
R1
rtr1#show ipv6 ospf route
OSPFv3 Process (Proc1)
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 2000::/64 1 directly connected, eth1, Area 0.0.0.0
E2 7777::/64 1/20 via fe80::5054:ff:fe1e:269d, eth1
E2 8888::/64 1/20 via fe80::5054:ff:fe1e:269d, eth1
 
Validation 4
Check if permitted route 1111::1/128 is present in R2's routing table and denied route 2222::2/128 is not present.
R1
R2#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, 00:43:35
O E2 1111::1/128 [110/20] via fe80::5054:ff:fe0c:40ed, eth1, 00:01:17
C 2000::/64 via ::, eth1, 00:36:33
C 4000::/64 via ::, eth2, 00:36:19
R 7777::/64 [120/2] via fe80::5054:ff:fe96:a3f9, eth2, 00:21:57
R 8888::/64 [120/2] via fe80::5054:ff:fe96:a3f9, eth2, 00:21:57
C fe80::/64 via ::, eth9, 00:43:35
R2#
 
Validation 5
Check both the routes 1111::1/128 and 2222::2/128 are present after 2222::2/128 is permitted.
R1
R2#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, 00:54:52
O E2 1111::1/128 [110/20] via fe80::5054:ff:fe0c:40ed, eth1, 00:12:34
C 2000::/64 via ::, eth1, 00:47:50
O E2 2222::2/128 [110/20] via fe80::5054:ff:fe0c:40ed, eth1, 00:00:02
C 4000::/64 via ::, eth2, 00:47:36
R 7777::/64 [120/2] via fe80::5054:ff:fe96:a3f9, eth2, 00:33:14
R 8888::/64 [120/2] via fe80::5054:ff:fe96:a3f9, eth2, 00:33:14
C fe80::/64 via ::, eth9, 00:54:52
Last modified date: 10/16/2023