Chapter 6. BIND

Table of Contents
6.1. Introduction
6.2. Making a caching nameserver

6.1. Introduction

The domain name system (DNS) is used to convert human-friendly host names (for example www.slackware.com) to IP addresses. BIND is the most widely used DNS daemon, and will be covered in this chapter.

6.1.1. Delegation

One of the main features is that DNS requests can be delegated. For example, suppose that you own the "linuxcorp.com" domain. You can provide the authorized nameservers for this domain, you nameservers are authorative for the "linuxcorp.com". Suppose that there are different branches within your company, and you want to give each branch authority over their own zone, that is no problem with DNS. You can delegate DNS for e.g. "sales.linuxcorp.com" to another nameserver within the DNS configuration for the "linuxcorp.com" zone.

The DNS system has so-called root servers, which delegate the DNS for millions of domain names and extensions (for example, country specific extensions, like ".nl" or ".uk") to authorized DNS servers. This system allows a branched tree of delegation, which is very flexible, and distributes DNS traffic.

6.1.2. DNS records

The following types are common DNS records:

Table 6-1. DNS records

PrefixDescription
AAn A records points to an IP address.
CNAMEA CNAME record points to another DNS entry.
MXA MX record specifies which should handle mail for the domain.

6.1.3. Masters and slaves

Two kinds of nameservers can be provided for a domain name: a master and slaves. The master server DNS records are authorative. Slave servers download their DNS record from the master servers. Using slave servers besides a master server is recommended for high availability and can be used for load-balancing.

6.2. Making a caching nameserver

A caching nameserver provides DNS services for a machine or a network, but does not provide DNS for a domain. That means it can only be used to convert hostnames to IP addresses. Setting up a nameserver with Slackware Linux is fairly easy, because BIND is configured as a caching nameserver by default. Enabling the caching nameserver takes just two steps: you have to install BIND and alter the initialization scripts. BIND can be installed by adding the bind package from the "n" disk set. After that bind can be started by executing the named(8) command. If want to start BIND by default, make the /etc/rc.d/rc.bind file executable. This can be done by executing the following command as root:


# chmod a+x /etc/rc.d/rc.bind

If you want to use the nameserver on the machine that runs BIND, you also have to alter /etc/resolv.conf.