[H3C]int g0/0
[H3C-GigabitEthernet0/0]ipv6 add auto
在R1上查看g0/0口的链路本地地址
[H3C]display ipv6 interface brief
*down: administratively down
(s): spoofing
Interface Physical Protocol IPv6 Address
GigabitEthernet0/0 up up FE80::2ADF:BFFF:FE63:105(自动生成的ipv6地址)
GigabitEthernet0/1 down down Unassigned
GigabitEthernet0/2 down down Unassigned
GigabitEthernet5/0 down down Unassigned
GigabitEthernet5/1 down down Unassigned
GigabitEthernet6/0 down down Unassigned
GigabitEthernet6/1 down down Unassigned
Serial1/0 down down Unassigned
Serial2/0 down down Unassigned
Serial3/0 down down Unassigned
Serial4/0 down down Unassigned
在另一台路由器上ping该地址
[H3C]ping ipv6 -i g0/0 FE80::2ADF:BFFF:FE63:105
Ping6(56 data bytes) FE80::2ADF:C3FF:FE44:205 --> FE80::2ADF:BFFF:FE63:105, press CTRL+C to break
56 bytes from FE80::2ADF:BFFF:FE63:105, icmp_seq=0 hlim=64 time=1.000 ms
56 bytes from FE80::2ADF:BFFF:FE63:105, icmp_seq=1 hlim=64 time=2.000 ms
56 bytes from FE80::2ADF:BFFF:FE63:105, icmp_seq=2 hlim=64 time=3.000 ms
56 bytes from FE80::2ADF:BFFF:FE63:105, icmp_seq=3 hlim=64 time=0.000 ms
56 bytes from FE80::2ADF:BFFF:FE63:105, icmp_seq=4 hlim=64 time=1.000 ms
--- Ping6 statistics for FE80::2ADF:BFFF:FE63:105 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 0.000/1.400/3.000/1.020 ms
[H3C]%Jul 7 11:31:55:313 2025 H3C PING/6/PING_STATISTICS: Ping6 statistics for FE80::2ADF:BFFF:FE63:105: 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss, round-trip min/avg/max/std-dev = 0.000/1.400/3.000/1.020 ms.
当然也可以自己配置ipv6的地址
用ipv6 addresss 【ipv6 地址】配置
[H3C-GigabitEthernet0/0]ipv6 add 2001::1/64
[H3C]display ipv6 interface brief
*down: administratively down
(s): spoofing
Interface Physical Protocol IPv6 Address
GigabitEthernet0/0 up up 2001::1(所配ipv6地址)
GigabitEthernet0/1 down down Unassigned
GigabitEthernet0/2 down down Unassigned
GigabitEthernet5/0 down down Unassigned
GigabitEthernet5/1 down down Unassigned
GigabitEthernet6/0 down down Unassigned
GigabitEthernet6/1 down down Unassigned
Serial1/0 down down Unassigned
Serial2/0 down down Unassigned
Serial3/0 down down Unassigned
Serial4/0 down down Unassigned
同样用另一台路由器pingR1
[H3C]ping ipv6 -i g0/0 2001::1
Ping6(56 data bytes) FE80::2ADF:C3FF:FE44:205 --> 2001::1, press CTRL+C to break
56 bytes from 2001::1, icmp_seq=0 hlim=64 time=2.000 ms
56 bytes from 2001::1, icmp_seq=1 hlim=64 time=1.000 ms
56 bytes from 2001::1, icmp_seq=2 hlim=64 time=1.000 ms
56 bytes from 2001::1, icmp_seq=3 hlim=64 time=1.000 ms
56 bytes from 2001::1, icmp_seq=4 hlim=64 time=1.000 ms
--- Ping6 statistics for 2001::1 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 1.000/1.200/2.000/0.400 ms
[H3C]%Jul 7 11:35:26:669 2025 H3C PING/6/PING_STATISTICS: Ping6 statistics for 2001::1: 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss, round-trip min/avg/max/std-dev = 1.000/1.200/2.000/0.400 ms.