Metainformationen zur Seite

DNS Master/Slave-Server konfigurieren

This article is all about configuring DNS in master/slave mode.

Master DNS contains the zone files for all the domains for which it is authoritative. This zone information will be transfered to the slave machine when „named“ is started.

Here we need two machines with BIND rpm installed; one to be kept as master and the other to be kept as slave. In this example I use as master and as slave. Also, here I take as the machine where I host my domain and mail.

Do the following in master.

1. Login as root.

2. Find out the path to the named configuration file.Usually it will be /etc/named.conf.

3. Edit the conf file.

4. Give the following entries in it.


zone "" IN {
  type master;
  file "/var/named/";

Here „allow-transfer“ is given to transfer the zone information to the slave machine. The zone entry for the domain is given to show that this machine is authoritative for the domain. The information about the domain is stored in another file (/var/named/ ), as you can see in the conf file.

A sample zone file can be given as:

$TTL 86400
@       IN     SOA    localhost (
                    2007110901 ; serial
                    21600       ; refresh after 6 hours
                    3600        ; retry after 1 hour
                    604800      ; expire after 1 week
                    86400 )     ; minimum TTL of 1 day

              IN     NS
              IN     NS
              IN     MX      10     mail
              IN     A
mail          IN     A
www           IN     A

5) restart named

service named restart

When named is restarted, it will read the configuration file, and will go to that file which contains the zone information for a particular domain. Then it tries to transfer this information to the slave.

Do the following in Slave machine:

1. Login as root

2. Edit the conf file

3. Add the following to it:

zone "" IN {
 type slave;
 masters {
 file "/var/named/";

4. restart named.

named will read the conf file and will listen for the master. The master will transfer the zone information to slave and the file will be stored in „/var/named/“.

Thus once the zone information is passed to the slave, it is done. You have configured DNS in master-slave mode.


Geben Sie Ihren Kommentar ein. Wiki-Syntax ist zugelassen: