Order of address version return
barmar at alum.mit.edu
Fri Apr 18 19:12:20 UTC 2014
In article <mailman.2.1397834973.77553.bind-users at lists.isc.org>,
Robert Moskowitz <rgm at htt-consult.com> wrote:
> Does bind order address class on queries? That is does it, say, group
> IPv4 addresses then IPv6?
If the query is for A records the response will contain only IPv4
addresses, if the query is for AAAA records it will be IPv6. Only if the
client performs an ANY query will the response contain both. ANY records
are not generally used by applications, because they only return what's
in the resolver's cache, which may not be all the records associated
with the name; ANY queries are usually only useful when querying
authoritative servers (unless what you're trying to find out is what's
currently in the resolver's cache).
> I have put my IPv6 addresses before my IPv4 addresses in my zone file,
> but it seems that the queries are still IPv4 followed by IPv6.
The client making the queries has no way of knowing which order you put
things in the file.
> Or am I reading the dumps wrong?
> Definitely the resolver is returning them in this order to apps. By
> server, I want to control which address connection is preferred. Either
> v6 then v4 or v4 then v6.
There's nothing you can do on the server to make the client request them
in a specific order.
More information about the bind-users