IPv4 in IPv6 in AAAA records

Colm MacCarthaigh colm.maccarthaigh at heanet.ie
Mon Aug 23 08:48:10 UTC 2004


On Mon, Aug 23, 2004 at 01:31:01AM -0500, Phil Howard wrote:
> I'm not sure where this syntax originates (maybe an RFC, I haven't looked).
> But BIND and earlier NSD accepted an IPv6 format where the low order 32 bits
> could be written in dotted decimal, at least if the high order 96 bits had
> the value (in IPv6 form) ::FFFF.  So I could write an AAAA record like:
> 
> ham.org.        12H IN  AAAA    ::FFFF:209.102.192.73
> 
> which would actually be the same as:
> 
> ham.org.        12H IN  AAAA    ::FFFF:D166:C049


::ffff/96 is the IPv4-mapped-IPv6 address prefix, it's intended use is
to allow an IPv6 stack to forward IPv4 packets to an IPv6-listening
service (for example NSD listening on :: on Linux will see packets
from 193.1.193.194 as ::ffff:193.1.193.194).

There is also the IPv4-compatible-IPv6 address prefix, ::/96 and
addresses look like: ::193.1.193.194. Using either in AAAA records
is a *really* terrible idea.

This is still a bug in NSD though, as the IPv6 standards allow for the 
low order 32 bits to be represented as dotted quads for any address, for 
example:

  colmmacccc at byron:~$ ping6 2001:770:18:2:206:5bff:254.63.170.218
  PING 2001:770:18:2:206:5bff:254.63.170.218(2001:770:18:2:206:5bff:fe3f:aada) from ::1 : 56 data bytes
  64 bytes from 2001:770:18:2:206:5bff:fe3f:aada: icmp_seq=1 ttl=64 time=0.066 ms


c.f. Appendix B to RFC2373

-- 
Colm MacCárthaigh  /  HEAnet, Teach Brooklawn,  / Innealtóir Ghréasáin
+353 1 6609040    / Bóthar Shelbourne, BÁC, IE /   http://www.hea.net/



More information about the nsd-users mailing list