-1

We are testing a query:

  • FQDN: test.example.net
  • Query Type: AAAA

Client > DNS A > DNS B

Simplified DNS query flow:

  1. Client queries test.example.net -t AAAA
  2. Query goes to DNS A which then forwards the query to DNS B
  3. DNS B responds with 2 ORDERED IPV6 addresses to DNS A
  4. DNS A receives the 2 ORDERED IPV6 addresses from DNS B

Expected

  1. DNS A responsds with 2 ORDERED IPV6 addresses to Client

What is happening

  1. DNS A responds with 2 NON-ORDERED IPV6 addresses to Client

Things we have tried:

  • Turn off cacheing on DNS A and DNS B

Things we noticed:

  • When the query goes from DNS A to DNS B, the transaction ID changes
  • When DNS A responds with 2 IPV6 address to Client, the transaction ID changes back to the original transaction ID.

Questions:

  • What options/settings are we overlooking to make sure the Client receives fixed ordered query responses?
  • What could be the reason for DNS A receiving the ordered query response from DNS B, but does not send the ordered query response back to the client?

Thanks BD

1
  • There is by definition no order in the DNS, as it deals with set of records not list of them. This is also why, when some specific records need an order, like ` MX` or SRV then they add a priority or equivalent field to encode that. Why does your client has a need of ordered list? Specifically for AAAA aka IPv6 records, the listing/priority is governed by /etc/gai.conf. Jan 27, 2019 at 17:52

2 Answers 2

4

In the DNS protocol, the order of the records within a record set is not considered significant (as set implies). It's fairly common that records are intentionally shuffled around for purposes like aiding simple DNS-based load balancing solutions.
Record types that actually have a concept of priority (such as MX and SRV) instead have a specific field in their record data which specifies the priority of each record, regardless in which order the records are placed in the response.

As for the transaction id, this value is supposed to stay the same between a query and its response only. In your example you effectively have two queries; client↔A and A↔B.

1

You can use the option "rrset-order" which you can specify the query response to be "fixed" for a certain fqdn.

DNS, by design is to respond with a randomly ordered query response.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .