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:Link


$ ping6 -c 5 -I enp0s25 fe80::ba94:3d5e:9929:4c6e/64

results in

unknown host

How do I troubleshoot?

  • Bonk... I had tried that and got invalid argument, but, at that time I didn't specify -I also. Thanks! – jws Nov 17 at 18:55
  • FYI: ifconfig is deprecated. You want to use ip address or ip a instead. – Bakuriu Nov 17 at 23:08

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 ms

The 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 host


$ ping6 fe80::ba94:3d5e:9929:4c6e
connect: Invalid argument
  • 1
    Is that an answer or a follow-up? This site is not a forum. It is a think tank. – Peter Mortensen Nov 18 at 0:33
  • 1
    @PeterMortensen it’s a valid answer, to Ping a link local network address you must specify the interface and to use a ip6 address with pink you must not specify a / suffix. – eckes Nov 18 at 0:42
  • @PeterMortensen This is a perfectly valid answer to the question. In fact it is even a better answer than the one posted later. This answer gives examples of valid syntax and points out that there are two different ways to specify the interface. – kasperd Nov 18 at 9:31

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.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.