Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm a little confused about the difference between a "secondary name server" and a "slave name server" and a "primary name server" and a "master name server"  

I understand that a slave name server queries the master and updates itself based on changes to the master.  What I'm not sure of is, say I'm setting up 2 name servers:

ns1.example.com
ns2.example.com

Should both of these be setup as "primary and master" and then any secondary name servers be setup as slaves?  Or should there only be ONE primary master at any given time, and all other name servers should be slaves?

I've read a few guides and lots of man pages, but I haven't come across this issue yet in my reading.  Anyone have a pointer to a reference for this type of thing?  Or know what the best practice is for setting up multiple DNS servers?

share|improve this question
add comment

2 Answers 2

Normally you define one master server and all others are slave servers. You could order them as being primary and secondary, but I think this is just a name convention.

For the Bind DNS server for example:

In the master config you can specify to notify all other name servers by adding the following line to your zone definition:

zone "example.com"{
    type master;
    file "example.com";
    notify yes; // Add this line to enable Notifications
}

This will cause all other|slave name servers to receive a notification that the zone has updated. You might wonder where to specify what name servers will receive these notifications, well you can specify them in your zone definition using:

allow-notify host|ip;

See: http://www.zytrax.com/books/dns/ch7/xfer.html

By default all name servers specified in the SOA record will receive updates of the zone.

See:

http://www.zytrax.com/books/dns/ch8/soa.html

share|improve this answer
add comment

No, you usually have only one master. Sometimes you even have a hidden master: it's not reachable from "the internet", just your slaves get updates from it. And the updates usually flow in the form: master sends notification to slaves there has been an update (and its serial number), slaves ask the master to send them a complete zone if the serial is newer (sometimes a slave gets the notification multiple times).

For primary/secondary: that's (afaik) pure slang in web-interfaces for domains. Basically because most of them require you to give two nameservers.

For your example, let ns1 be master and ns2 be the slave and be done with it.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.