linux ping ipv6地址,Linux ping6 local ipv6 addressInvalid argument,ping6本地ipv6地址出现无效的参数...

问题:

在Linux系统(Ubuntu 12.04 x64)下,使用ping6命令ping本地的ipv6地址(FF80开头的link-local address),如直接使用命令ping6 fe80::212:34ff:fe12:3456,会出现错误提示”无效的参数(connect: Invalid argument)”。

[root@coolnull ~]# ping6 fe80::212:34ff:fe12:3456

connect: Invalid argument

解决:

这是因为ping本地的ipv6地址时,需要指定用来发送数据包的网络接口,如下通过-I 指定eth1

[root@coolnull ~]# ping6 -I eth1 fe80::212:34ff:fe12:3456

PING fe80::212:34ff:fe12:3456(fe80::212:34ff:fe12:3456) from fe80::212:34ff:fe12:3456 eth1: 56 data bytes

64 bytes from fe80::212:34ff:fe12:3456: icmp_seq=1 ttl=64 time=0.025 ms

64 bytes from fe80::212:34ff:fe12:3456: icmp_seq=2 ttl=64 time=0.043 ms

^C

--- fe80::212:34ff:fe12:3456 ping statistics ---

2 packets transmitted, 2 received, 0% packet loss, time 1409ms

rtt min/avg/max/mdev = 0.025/0.034/0.043/0.009 ms

Post Views:

48

你可能感兴趣的:(linux,ping,ipv6地址)