SUMMARY: alternate DNS zone setup

sburch@derwent.co.uk
Thu, 19 Jun 1997 12:37:41 +0100

My original query was as follows :-


I have a situation where we want to alias our DNS zone e.g allow our
zone name to be referenced by another name e.g.

derwent.co.uk
derwent-B.co.uk

I have done this before using and as I recollect we need to do two
things,

1) change our /etc/named.boot file to include the alternate zone name,
something like :-

/etc/named.boot

directory /var/named
cache . named.ca
primary derwent.co.uk zone-A.hosts
primary derwent-B.co.uk zone-B.hosts
primary 193.128.218.in-addr.arpa in-addr.arpa.zone primary
0.0.127.in-addr.arpa named.local

2) Set up the zone files for the alternate zone (e.g. derwent-B) set
up to point back at the main zone name (i.e. derwent) with CNAME's as
follows.


/var/named/derwent-B.co.uk

@ IN SOA ns1.derwent.co.uk. sburch.derwent.co.uk. (
199618040 ; Serial
10800 ; Refresh every 3 hours
3600 ; Retry every hour
604800 ; Expire after a week
86400 ) ; Minimum ttl of 1 day
NS ns1.derwent.co..uk.
NS ns2.derwent.co.uk.
derwent-B.co.uk. MX 5 mail-hub.lgu.ac.uk. hosta
CNAME hosta.derwent.co.uk. hostb CNAME
hostb.derwent.co.uk. hostc CNAME
www.derwent.co.uk. www
...
...
...

I got two different replies as follows :-


1) From Jochen Bern <bern@TI.Uni-Trier.DE>


Especially when the Objective is to have the Domain Name *switched
over* to the other in the long Run, I'ld suggest to avoid CNAMEs
(sendmail, Web Robots etc. might decide to replace CNAMEs with primary
Names,
which leaves you glued to Square one). Try the following:

1) Introduce the second Domain to your named.
2) As Source File for the direct Map, use THE VERY SAME Data as for
the
old direct Map. (If you use plain Files, convert one into the other
with sed -e 's/old\.dom\.ain/new\.dom\.ain/g' ; If you have some other
Mechanism create this File, e.g., from /etc/hosts, duplicate the
Mechanism with appropriate Changes.)
This might require minor Changes (you can't do "$ORIGIN co.uk. -
host.derwent IN A ..." anymore), but they improve your Setup's Sanity,
so they're not really for naught ...
3) Depending on what your Mechanism to automatically produce the
indirect
Map is (you SHOULD determine the indirect Map from the direct Map
automatically!), you'll either want to find the Place where you get to
select the direct Map they're derived from, or have it run on
both Domainnames and select the appropriate Output File in named.boot.
4) Announce the new Domain to the NIC.
5) Once the new Domain "is stable" (takes nothing but having the NIC
have it referring to your Nameserver and debugging the Changes in 2)
and 3)), you can reiterate Step 3) and have the PTRs point to the new
Domainname instead of the old.
6) When finally the Changeover has settled and you want to remove the
old Domain from the direct Maps, too, just unregister it from the NIC
and undo Step 2) so that only direct Maps for the new Domain get
produced.

However, if you intend to use both Names instead of just changing
over, CNAMEs are definitely the Way to go (as they don't introduce
Hostnames with improper indirect Mapping).


2) From rali@meitca.com (Reto Lichtensteiger)

The suggestion here was to just point the altenate zone at the
existing primary zone as follows :-

primary derwent.co.uk zone-A.hosts
primary derwent-B.co.uk zone-A.hosts
primary 193.128.218.in-addr.arpa in-addr.arpa.zone primary
0.0.127.in-addr.arpa named.local


If your zone file is in the format:

hostname IN A 111.222.111.222

Then bind will append the contents of the $ORIGIN macro (ie, whatever
you have in the second field of the primary statement in named.boot)
to the hostname. Thus the same zone file can be used for

hostname.derwent.co.uk and
hostname.derwent-B.co.uk

This trick will only work, of course, if you want all the systems to
be identical. You can use FQDN names for hosts that exist only in one
domain or t'other, but named will complain ...

<> 3) Contact the Intern-nic (?) with regarding our dual zone
authority.

I don't think they'd care about "dual zone authority"; simply tell
whoever runs co.uk. that your server is primary for derwent-B.co.uk.


To summarise I havn't actually implemented the zone yet but as we intend to
run two identical zones rather than changing our zone name I will be using
the try the latter of the two suggestions.

Many Thanks to the respondees

**************************************************************************
* *
* Stuart Burch Derwent Information Publishing *
* (System Administrator/Developer) 14 Great Queens Street *
* London *
* Group Business Development WC2B 5DF. *
* *
* Email: sburch@derwent.co.uk Tel: 0171-344 2800 x 3001 *
* *
**************************************************************************