Easy way to specify nodes on multiple domains?

Barry Margolin barry.margolin at level3.com
Mon Oct 13 18:12:47 UTC 2003


In article <bmepis$oln$1 at sf1.isc.org>,
Nickster <nickruss at .nospam=2=20=20.hotmail.com> wrote:
>Dear All,
>
>Is there an easy way to maybe "re-use" zone files to specify exactly the
>same host names/IP addresses for multiple domain names e.g.
>box1.domainname.org box1.domainname.com? Currently I'm having to duplicate
>entries between 2 zone files and it's a bit of a pain. Am I missing
>something really obvious!?

Make sure all of the names in the zone file are relative to the domain, and
then specify the same name in the "filename" attribute of the "zone"
statement.  To refer to the domain itself in the zone file, use '@',
e.g. the file common.db could contain:

@ IN SOA ...
  IN NS ns1.company.com.
  IN NS ns2.company.com.
  IN MX 10 mail

box1 IN A 1.2.3.4
www IN CNAME box1

Then in named.conf:

zone "domainname.org" {
  type master;
  filename "common.db";
};
zone "domainname.com" {
  type master;
  filename "common.db";
};

-- 
Barry Margolin, barry.margolin at level3.com
Level(3), Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.


More information about the bind-users mailing list