Does the order of entries/record types matter in NSD/BIND zone config files

bindconfigurationdomain-name-systemnsd

I'm trying to streamline the addition of DNS records to an NSD install. It looks like it uses the same syntax as BIND so this question may be relevant to either.

It seems like the convention I'm seeing in the current zone file is to separate the SOA, MX, NS, A, CNAME, TXT records into their own stanzas in the zone configuration file, in our case with a semicolon separating one stanza from the next.

I believe this is just for aesthetics and the only real requirement is that the SOA is the first record, the order after that shouldn't matter.

I'm wondering if anyone else has can validate that assumption

Best Answer

The order of the resource records (after the mandatory entries) never appeared to functionally matter in any of the dns:es I have come across. When there is a dependency, such as a cname record linking to an a record, this is solved through separating resolution into two queries: one recieving the cname and the other recieving the a record.

As bind and nsd loads the entire zone files into memory at startup, the order does not seem to matter for the resolution performance either.

However, zone file size is a factor both for time to fully load and for query response time: https://www.icann.org/en/about/staff/security/ssr/root-zone-augementation-analysis-17sep09-en.pdf