The DNS specs define two types of name servers: primary masters and
secondary masters. A primary master name server for a zone reads the
data for the zone from a file on its host. A secondary master name
server for a zone gets the zone data from another name server that is
authoritative for the zone, called its master server. Quite often, the master server is the zone’s primary master, but that’s not required: a secondary master can load zone data from another secondary. When a secondary starts up, it contacts its master name server and, if necessary, pulls the zone data over. This is referred to as a zone transfer. Nowadays, the preferred term for a secondary master name server is a slave, though many people (and much software, including Microsoft’s DNS Manager) still call them secondaries.
Both the primary master and slave name servers for a zone are authoritative for that zone. Despite the somewhat disparaging name, slaves aren’t second-class name servers. DNS provides these two types of name servers to make administration easier. Once you’ve created the data for your zone and set up a primary master name server, you don’t need to fool with copying that data from host to host to create new name servers for the zone. You simply set up slave name servers that load their data from the primary master for the zone. Once they’re set up, the slaves will transfer new zone data when necessary.
Slave name servers are important because it’s a good idea to set up more than one name server for any given zone. You’ll want more than one for redundancy, to spread the load around, and to make sure that all the hosts in the zone have a name server close by. Using slave name servers makes this administratively workable.
Calling a particular name server a primary master name server or a slave name server is a little imprecise, though. We mentioned earlier that a name server can be authoritative for more than one zone. Similarly, a name server can be a primary master for one zone and a slave for another. Most name servers, however, are either primary for most of the zones they load or slave for most of the zones they load. So if we call a particular name server a primary or a slave, we mean that it’s the primary master or a slave for most of the zones it loads.
The files from which primary master name servers load their zone data
are called, simply enough, zone data files or just data files. We
often refer to them as db files, short for database files. Slave name
servers can also load their zone data from data files. Slaves are
usually configured to back up the zone data they transfer from a
master name server to data files. If the slave is later killed and
restarted, it will read the backup data files first, then check to see
whether the data are current. This both obviates the need to transfer
the zone data if it hasn’t changed and provides a source of the data
if the master is down.
The data files contain resource records that describe the zone. The
resource records describe all the hosts in the zone and mark any
delegation of subdomains. BIND also allows special directives to
include the contents of other data files in a data file, much like the
#include statement in C programming