Basic RIPng configuration example
Network requirements
As shown in Figure 96, Switch A, Switch B, and Switch C run RIPng. Configure Switch B to filter the route 2::/64 learned from Switch A and to forward only the route 4::/64 to Switch A.
Figure 96: Network diagram
Configuration procedure
Configure IPv6 addresses for interfaces. (Details not shown.)
Configure basic RIPng:
# Configure Switch A.
<SwitchA> system-view [SwitchA] ripng 1 [SwitchA-ripng-1] quit [SwitchA] interface vlan-interface 100 [SwitchA-Vlan-interface100] ripng 1 enable [SwitchA-Vlan-interface100] quit [SwitchA] interface vlan-interface 400 [SwitchA-Vlan-interface400] ripng 1 enable [SwitchA-Vlan-interface400] quit
# Configure Switch B.
<SwitchA> system-view [SwitchA] ripng 1 [SwitchA-ripng-1] quit [SwitchA] interface vlan-interface 100 [SwitchA-Vlan-interface100] ripng 1 enable [SwitchA-Vlan-interface100] quit [SwitchA] interface vlan-interface 400 [SwitchA-Vlan-interface400] ripng 1 enable [SwitchA-Vlan-interface400] quit
# Configure Switch C.
<SwitchC> system-view [SwitchC] ripng 1 [SwitchC-ripng-1] quit [SwitchC] interface vlan-interface 200 [SwitchC-Vlan-interface200] ripng 1 enable [SwitchC-Vlan-interface200] quit [SwitchC] interface vlan-interface 500 [SwitchC-Vlan-interface500] ripng 1 enable [SwitchC-Vlan-interface500] quit [SwitchC] interface vlan-interface 600 [SwitchC-Vlan-interface600] ripng 1 enable [SwitchC-Vlan-interface600] quit
# Display the RIPng routing table on Switch B.
[SwitchB] display ripng 1 route Route Flags: A - Aging, S - Suppressed, G - Garbage-collect, D – Direct O - Optimal, F - Flush to RIB ---------------------------------------------------------------- Peer FE80::20F:E2FF:FE23:82F5 on Vlan-interface100 Destination 2::/64, via FE80::20F:E2FF:FE23:82F5, cost 1, tag 0, AOF, 6 secs Peer FE80::20F:E2FF:FE00:100 on Vlan-interface200 Destination 4::/64, via FE80::20F:E2FF:FE00:100, cost 1, tag 0, AOF, 11 secs Destination 5::/64, via FE80::20F:E2FF:FE00:100, cost 1, tag 0, AOF, 11 Local route Destination 1::/64, via ::, cost 0, tag 0, DOF Destination 3::/64, via ::, cost 0, tag 0, DOF
# Display the RIPng routing table on Switch A.
[SwitchA] display ripng 1 route Route Flags: A - Aging, S - Suppressed, G - Garbage-collect, D – Direct O - Optimal, F - Flush to RIB ---------------------------------------------------------------- Peer FE80::200:2FF:FE64:8904 on Vlan-interface100 Destination 3::/64, via FE80::200:2FF:FE64:8904, cost 1, tag 0, AOF, 31 secs Destination 4::/64, via FE80::200:2FF:FE64:8904, cost 2, tag 0, AOF, 31 secs Destination 5::/64, via FE80::200:2FF:FE64:8904, cost 2, tag 0, AOF, 31 secs Local route Destination 2::/64, via ::, cost 0, tag 0, DOF Destination 1::/64, via ::, cost 0, tag 0, DOF
Configure route filtering:
# Use IPv6 prefix lists on Switch B to filter received and redistributed routes.
[SwitchB] ipv6 prefix-list aaa permit 4:: 64 [SwitchB] ipv6 prefix-list bbb deny 2:: 64 [SwitchB] ipv6 prefix-list bbb permit :: 0 less-equal 128 [SwitchB] ripng 1 [SwitchB-ripng-1] filter-policy prefix-list aaa export [SwitchB-ripng-1] filter-policy prefix-list bbb import [SwitchB-ripng-1] quit
# Display RIPng routing tables on Switch B and Switch A.
[SwitchB] display ripng 1 route Route Flags: A - Aging, S - Suppressed, G - Garbage-collect, D – Direct O - Optimal, F - Flush to RIB ---------------------------------------------------------------- Peer FE80::1:100 on Vlan-interface100 Peer FE80::3:200 on Vlan-interface200 Destination 4::/64, via FE80::2:200, cost 1, tag 0, AOF, 11 secs Destination 5::/64, via FE80::2:200, cost 1, tag 0, AOF, 11 secs Local route Destination 1::/64, via ::, cost 0, tag 0, DOF Destination 3::/64, via ::, cost 0, tag 0, DOF [SwitchA] display ripng 1 route Route Flags: A - Aging, S - Suppressed, G - Garbage-collect, D – Direct O - Optimal, F - Flush to RIB ---------------------------------------------------------------- Peer FE80::2:100 on Vlan-interface100 Destination 4::/64, via FE80::1:100, cost 2, tag 0, AOF, 2 secs