multiple dns servers on same domain?

Kevin Darcy kcd at daimlerchrysler.com
Thu Aug 30 22:44:04 UTC 2001


Barry Margolin wrote:

> In article <9mluli$5dv at pub3.rc.vix.com>,
> Savas Pavlidis <_pavlidis_ at yalco.gr> wrote:
> >
> >I know that this must be a stupid question, but....
> >I have one domain, and two subnets
> >on the same domain.
> >I would like to have a separate dns server
> >for each subnet.
> >the first subnet has address from 10.1.1.1 to 10.1.1.254
> >the second from 10.1.2.1 to 10.1.2.254
> >All hosts should be in the form
> >{hostname}{domainname}.
> >This means that same zone should
> >appear on the servers ( the {domainname} zone)
> >and this must be illegal./
> >Each dns server should have the other
> >as slave.
>
> Do you mean that if someone with a 10.1.1.x address looks up host111.domain
> they should get 10.1.1.111, but if someone with a 10.1.2.x address looks up
> host111.domain they should get 10.1.2.111?
>
> You should be able to do this with BIND 9's "views" feature.  Each server
> would have a view for each subnet.  In one view, server A would be the
> master and B would be the slave, while in the other view server B would be
> the master and A would be the slave.

I'm not sure that that is what the original poster was asking, but if it
was,"sortlist" might be a better approach. Define each entry with both
IP addresses and put

sortlist {
    { 10.1.1/24; 10.1.1/24; };
    { 10.1.2/24; 10.1.2/24; };
};

in your options statement. That way you only have to maintain one copy of the zone
file. The only caveat is that if one of the addresses for a name is unavailable, a
client trying to connect to it may fail over to the other address, i.e. the one on
the wrong subnet. This could either be a benefit or a drawback, depending on why
you're trying to do this in the first place.

If Barry and I have misunderstood the question and all you want to do is have two
nameservers serving the same zone, then just set up one as master and the other as
slave. (Hey, you did say it was a "stupid question", so maybe the answer really is
this simple).


- Kevin



More information about the bind-users mailing list