Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When a IPv6 only host wants to reach a IPv4 only host, why does the DNS server (or possibly the NAT-PT gateway?) have to rewrite the A responses to AAAA?

Couldn't IPv6 simply embed the IPv4 address in the destination field of an IPv6 packet (e.g. by simply prefixing it with zeroes or some other, well-known prefix), and leave it to the default gateway to do all the translation?

I don't quite understand the motivation for DNS64.

share|improve this question
    
Duplicated in this ServerFault question. –  JdeBP Jan 31 '12 at 16:09
add comment

1 Answer

up vote 2 down vote accepted

Couldn't IPv6 simply embed the IPv4 address in the destination field of an IPv6 packet (e.g. by simply prefixing it with zeroes or some other, well-known prefix), and leave it to the default gateway to do all the translation?

This is exactly what happens. The DNS server takes the IPv4 address (A record), prefixes it with a prefix (there is a well-known prefix 64:FF9B::/96, but it can be any site-specific prefix). Because the DNS64 resolver does it in one place all the hosts don't have to know about it: they just get an IPv6 address that they can connect to. If all the hosts know how to do the prefixing then you wouldn't need the DNS64 server, but changing all the hosts can be difficult. Therefore the DNS64 part is invented to do it automatically in one place.

share|improve this answer
    
Ok, so I guess there is a pretty good reason why it is being used, but just out of curiosity: Why is there no well-known prefix? Hosts could automatically select it in case there is no IPv4 route to the target host, and all the DNS hassle could be avoided. (Hardwired IP addresses would still work, too.) Or would that interfere with the sockets API (after all, a requested IPv4 connection would suddenly be an IPv6 one)? –  lxgr Jan 30 '12 at 22:35
    
The well known prefix is 2002::/16 –  psusi Jan 31 '12 at 2:33
    
But that's 6to4, right? There would be no way for the hosts in the network to have "native", routable IPv6 addresses. –  lxgr Jan 31 '12 at 9:57
1  
2002::/16 is not for DNS64/NAT64, that is 6to4. The well-known-prefix is 64:FF9B::/96, and the reason for DNS64 is that changing one DNS server is easier than changing all hosts, especially in a large network. –  Sander Steffann Jan 31 '12 at 10:19
    
So that scenario was not considered when IPv6 was designed (or considered not to be relevant to the core standard), and DNS64 is the hack that makes it work? Or am I missing something? Would defaulting to that prefix in case no IPv4 interface is available by all IPv6 hosts break anything? –  lxgr Jan 31 '12 at 11:21
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.