I'm stuck trying to get IPv6 working on a new Ubuntu 16.04 (Xenial Xerus) install. My scenario is very basic - trying to ping the local IPv6 address.
$ ifconfig
enp0s25 Link encap:Ethernet HWaddr b8:ae:ed:77:91:fa inet6 addr: fe80::ba94:3d5e:9929:4c6e/64 Scope:Linkand
$ ping6 -c 5 -I enp0s25 fe80::ba94:3d5e:9929:4c6e/64results in
unknown hostHow do I troubleshoot?
32 Answers
Works with /64 removed and -I specified. The /64 refers to the number of bits in the mask and shouldn't be used in ping.
$ ping6 -c 1 -I enp0s25 fe80::ba94:3d5e:9929:4c6e
PING fe80::ba94:3d5e:9929:4c6e(fe80::ba94:3d5e:9929:4c6e) from fe80::ba94:3d5e:9929:4c6e enp0s25: 56 data bytes
64 bytes from fe80::ba94:3d5e:9929:4c6e: icmp_seq=1 ttl=64 time=0.043 msThe local interface argument -I can be specified in the address instead by appending % and the interface name:
$ ping6 fe80::ba94:3d5e:9929:4c6e%enp0s25
PING fe80::ba94:3d5e:9929:4c6e%enp0s25(fe80::ba94:3d5e:9929:4c6e) 56 data bytes
64 bytes from fe80::ba94:3d5e:9929:4c6e: icmp_seq=1 ttl=64 time=0.027 ms
64 bytes from fe80::ba94:3d5e:9929:4c6e: icmp_seq=2 ttl=64 time=0.059 ms
...These combinations don't work:
$ ping6 -c 1 -I enp0s25 fe80::ba94:3d5e:9929:4c6e/64
unknown hostor
$ ping6 fe80::ba94:3d5e:9929:4c6e
connect: Invalid argument 3 You should not use the /64 on the address in the ping. That would be the equivalent of using a mask length or mask on the ping command for IPv4. I suppose the ping command was trying to interpret that as a host name.