I can reach other hosts by means of their global addresses by either the IP address or hostname (that has the global address). What I want to (also) do is have a hostname that references the IPv6 link local IP address (an AAAA record in DNS, or just the fe80::<whatever> address in /etc/hosts) and use that host name in commands to access that host. The problem is, an interface ID is needed when making such a reference. So a reference by IP address might look like:
Code:
altair/phil /home/phil 1> ping6 -c 5 fe80::215:17ff:feda:dfe9%eth0
PING fe80::215:17ff:feda:dfe9%eth0(fe80::215:17ff:feda:dfe9) 56 data bytes
64 bytes from fe80::215:17ff:feda:dfe9: icmp_seq=1 ttl=64 time=5.74 ms
64 bytes from fe80::215:17ff:feda:dfe9: icmp_seq=2 ttl=64 time=0.198 ms
64 bytes from fe80::215:17ff:feda:dfe9: icmp_seq=3 ttl=64 time=0.192 ms
64 bytes from fe80::215:17ff:feda:dfe9: icmp_seq=4 ttl=64 time=0.179 ms
64 bytes from fe80::215:17ff:feda:dfe9: icmp_seq=5 ttl=64 time=0.147 ms
--- fe80::215:17ff:feda:dfe9%eth0 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3998ms
rtt min/avg/max/mdev = 0.147/1.292/5.748/2.228 ms
altair/phil /home/phil 2> telnet fe80::215:17ff:feda:dfe9%eth0
Trying fe80::215:17ff:feda:dfe9%eth0...
telnet: Unable to connect to remote host: Connection refused
altair/phil /home/phil 3>
The problem is combining a hostname does not work like that:
Code:
altair/phil /home/phil 3> telnet bessel-eth1.ll6
Trying fe80::215:17ff:feda:dfe9...
telnet: Unable to connect to remote host: Invalid argument
altair/phil /home/phil 4> telnet bessel-eth1.ll6%eth0
telnet: could not resolve bessel-eth1.ll6%eth0/telnet: Name or service not known
altair/phil /home/phil 5> ping6 -c 5 bessel-eth1.ll6
connect: Invalid argument
altair/phil /home/phil 6> ping6 -c 5 bessel-eth1.ll6%eth0
unknown host
altair/phil /home/phil 7> grep bessel-eth /etc/hosts
fe80::215:17ff:feda:dfe8 bessel-eth0.ll6 bessel.ll6
fe80::215:17ff:feda:dfe9 bessel-eth1.ll6 bessel.ll6
altair/phil /home/phil 8>
It sure looks like the programs just pass the host name string on to the resolver library, which does not understand the significance of the '%' even though it could find and see that the name preceding the '%' is consistent with that being an IPv6 link local address (e.g. the logic could have been "split at first % and see if preceeding name is found as a link local address and accept that if so, or ignore the split otherwise" ... but it isn't). Is there a different syntax for this ... or was it overlooked in the design of programming around IPv6?
I want to be able to address a host by its link local address, while still using a mnemonic instead of having to type the IPv6 address.