I have an entry like this in /etc/hosts
:
fe80::XXXX:XXff:feXX:XXXX%enp0s25 test-ipv6
This is a link-local address. I've masked out my MAC address (with the 7th most significant bit flipped) for this post.
I can ping the address, but pinging test-ipv6
gives
ping: test-ipv6: Name or service not known
- Why doesn't it work?
- Is there a different way to assign an IPv6 link-local address to a hostname?
I'm using Arch Linux with kernel version 4.17.2.
EDIT: this is mostly a duplicate of IPv6 scope ID in /etc/hosts.
hosts
doubtless does not know about what interface the address is supposed to be on%enp0s25
).ping
special-cases literal link-local addresses.