IPv6 addressing oddity - Journal of Omnifarious
Sep. 8th, 2009
01:11 am - IPv6 addressing oddity
I've noticed an interesting oddity in IPv6 addressing...
::ffff:n.n.n.n refers to IPv4 only hosts so that a program written for IPv6 only and running on a dual stack machine can address IPv4 only hosts. There is another class of address that is similar, but not quite the same, and I don't actually understand when it would ever be used, and that class is called "IPv4 compatible IPv6 addresses" and they are of the form
Interestingly the IPv6 IN6ADDR_ANY address is
::, which is equivalent to
::0.0.0.0. Fortunately, the IPv4 INADDR_ANY address is
0.0.0.0 (also known as 'this host on this network' in the 'Special Addresses' section of RFC 1700) so there doesn't seem to be any real problem.
And finally, the real problem. The IPv6 equivalent of localhost or IPv4's
::1, and this is equivalent to
::0.0.0.1 which makes it an 'IPv4 compatible IPv6 address'. But the IPv4 address it maps to is, according to RFC 1700, some kind of local identifier for a host on a network. That seems like an odd conflict and inconsistency to me, and I'm not really sure what it means.
Of course, I've never seen any addresses in the
0.0.0.0/8 block be used at all aside from
0.0.0.0 itself, so it's likely not a real problem. But I'm still curious.
Edit 16:36: I have the answer. According to RFC 4291 section 220.127.116.11 meaning of
::n.n.n.n addresses as 'IPv4 compatible IPv6 address' is deprecated so there is no longer any overlap in meaning between the special IPv6 addresses
:: and any IPv4 address.
Well, that was the right decision, the distinction between
::ffff:n.n.n.n addresses and
::n.n.n.n addresses was confusing and unclear anyway.