[bind10-dev] Zone loading requirements, take 1
Shane Kerr
shane at isc.org
Mon Mar 5 18:58:06 UTC 2012
Evan,
On Monday, 2012-03-05 17:14:12 +0000,
Evan Hunt <each at isc.org> wrote:
> > of course, if you don't provide an zone name, and don't start out
> > with the SOA, another question would be 'What apex?'
>
> Don't you generally know the zone origin before loading? This is a
> legal zonefile, for instance (it's specified in an RFC, even!):
>
> @ 86400 IN SOA @ . 0 28800 7200 604800 86400
> @ 0 IN NS @
In the context of zone loading, "origin" means "the thing that we tack
onto relative domain names". The origin might not be known before
loading.
RFC speaks thusly:
Domain names which do not end in a dot are called relative; the
actual domain name is the concatenation of the relative part with
an origin specified in a $ORIGIN, $INCLUDE, or as an argument to
the master file loading routine. A relative name is an error when
no origin is available.
So there are three ways that the origin can be set, but a zone can load
happily without one.
If we are referring to the domain actually being loaded, in this
requirements document I've tried to allow for software that tries to
"do the right thing", and figure out the zone based on available
information:
3.2.6 Guessing zone name
If the name of the zone is not specified, the loader should guess
based on the SOA in the zone, or using the name of the file (if
any). A flag indicating that the name was guessed must be set, and
a way to get the name provided.
3.2.7 Setting origin
It must be possible to set the origin when loading a zone, or to
leave it as unset.
The idea is that I should be able to simply specify:
$ b10-zoneloader example.com.zone
And BIND 10 should be able to figure out that I am loading example.com
if it is unambiguous from context. (This is an annoyance of mine from
zone signing today.)
This might be scope creep, but I think it is not too hard and would be
nice.
> > half-related; if we *write* zone files, I think we should start out
> > with the SOA :)
>
> Definitely. Principle of least astonishment, if nothing else.
I was thinking the requirements for writing a zone file would be
simpler than reading a zone file, but then I began to think of all the
wonderful, wonderful options that one might want to use...
But outputting correct zone files reminded me to look at the options
for named-checkzone, which I had not yet done. I discovered that there
was no requirement to check for missing A/AAAA records referred to by
NS, MX, or SRV records. I have added that in as 3.6.6.
--
Shane
More information about the bind10-dev
mailing list