
62
|
Chapter 3: The Domain Name System
server2.centralsoft.org’s named.conf file resembles that of the primary nameserver,
with a few differences:
options {
pid-file "/var/run/bind/run/named.pid";
directory "/etc/bind";
// query-source address * port 53;
};
zone "." {
type hint;
file "db.root";
};
zone "0.0.127.in-addr.arpa" {
type master;
file "db.local";
};
zone "centralsoft.org" {
type slave;
file "sec.centralsoft.org";
masters { 70.253.158.42; };
};
The most important difference is one we discussed earlier in this chapter. The type
slave;
line in the final zone statement indicates that this is a slave zone. In the file
line we specify the filename where the slave zone should be stored, and in the
masters line we specify the IP address of the primary nameserver.
That’s all we have to do to set up the secondary nameserver.
Restart named on server2.centralsoft.org, and soon after you should find the file /etc/
bind/sec.centralsoft.org on your secondary nameserver. What has happened? The sec-
ondary nameserver has contacted the primary nameserver, which has transferred the
zone to it.
Now whenever you update a zone on the primary nameserver, make sure the serial
number increases. Otherwise, the updated zone will not transfer to the secondary
nameserver.
BIND Tools
As we mentioned early in this chapter, BIND comes in three pieces: the named dae-
mon, the resolver library, and some tools.
One tool you have ...