Ubuntu IPv6 ping self gives unknown host

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

and

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

results in

unknown host

How do I troubleshoot?

3

2 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 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

or

$ 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.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like