DNS: Two domains, Same server?

Kevin Darcy kcd at daimlerchrysler.com
Thu Jan 27 19:50:08 UTC 2000


Hole, Ashley wrote:

> Hi ,
>
> We are wanting to run a second domain on a specific name server and I have a
> couple of questions:
>
> I know that we have to add the new primary into the named.boot file, but how
> does that effect the db files when we do the hosts_to_named translations if
> it is for the same network.
>
> example, if I do:
>
> hosts_to_named -d domaina -n 150.150 -- the db.150.150 and db.domaina will
> be produced   - Correct???
>
> and then
>
> hosts_to_named -d domainb -n 150.150 -- does the db.150.150 get overwritten
> and only domainb will do the address translations?

I assume "hosts_to_named" is just another name for "h2n", am I correct? I've
never used h2n, but from the documentation, it seems that you could just run it
for domainb with the -n option, and therefore it wouldn't overwrite the reverse
file. Unfortunately, this means you'd have domainb A records without any
corresponding PTR's, which is generally a Bad Thing.

> I guess what I am asking is:  Is there a way to alias domaina with domainb.

There is a proposed standard (RFC 2672) that'll do what I think you want to do,
but it appears to be unimplemented in BIND. In the meantime, then, if the
partial solution above is unsatisfactory, you need a way of generating aliases
in domainb for every A record in domaina. I'd suggest putting a wrapper around
"hosts_to_named" and running a script after it's finished processing domaina to
parse each A record from that zone file and write a CNAME into domainb's zone
file for it. It might be convenient to keep all of these CNAMEs in a separate
$INCLUDE file so that you can just overwrite the whole file without disturbing
the SOA, NS records, etc. (but don't forget failsafes and sanity checks for the
file overwrite!). You'll need to update the serial # every time the zonefile is
updated, of course.


- Kevin





More information about the bind-users mailing list