two primary's

Robert Spangler mlists at
Thu Mar 6 01:48:01 UTC 2008

On Wednesday 05 March 2008 04:08, Chris Dorsman wrote:

>  Is it possible to have two primary DNS servers within an network?
>  If not: why not?

While everyone has his/her opinion on this, I believe you can run 2 master 
servers together on the same network.  One just needs to be a little clever 
in doing it.  I have a test lab setup (2 Masters, 4 Slaves) where I have 
played with this idea and it functions.  The idea is to be able to switch to 
the second master and make updates without having to make a bunch of 
configuration changes.

The setup is simple enough, you just have to tell each master that the other 
is the master of the zone and to notify the other when it is updated.

for example:

Master A's named.conf:

        zone "" IN {
                type slave;
                file "";
                notify yes;
                also-notify { "B's IP"; };
  masters { "B's IP"; };

Master B's named.conf:

        zone "" IN {
                type slave;
                file "";
                notify yes;
                also-notify { "A's IP"; };
   masters { "A's IP"; };

NS Servers named.conf:

        zone "" IN {
                type slave;
                file "";
                notify no;
  masters { "A's IP"; "B's IP"; };

Now when ever A is updated it will notify all the other DNS servers including 
B.  Should A go off line then you can still update B and it will continue to 
update the slaves.  When A comes back on-line again it will poll B for the 
latest and it too will be updated with the latest information.  You then can 
decide to continue updating B or switch back to A and have nothing missing or 
take the change that you fat fingered something in the config files while 
switching masters.

If someone doesn't like the idea that no server conf states that it is the 
master you could alway tell each master that they are the master for that 
zone and then allow the other master to update the zone.  But when A comes 
back on line there seems to be a delay in it getting updated.

I haven't done any in depth testing of this setup to date but plan on testing 
some more ideas I have when time permits.

If anyone has valuable information about this setup I'm all ears.
Everything else goes to /dev/null



Smile... it increases your face value!
Linux User #296285

More information about the bind-users mailing list