No, DirectAdmin doesn't save the zone serial number anywhere else but in the zone file. But it's still easy to mess it up (don't forget it's a mathematical
add, not a concatenation). Several points:
DirectAdmin can update the zone file for you; this shell command will update serial numbers on all zone files and also restart BIND:
Code:
echo "action=rewrite&value=named" >> /usr/local/directadmin/data/task.queue
Thanks to John, who reminded me of this a few days ago.
Serial numbers are only important if you're using a true master-slave fonguration. They're definitely unimportant if you're using one nameserver with two IP#s to fool the DNS system (not recommended but lots of admins still ding it). They may not be important if you're using
Multi-Server Option but they definitely ARE important if you're using
Master2Slave DNS Replicator.
Then of course if you change how you do DNS and serial numbers become important you can always run that DirectAdmin shell command (see above) to get them synchronized again.
Zone file serial numbers do not have to be in any special format. If your zone file is
1 and you manually change it to
2 when you update a zone, that's good enough for BIND. The method DirectAdmin (and almost every admin out there uses today) use was probably first recommended by Cricket Liu in his definitive O'Reilly DNS handbook,
DNS and Bind, in which he recommended using a serial number made so:
yyyymmdd##, where
yyyy is the four-digit year,
mm is the two-digit month,
dd is the two-digit day, and
## is a two-digit additive number.
DirectAdmin maintains the DNS serial number someting like this:
If it's recognizable according to the above format but is a date earlier than today, it uses today's date followed by the two-digit number 00. If the date is today's date, it increments it removes the two-digit number at the end, adds
1, and writes it back. I don't know what it does if the number isn't recognizable as a date, or if it's later than today (in which case using today's date would break the serial number) or if the additive number goes above
99 in which case adding
1 and turning it into a three digit number would break it, as would starting over again at
00.
If the number becomes broken there is a serial number you can send which tells BIND to start over; I don't recall it and have only had to use it once, many years ago.
And another point of interest, in case you don't know,
BIND is an acryonym for
Berkeley
Internet
Name
Daemon; the program was originally written by four graduate students at the Computer Systems Research Group at the University of California, Berkeley (USA). A
daemon, as we computer admins should know, is a program which runs in the background, ready to do your bidding when asked.
I've often thought it would be easer on the Internet if serial numbers were only updated when all changes were finished; why keep passing update requests to slaves each time one line is changed or spelling is corrected? But the problem is in ensuring that you can't leave the page without specificing yes or no, that you want your changes saved.
Otherwise you could make a lot of changes, forget to commit them, and all your work is gone and tomorrow you'll wonder why no one can see your site. Or that you'll want to abandon your changes, think you can, by just leaving the page, and then find out later your changes were written anyway.
Jeff