How to configure a sub-domain?

Nate Campi nate at wired.com
Sun Dec 16 08:59:18 UTC 2001


On Sun, Dec 16, 2001 at 08:16:23AM +0000, those who know me have no need of my name wrote:
> 
> <9vdlsk$kmr at pub3.rc.vix.com> divulged:
> 
> >The named.conf file of the main domain server has:
> >
> >zone "domain.com" {
> >    type master;
> >    file "pri.domain.com";
> >};
> >
> >zone "sub.domain.com"{
> >    type slave;
> >    file "sec.sub.domain.com";
> >    masters {
> >        192.168.1.1;
> >    };
> >};
> 
> sub-domains are not created or maintained merely via nameserver
> configuration, the domains must themselves support the notion.  the
> containing domain must delegate the sub-domain, i.e., domain.com must
> contain one or more `ns' entries for sub.domain.com pointing to the
> sub-domain's authoritative nameservers and some glue so that those servers
> can be resolved.
> 
> e.g.,
> 
> zone file for domain.com:
> [...]
> sub    in ns ns.sub      ;delegate sub.domain.com
> ns.sub in a  192.168.1.1 ;glue
> 
> zone file for sub.domain.com:
> [...]
> @  in ns ns
> ns in a  192.168.1.1

Well, I'm not saying this is correct, right, good, or in any way
recommended, but if you keep the subdomain on the same host(s) as the
parent zone, you can create a subdomain/subzone without NS records in
the parent zone for the subdomain. You can create it in the BIND config
file, it'll load and it's RR's will resolve just fine (assuming the
zone/subdomain has the proper NS and SOA entries like any other zone).

I took over a bunch of BIND 8 servers that had many subdomains like
this, no delegation from the parent zone(s). Yikes that was ugly. It 
all worked, but it gave me the shivers to think about it too much ;)

OBTW, BIND 4 or 9 may not allow this, I don't know since I don't use
either one.
-- 
Nate Campi | Terra Lycos DNS | SF UNIX Operations | (415) 276-8678

Failure is not an option. 
It comes bundled with your Microsoft product. 



More information about the bind-users mailing list