Linux under the Ping6__linux

Source: Internet
Author: User

Yesterday tried a bit of Linux and Windows under the IPv6 Ping, found that can not ping link-local address, baffled, and then online Google, and finally found the reason.

IPV6 address under Windows XP:

Ethernet Adapter Test:

Connection-specific DNS Suffix. :
IP address. ...........:192.168.39.137
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 the%6 represents the interface number.

IPV6 address under 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 txqueuelen:1000
RX bytes:25845320 (24.6 MiB) TX bytes:1234107 (1.1 MiB)
Interrupt:16

Ping a Linux machine under Windows:

C:/>ping FE80::21C:A0FF:FEC5:16CD

Destination Net unreachable.
Destination Net unreachable.
Destination Net unreachable.

Need to use an address with an interface ID:

C:/>ping fe80::21c:a0ff:fec5:16cd%6

Pinging fe80::21c:a0ff:fec5:16cd%6 with bytes of data:

Reply from Fe80::21c:a0ff:fec5:16cd%6:time<1ms
Reply from Fe80::21c:a0ff:fec5:16cd%6:time<1ms
Reply from Fe80::21c:a0ff:fec5:16cd%6:time<1ms
Reply from Fe80::21c:a0ff:fec5:16cd%6:time<1ms

Ping Statistics for fe80::21c:a0ff:fec5:16cd%6:
Packets:sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trips times in Milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

On Linux machines:

[Root@test ~]$ ping6 fe80::21a:a5ff:fec1:1060
Connect:invalid argument

An article on the Internet mentions this problem:

https://bugzilla.redhat.com/show_bug.cgi?id=136852

The point are that link-local adress can ' t being 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 with:

[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
Bytes from fe80::21a:a5ff:fec1:1060:icmp_seq=0 ttl=64 time=4.23 ms
Bytes from Fe80::21a:a5ff:fec1:1060:icmp_seq=1 ttl=64 time=0.366 ms
Bytes from fe80::21a:a5ff:fec1:1060:icmp_seq=2 ttl=64 time=0.369 ms

Analysis:

Because the link-local address is in the form of: fe80::a:b:c:d format, without any subnet information, such as indicating the route. So if there are multiple link-local addresses on a machine with multiple network adapters, you must specify which interface to go out from, otherwise the system does not know which link is the address of the path.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.