same DNS server serving multiple subdomains

I. Herman izzmo at mediaone.net
Mon Dec 18 21:29:54 UTC 2000


In reading through DNS & BIND 3rd ed there's some ways of doing they
suggest..then how we do it @ work.

Adapted from the book DNS and BIND, 3rd Ed and BIND 8 by Albeitz and Liu,
O'Reilly Publishing.  A must have for DNS administrators IMHO.

NS Records look like the following, example:
for db.192.253.254 --

1.254.253.192.in-appr.arpa.  86400 IN  NS ns1.foo.com
1.254.253.192.in-appr.arpa.  86400 IN  NS ns2.foo.com

2.254.253.192.in-appr.arpa.  86400 IN  NS ns1.foo.com
2.254.253.192.in-appr.arpa.  86400 IN  NS ns2.foo.com

or

easier if you are using a /24 network and say, your subnets are between 1
and 62 (0 and 63 reserved for loopback and broadcast):
partial contents of db.192.253.254:

1.254.253.192.in-appr.arpa.  IN  CNAME  1.0-63.254.253.192.in-appr.arpa.
2.254.253.192.in-appr.arpa.  IN  CNAME  2.0-63.254.253.192.in-appr.arpa.
...
0-63.254.253.192.in-appr.arpa.    86400    IN    NS    ns1.foo.com
0-63.254.253.192.in-appr.arpa.    86400    IN    NS    ns2.foo.com

and for the zone data file for 0-63, it can just contain the PTR records for
IP addresses 192.253.254.1 - 192.254.253.63

1 IN PTR subdom1.foo.com
2 IN PTR sub2.foo.com
3 IN PTR sub3.foo.com
..
63 IN PTR sub63.foo.com

*********
how we do it @ work is make a separate zone file for each domain and add it
in the named.conf file:

zone "sub1" in {
    type master;
    file "sub1.rzone";
)

zone "sub2" in {
    type master;
    file "sub2.rzone";
)

and for the zone files we do it as we would any other way for one sub:

63.253.254.192    IN    PTR    ns1.foo.com
or
63.253                  IN    PTR    ns1.foo.com (to the first different
number)

In reality the way the book says is probably the safest...that's why they
get the big dollars and thousands of ppl around the world use their book as
the DNS bible.

Hope this helps...






More information about the bind-users mailing list