bind and style

Doug Barton DougB at gorean.org
Fri Feb 2 01:40:23 UTC 2001


On Thu, 1 Feb 2001, Jed Record wrote:

>
> Could anyone share some comments and/or examples for the style of zone
> files?

	Of course, this is a religious topic, and guided by needs at your
site, etc. In my case, 99.9% of the 10's of thousands of zones I manage
are for customers, and are generated by a script from some automated
process or another. Therefore, my style is tailored toward that
environment. I like the zone files to be compact, so that you can read
more data at a time, easy to understand (often these two are
contradictory), and most important, consistent. My general style is
something like this:

$TTL 8h
customerdomain.tld. IN SOA ns1.mydomain.com. postmaster.mydomain.com. (
       2000122207                      ; serial
       10800   3600  7084000 28800)
;      Refresh,Retry,Expire, Min TTL

               IN      NS      ns1.mydomain.com.
               IN      NS      ns2.mydomain.com.

               IN      A       22.33.44.55
               IN      MX 10   smtp.mydomain.com.

www            IN      A       22.33.44.55

The name of the domain is in the SOA for readability, and faster error
catching in config files, etc. The serial number is on its own line
because I catch the serial number from the file with a script for
incrementing purposes. The other SOA values are all together since they
don't change. I like the "empty hostname" style for records associated
with the domain itself, although it would be just as easy for scripting
purposes to use the FQDN instead. Personally I think it looks nicer this
way.

	My next evolutionary step will be to change the SOA values to
their more readable equivalents, like the $TTL value above. I'm also
considering putting in either a longer TTL just for the ns records
(trying to be a good net.citizen and reduce traffic to the roots), or a
longer TTL in general, since other than the rare customer who adds custom
dns records it's unusual for the data to change. The only thing slowing me
down is that on those rare occasions when a customer transfers away from
us, we don't want to cause them any problems in their new home. I'm
thinking seriously of going to 1d across the board though, opinions
welcome.

Enjoy,

Doug
-- 
    "Pain heals. Chicks dig scars. Glory . . . lasts forever."
        -- Keanu Reeves as Shane Falco in "The Replacements"

	Do YOU Yahoo!?




More information about the bind-users mailing list