Basic IPv6 static route configuration example
Network requirements
As shown in Figure 18, configure IPv6 static routes so that hosts can reach one another.
Figure 18: Network diagram
Configuration procedure
Configure the IPv6 addresses for all VLAN interfaces. (Details not shown.)
Configure IPv6 static routes:
# Configure a default IPv6 static route on Switch A.
<SwitchA> system-view [SwitchA] ipv6 route-static :: 0 4::2
# Configure two IPv6 static routes on Switch B.
<SwitchB> system-view [SwitchB] ipv6 route-static 1:: 64 4::1 [SwitchB] ipv6 route-static 3:: 64 5::1
# Configure a default IPv6 static route on Switch C.
<SwitchC> system-view [SwitchC] ipv6 route-static :: 0 5::2
Configure the IPv6 addresses for all the hosts and configure the default gateway of Host A, Host B, and Host C as 1::1, 2::1, and 3::1.
Verifying the configuration
# Display the IPv6 static route information on Switch A.
[SwitchA] display ipv6 routing-table protocol static Summary Count : 1 Static Routing table Status : <Active> Summary Count : 1 Destination: :: Protocol : Static NextHop : 4::2 Preference: 60 Interface : Vlan-interface200 Cost : 0 Static Routing table Status : <Inactive> Summary Count : 0
# Display the IPv6 static route information on Switch B.
[SwitchB] display ipv6 routing-table protocol static Summary Count : 2 Static Routing table Status : <Active> Summary Count : 2 Destination: 1::/64 Protocol : Static NextHop : 4::1 Preference: 60 Interface : Vlan-interface200 Cost : 0 Destination: 3::/64 Protocol : Static NextHop : 5::1 Preference: 60 Interface : Vlan-interface300 Cost : 0 Static Routing table Status : <Inactive> Summary Count : 0
# Use the ping command to test the reachability.
[SwitchA] ping ipv6 3::1 Ping6(56 data bytes) 4::1 --> 3::1, press CTRL_C to break 56 bytes from 3::1, icmp_seq=0 hlim=62 time=0.700 ms 56 bytes from 3::1, icmp_seq=1 hlim=62 time=0.351 ms 56 bytes from 3::1, icmp_seq=2 hlim=62 time=0.338 ms 56 bytes from 3::1, icmp_seq=3 hlim=62 time=0.373 ms 56 bytes from 3::1, icmp_seq=4 hlim=62 time=0.316 ms --- Ping6 statistics for 3::1 --- 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss round-trip min/avg/max/std-dev = 0.316/0.416/0.700/0.143 ms