How to setup Multiple domains on a single IP

Matt Larson mlarson at verisign.com
Fri Jul 26 14:10:24 UTC 2002


> Question 1) Can I have mutlitple nameservers registered on one ip
address
> like what I've done above. (If yes , then what domain name will  a
reverse
> lookup for the ip 1.2.3.4 return ?).

Yes.  You can use multiple PTR records, indicating that a given IP
address reverse maps to three different domain names.  This
configuration is legal, but somewhat useless--most applications are only
prepared to deal with one PTR record.  Better and less complicated,
IMHO, would be picking names for your name server hosts and using those
for all your zones.  See my answer to #4 below.

>    2) Assuming yes as the answer for the first question, how do i
configure
> named.conf on host ns1. How can I setup reverse lookup records for all
the
> three domains . I can use 3.2.1.in-addr.arpa for any one domain say
abc.com.
> How is the entry for the reverse mappings going to be for the other 2
> domains. Can i add another map as 3.2.1.in-addr.arpa for xyz.com and
def.com

You would put three PTR records in the 3.2.1.in-addr.arpa zone file for
a given IP address.  But see #4 below.

> 3) How is my resolv.conf file going to be? I have setup mine as
follows. Any
> corrections to be made ??
>
> domain abc.com
> domain xyz.com
> domain def.com
> search abc.com xyz.com def.com

"search" and "domain" are mutually exclusive--you can have one of each,
but not both, and certainly not multiple "domain" directives as you've
done.  Remove the three "domain" directives.  "man resolv.conf" for more
information.

> 4)Is there any other simple way to setup multiple domains on a single
> ipaddress ? Can I point my domains xyz.com & def.com to ns1.abc.com
and just
> put a address record for these  2 domainnames
> If so how is my named.conf file going to be on ns1.abc.com ?

Your named.conf wouldn't change, but the zone file contents would.
Let's say you decide to name your name servers ns1.abc.com and
ns2.abc.com.  You'd have the following information in the various zone
files:

; In the abc.com zone file
abc.com.  in  ns  ns1.abc.com.
abc.com.      ns  ns2.abc.com.
ns1.abc.com.  a   1.2.3.4
ns2.abc.com.  a   1.2.3.5

; In the def.com zone file
def.com.  in  ns  ns1.abc.com.
def.com.      ns  ns2.abc.com.

; In the xyz.com zone file
xyz.com.  in  ns  ns1.abc.com.
xyz.com.      ns  ns2.abc.com.

Now your reverse mapping problem is solved, since the hosts at 1.2.3.4
and 1.2.3.5 have only one name.  That's certainly how I would set things
up.

Matt
--
Matt Larson <mlarson at verisign.com>
VeriSign Global Registry Services




More information about the bind-users mailing list