Routing policy configuration example for IPv6 route redistribution
Network requirements
As shown in Figure 102:
Run RIPng on Switch A and Switch B.
On Switch A, configure three static routes. Apply a routing policy to static route redistribution to permit routes 20::/32 and 40::/32 and deny route 30::/32.
Figure 102: Network diagram
Configuration procedure
Configure Switch A:
# Configure IPv6 addresses for VLAN-interface 100 and VLAN-interface 200.
<SwitchA> system-view [SwitchA] interface vlan-interface 100 [SwitchA-Vlan-interface100] ipv6 address 10::1 32 [SwitchA-Vlan-interface100] quit [SwitchA] interface vlan-interface 200 [SwitchA-Vlan-interface200] ipv6 address 11::1 32 [SwitchA-Vlan-interface200] quit
# Enable RIPng on VLAN-interface 100.
[SwitchA] interface vlan-interface 100 [SwitchA-Vlan-interface100] ripng 1 enable [SwitchA-Vlan-interface100] quit
# Configure three static routes with next hop 11::2, and make sure the static routes are active.
[SwitchA] ipv6 route-static 20:: 32 11::2 [SwitchA] ipv6 route-static 30:: 32 11::2 [SwitchA] ipv6 route-static 40:: 32 11::2
# Configure a routing policy.
[SwitchA] ipv6 prefix-list a index 10 permit 30:: 32 [SwitchA] route-policy static2ripng deny node 0 [SwitchA-route-policy-static2ripng-0] if-match ipv6 address prefix-list a [SwitchA-route-policy-static2ripng-0] quit [SwitchA] route-policy static2ripng permit node 10 [SwitchA-route-policy-static2ripng-10] quit
# Enable RIPng and apply the routing policy to static route redistribution.
[SwitchA] ripng [SwitchA-ripng-1] import-route static route-policy static2ripng
Configure Switch B:
# Configure the IPv6 address for VLAN-interface 100.
<SwitchB> system-view [SwitchB] interface vlan-interface 100 [SwitchB-Vlan-interface100] ipv6 address 10::2 32
# Enable RIPng.
[SwitchB] ripng [SwitchB-ripng-1] quit
# Enable RIPng on VLAN-interface 100.
[SwitchB] interface vlan-interface 100 [SwitchB-Vlan-interface100] ripng 1 enable [SwitchB-Vlan-interface100] quit
Verifying the configuration
# Display the RIPng routing table on Switch B.
[SwitchB] display ripng 1 route Route Flags: A - Aging, S - Suppressed, G - Garbage-collect ---------------------------------------------------------------- Peer FE80::7D58:0:CA03:1 on Vlan-interface 100 Destination 10::/32, via FE80::7D58:0:CA03:1, cost 1, tag 0, A, 18 secs Destination 20::/32, via FE80::7D58:0:CA03:1, cost 1, tag 0, A, 8 secs Destination 40::/32, via FE80::7D58:0:CA03:1, cost 1, tag 0, A, 3 secs