Network Requirements
- Run the IPv6 OSPF protocol between Device1 and Device2, Device2 learns the IPv6 OSPF route released by Device1 2001:1::/64, 2001:2::/64.
- Run the RIPng protocol between Device2 and Device3, Device2 only distributes the IPv6 OSPF route 2001:1::/64 to RIPng, and advertises the route to Device3.
Network Topology
Figure 6-2 Networking for configuring RIPng to redistribute the route
Configuration Steps
Step 1: Create VLANs, and add ports to the required VLANs. (Omitted)
Step 2: Configure the IPv6 address of an interface (omitted).
Step 3: Configure IPv6 OSPF.
#Configure Device1.
Device1#configure terminal
Device1(config)#ipv6 router ospf 100
Device1(config-ospf6)# router-id 1.1.1.1
Device1(config-ospf6)#exit
Device1(config)#interface vlan2
Device1(config-if-vlan2)#ipv6 router ospf tag 100 area 0
Device1(config-if-vlan2)#exit
Device1(config)#interface vlan3
Device1(config-if-vlan3)#ipv6 router ospf tag 100 area 0
Device1(config-if-vlan3)#exit
Device1(config)#interface vlan4
Device1(config-if-vlan4)#ipv6 router ospf tag 100 area 0
Device1(config-if-vlan4)#exit
|
#Configure Device2.
Device2#configure terminal
Device2(config)#ipv6 router ospf 100
Device2(config-ospf6)#router-id 2.2.2.2
Device2(config-ospf6)#exit
Device2(config)#interface vlan2
Device2(config-if-vlan2)#ipv6 router ospf tag 100 area 0
Device2(config-if-vlan2)#exit
|
#Query the IPv6 route table of Device2.
Device2#show ipv6 route
Codes: C - Connected, L - Local, S - static, R - RIP, B - BGP, i-ISIS
U - Per-user Static route
O - OSPF, OE-OSPF External, M - Management
L ::1/128 [0/0]
via ::, 4d:00:09:49, lo0
O 2001:1::/64 [110/2]
via fe80::201:7aff:fe01:204, 00:12:16, vlan2
O 2001:2::/64 [110/2]
via fe80::201:7aff:fe01:204, 00:12:16, vlan2
C 2001:3::/64 [0/0]
via ::, 00:19:51, vlan2
L 2001:3::2/128 [0/0]
via ::, 00:19:50, lo0
C 2001:4::/64 [0/0]
via ::, 00:45:13, vlan3
L 2001:4::1/128 [0/0]
via ::, 00:45:12, lo0
According to the routing table, you can see that Device2 has learnt the IPv6 OSPF route advertised by Device1.
Step 4: Configure RIPng.
#Configure Device2.
Device2(config)#ipv6 router rip 100
Device2(config-ripng)#exit
Device2(config)#interface vlan3
Device2(config-if-vlan3)#ipv6 rip enable 100
Device2(config-if-vlan3)#exit |
#Configure Device3.
Device3#configure terminal
Device3(config)#ipv6 router rip 100
Device3(config-ripng)#exit
Device3(config)#interface vlan2
Device3(config-if-vlan2)#ipv6 rip enable 100
Device3(config-if-vlan2)#exit |
Step 5: Configure the routing policy.
#On Device2, configure route-map to invoke the prefix list to match 2001:1::/64 and filter 2001:2::/64.
Device2(config)#ipv6 prefix-list OSPF permit 2001:1::/64
Device2(config)#route-map OSPFtoRIP
Device2(config-route-map)#match ipv6 address prefix-list OSPF
Device2(config-route-map)#exit
|
-
In configuring a routing policy, you can create a filtration rule based on a prefix list or ACL. The prefix list can precisely match routing masks while the ACL cannot match routing masks.
Step 6: Configure RIPng to redistribute IPv6 OSPF routes.
#Configure RIPng to redistribute IPv6 OSPF routes.
Device2(config)#ipv6 router rip 100
Device2(config-ripng)#redistribute ospf 100 route-map OSPFtoRIP
Device2(config-ripng)#exit
|
Step 7: Check the result.
#Query the RIPng database of Device2.
Device2#show ipv6 rip database
Type : N - Network interface, L - Learn, R - Redistribute, D - Default config,
S - Static config
Proto: C - connected, S - static, R - RIP, O - OSPF, E - IRMP,
o - SNSP, B - BGP, i-ISIS
RIPng process 100 routing database (VRF Kernel, Counter 2): [Type/Proto]
[R/O] 2001:1::/64 metric 1
via vlan2, fe80::201:7aff:fe01:204, no expires
[N/C] 2001:4::/64 metric 1, installed
via vlan3, ::, no expires
#Query the IPv6 route table of Device3. Device3#show ipv6 route
Device3#show ipv6 route
Codes: C - Connected, L - Local, S - static, R - RIP, B - BGP, i-ISIS
U - Per-user Static route
O - OSPF, OE-OSPF External, M - Management
L ::1/128 [0/0]
via ::, 2w0d:20:00:11, lo0
R 2001:1::/64 [120/2]
via fe80::201:7aff:fec3:38a5, 02:50:14, vlan2
C 2001:4::/64 [0/0]
via ::, 03:56:24, vlan2
L 2001:4::2/128 [0/0]
via ::, 03:56:23, lo0
By querying the database of Device2 and the route table of Device3, it is found that the route on Device2 2001:1::/64 is re-distributed to RIPng and is successfully advertised to Device3, while the route 2001:2::/64 has been successfully filtered out.
-
In an actual application, if there are two or more AS boundary routers, it is recommended that you do not redistribute routes between different routing protocols. If route redistribution must be configured, you are required to configure route control policies such as route filtering and filtration summary on the AS boundary routers to prevent routing loops.