multiple domains in one zone file

Kevin Darcy kcd at daimlerchrysler.com
Fri Oct 27 20:13:34 UTC 2000


Techdog wrote:

> Ok, I am learning here.
>
> Now, I have a number of domains on my primary server and they are all listed
> in one zone file.
>
> The NAMED.BOOT file looks like this:
>
> primary domainone.com domains.db
> primary domaintwo.com domains.db
> primary domainthree.com domains.db
> primary domainfour.com domains.db
> primary domainfive.com domains.db
>
> and so on.
>
> The domains.db file looks like this:
>
> domainone.com.   IN  A   123.123.123.1
> domaintwo.com.   IN  A   123.123.123.2
> domainthree.com.   IN  A   123.123.123.3
> domainfour.com.   IN  A   123.123.123.4
>
> and so on.

I assume you have an SOA record and some NS records in there as well...

> Is this incorrect?

In short, yes. If all of your domain names resolved to the same IP address,
then you could get away with using the same zone file for all of your zones
(you could use relative address and "@", but let's not get into that right
now). However, since the names resolves to different IP addresses, you need
separate files for each zone.

> Here is the problem: My secondary is having problems getting all this
> onformation into its zone file. It gives error messages about how the
> primary server is not SOA for all these domains.

> Is it a bad thing to list multiple domains in one zone file? How do I
> establish SOA for each one?
>

Please don't use "authoritative" and "SOA" interchangably. They are different
concepts. An SOA is a type of DNS resource record; i.e. something that named
loads from a zone file or learns from another nameserver. Authoritativeness is
matter of nameserver configuration; something that named determines from its
named.conf (or, in your case, named.boot) file, based on whether there is a
"type master"/"type slave" zone definition, or, in the case of named.boot, a
"primary" or "secondary" directive, for the zone.

What's probably happening is that your nameserver is not loading the zones
properly because each zone file it reads (even though they're all the same
file; named doesn't notice that fact) contains data which doesn't belong there.
It will still serve up what data it can from those zones, but because of the
error, will respond non-authoritatively. Zone transfers require
authoritativeness, and have therefore broken.

You really need to read some HOWTO's or get the _DNS_and_BIND_ O'Reilly
book....


- Kevin





More information about the bind-users mailing list