Purpose of serial number in DNS zone files

So a DNS zone file contains an SOA record specifying the authoritative name server, along with some other information such as a "serial number".

I'm trying to understand the purpose of the serial number. Googling around for answers, I found the following explanation:

Serial numbers in DNS zone files provide a way for the server to verify that the contents of a particular zone file are up-to-date. If the serial number in a zone file hasn't changed since that zone was last loaded, named figures that it can ignore the file. This means that sysadmins have to remember to update the serial number every time they make a change to a zone file -- otherwise, their changes won't be picked up and published.

Source:

I don't understand this explanation, and the fact that this requires sysadmins to remember to manually update the serial number seems insane.

So, what's the purpose of the serial number? It can't be for other DNS servers to verify if a particular record is out-of-date, because that's what the TTL is for.

So, why is it important to have a serial-number? Why not just have the DNS server re-read the zone file when a change is made?

1 Answer

It's so that other servers doing zone transfers can verify if they need to do a zone transfer. Old serial number, no transfer. TTL not involved on this one.

The DNS server knows that it needs to re-read the zone file when the serial number changes as just making a change does not trigger anything, there's no timestamp within the zone file generated by changing anything to note that there has been an update on most DNS software. Most Zone files are just text files in the *nix world.

Normal convention is that the Serial number is the timestamp in date ISO date format followed by a two number increment

2014101501

Microsoft products are set up to autoincrement the Serial Number when changes are made.

2

You Might Also Like