Separate zone files for each of the sub-domain

Kevin Darcy kcd at daimlerchrysler.com
Wed Jul 11 22:35:13 UTC 2001


Danie I. wrote:

> Hi there,
> I shall appreciate for the help on follwing:
>
> At a name server,
> can we create separate zone files for each of
> the subdomains instead of entring in the main
> domain's zone.

Your question is unclear, but either way I parse it, the answer is
"yes".

If you want separate *zones* for those subdomains, then you can delegate
them out and put separate "zone" definitions in named.conf for them, in
which case obviously you can also store then in separate files. Each
zone needs its own SOA record and a set of NS records, in addition to
the delegations from the parent. Also, your slaves will need to know
about the new subzones if you want the same degree of redundancy for
them as you have for the parent zone.

On the other hand, if you want to keep the subdomains in the *same*
zone, but you just want to store each one in a separate file, then use
$INCLUDE directives in the (main) zonefile. In this case, since
everything stays in the same zone, you wouldn't need the extra NS and
SOA records, and you wouldn't need additional "zone" definitions in
named.conf on the master or the slaves.

An important distinction here is between a "zone" and a "zonefile".
Through the $INCLUDE mechanism, a single zone can be loaded from
multiple zonefiles. Conversely, some folks load multiple zones from the
_same_ zonefile (but let's not confuse matters). Another important
distinction is between "zones" and "domains". Every zone is a domain (or
subdomain), but not every domain/subdomain is a zone. It's possible to
store many subdomains, or even many levels of subdomains, in a single
zone. The main reasons to delegate off a subdomain into a separate zone
are to delegate control of it to some other organization, or just to
break up your namespace in order to reduce zone-transfer overhead. As
explained above, it is *not* necessary to delegate a subdomains as a
subzone, just so you can keep the data in a separate file.


- Kevin




More information about the bind-users mailing list