ipv6 local-link scope is a mess

20 Oct 2008 Markus Koetter ipv6-d51 link-local

I’ve been looking on ipv6 lately, and even though I got a global /64 for free from he.net, I’m not that amused about ipv6 yet.

  • ipv6 link-local scope : if you have multiple interfaces with ipv6 link-local addresses, the operating system does not know which interface to use, so you have to append the interface to the hostname/ip when connecting hosts in link-local scope. If you do not use getaddrinfo, this information has to be passed to the bind/connect using
    struct sockaddr_in6.sin6_scope_id = if_nametoindex(devicename);
    This sounds weird, and it actually is:
    nc6 -6 -vv fe80::21f:d0ff:fe23:9b77%eth1 80
    may work for some people, but encoding the interface in url renders the whole url-idea useless
    http://[fe80::21f:d0ff:fe23:9b77%eth1]