IPv6 Records on an IPv4 Network

Danny Mayer mayer at gis.net
Sat Jul 24 02:57:29 UTC 2010


On 7/23/2010 8:50 AM, Phil Mayers wrote:
> On 23/07/10 13:23, Danny Mayer wrote:
>> On 7/22/2010 11:33 AM, Phil Mayers wrote:
>>> On 22/07/10 12:19, Rock July wrote:
>>>> Windows Vista and 7 clients will query both type A and AAAA query even
>>>
>>> The OS might make the query, but the application will (should) be using
>>> getaddrinfo, and this will return the IPv4 addresses first, so it
>>> doesn't matter.
>>
>> This is untrue. IPv6 addresses are normally returned first though the
>> ordering depends on a) the order returned by the authorative nameserver
>> and b) by the resolving server and if it reorders the list returned.
>> There is no specific ordering of resource records specified in the
>> protocol and servers are free to order them in any way they want. It is
>> up to the application to specify what they need and to make decisions on
>> which ones they will use.
> 
> 
> Perhaps we are talking about two different things here?
> 
No.

> Certainly there is no defined ordering of A versus AAAA records in DNS
> replies.
> 
> However, on Linux and Windows at least, the getaddrinfo C library call
> defaults to AI_ADDRCONFIG and RFC3484 address ordering rules; it does
> sort the results, and will present IPv4 results first if there is no
> local IPv6 global address present.
> 

Applications that depend on specific behaviors are broken. You should
always code your applications to handle whatever gets returned. "Be
conservative in what you send and be liberal in what you accept".
Otherwise it will break in unexpected ways. The fact that an
implementation orders results in some way under one condition and a
different way under some other condition is not a reason to believe that
this is safe. Furthermore, provisioning of an IPv6 global address is no
indication of IPv6 network connectivity. The ideas in RFC3484 and usage
of AI_ADDRCONFIG are interesting but don't necessarily result in better
behavior.

Danny



More information about the bind-users mailing list