I'm sure it's simple but...

Barry Margolin barmar at genuity.net
Mon Aug 6 23:39:29 UTC 2001


In article <9kn7lg$cus at pub3.rc.vix.com>, Ted Wood  <twood at twu.edu> wrote:
>
>I recently began administering bind for twu.edu and have been requested to
>make a number of domains point to www.twu.edu and I have two questions.
>
>1. Do I have to actually create zone files for each one or is there a way to
>do it with cnames or some other shortcut?

If you have two zones whose contents are entirely identical, you can
reference the same zone file in their respective zone statements:

zone "domain1.com" {
  type master;
  file "common.db";
};
zone "domain2.com" {
  type master;
  file "common.db";
};

Just make sure that all entries within common.db use relative names when
they need to create or refer to names in the respective domain.

If the domains are only partially identical, you can put the common stuff
in a separate file and use $INCLUDE in their zone files to include it as a
part of each of those domains.

>2. How do you point an ip address at just a domain name, ie: twudallas.org,
>as opposed to something like www.twudallas.org?

twudallas.org. IN A 1.2.3.4

As a shorthand, @ in a zone file is an abbreviation for the current origin,
which defaults to the zone name.  So:

@ IN A 1.2.3.4

-- 
Barry Margolin, barmar at genuity.net
Genuity, 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