I tried IPv6 Ping on Linux and Windows respectively yesterday and found that the Link-local address could not be pinged. I was puzzled. I went online to google and finally found the cause.
IPv6 address in Windows XP:
Ethernet adapter Test:
Connection-specific DNS Suffix .:
IP Address ......: 192.168.39.htm
Subnet Mask ......: 255.255.255.0
IP Address ......: fe80: 21a: a5ff: fec1: 1060% 6
Default Gateway ......: 192.168.39.1
Fe80: 20f: e6ff: fed4: 33da % 6
Note that % 6 indicates the interface number.
IPv6 address in Linux:
Eth0 link encap: Ethernet hwaddr 00: 1c: A0: C5: 16: CD
Inet ADDR: 192.168.39.226 bcast: 192.168.39.255 mask: 255.255.255.0
Inet6 ADDR: fe80: 21C: a0ff: fec5: 16cd/64 scope: Link
Up broadcast running Multicast MTU: 1500 Metric: 1
RX packets: 274560 errors: 11 dropped: 0 overruns: 0 frame: 11
TX packets: 4651 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 FIG: 1000
RX bytes: 25845320 (24.6 MiB) TX bytes: 1234107 (1.1 MiB)
Interrupt: 16
Ping a Linux machine in Windows:
C:/> ping fe80: 21c: a0ff: fec5: 16cd
Destination net unreachable.
Destination net unreachable.
Destination net unreachable.
The address with the interface ID must be used:
C:/> ping fe80: 21c: a0ff: fec5: 16cd % 6
Pinging fe80: 21c: a0ff: fec5: 16cd % 6 with 32 bytes of data:
Reply from fe80: 21c: a0ff: fec5: 16cd % 6: time <1 ms
Reply from fe80: 21c: a0ff: fec5: 16cd % 6: time <1 ms
Reply from fe80: 21c: a0ff: fec5: 16cd % 6: time <1 ms
Reply from fe80: 21c: a0ff: fec5: 16cd % 6: time <1 ms
Ping statistics for fe80: 21c: a0ff: fec5: 16cd % 6:
Packets: Sent = 4, stored ED = 4, Lost = 0 (0% loss ),
Approximate round trip times in milli-seconds:
Minimum = 0 ms, Maximum = 0 ms, Average = 0 ms
On Linux:
[Root @ test ~] $ Ping6 fe80: 21a: a5ff: fec1: 1060
Connect: Invalid argument
This problem was mentioned in the previous article on the Internet:
Https://bugzilla.redhat.com/show_bug.cgi? Id = 136852
The point is that link-local adress can't be used in this way. You 'd
Better set a different global ipv6 adress to eth0 or specify device
Used for ping-ping6-I eth0 fe80 ::...
That is, the interface name must be included:
[Heym @ jupiter ~] $ Ping6-I eth0 fe80: 21a: a5ff: fec1: 1060
PING fe80: 21a: a5ff: fec1: 1060 (fe80: 21a: a5ff: fec1: 1060) from fe80: 21c: a0ff: fec5: 16cd eth0: 56 data bytes
64 bytes from fe80: 21a: a5ff: fec1: 1060: icmp_seq = 0 ttl = 64 time = 4.23 MS
64 bytes from fe80: 21a: a5ff: fec1: 1060: icmp_seq = 1 ttl = 64 time = 0.366 MS
64 bytes from fe80: 21a: a5ff: fec1: 1060: icmp_seq = 2 ttl = 64 time = 0.369 MS
Analysis:
The Link-Local address is in the format of FE80: a: B: c: d without any subnet information. Therefore, if a machine with multiple NICs has multiple Link-Local addresses, you must specify the interface from which the NIC is located. Otherwise, the system does not know the Link address.