Network: DNS: Setting up a SLAVE dns server

(last edit: 2001-07-03)


I've explained how to setup a master dns server in the arcticle DNS: Setting up a dns server, this article will explain how to setup a SLAVE dns server which imports it's zone files from the master dns server. The basic setup is the same as with a master dns server. You'll need to setup the following files:
  • localhost.rev
  • named.conf
  • named.root (no need to change anything in this file)
The localhost.rev is identical as with a master dns server so I won't discuss it here.


The first part of the 'named.conf' file is exactly the same as with a master dns server here is an example (of the first part of the file) --- options { directory "/etc/namedb"; forwarders { [dns-server 1]; [dns-server 2]; }; query-source address * port 53; }; zone "." { type hint; file "named.root"; }; zone "0.0.127.IN-ADDR.ARPA" { type master; file "localhost.rev"; }; --- After this part things start to change, normaly you would start to put zone file in but now you have to place something like this in: --- zone "1.168.192.IN-ADDR.ARPA" { type slave; file "domain.rev"; masters {; }; } zone "" { type slave; file ""; masters {; }; }; --- The slave dns server will contact the master dns server, specified in 'masters' for each zone and retrieves the zone file. The 'file' statement makes sure that the retrieved zone file is stored to file. This is very usefull in many ways: your dns server boots faster, you can easily view the zone files, etc, etc. Well that's basicly it. A lot easyier than a master server!!!

Click here to go back to the index.