Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX IP Address and Client Management Administrator’s Guide: HP-UX 11i v2, HP-UX 11i v3 > Chapter 2 Configuring and Administering the BIND Name Service

Configuring a Slave Name Server

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

After configuring the master name server, you must set up the slave server to share the load with the master server, or to handle the entire load if the master server is down. The /etc/named.boot file informs the server whether it is a master or a slave server. The difference between a master server and a slave server is the source from which they obtain the data. The master server reads its data from files. A slave server loads its data over the network from another name server, usually the master name server, using a zone transfer. The slave server cannot load data from another slave name server.

The advantage of a slave server is that you need to maintain only one set of the DNS database files, and you need not synchronize these data files with other name servers.

A slave server can operate in either of the following methods:

  • The slave server can store the authoritative data in backup files on its disk. When this type of a slave server reboots, the slave server reads its data from the backup files and does not to rely on loading data from a master server. After it is booted, the slave server checks with the master server to verify that its data is up to date.

  • The slave server can store the authoritative data only in the memory. When this type of slave server boots, it always loads its data from a master server.

To set up a slave server, you need the following files:

  • named.conf

  • db.127.0.0

  • db.cache

This section explains how to configure a slave server in your domain. It discusses the following topics:

Creating Slave Server Data Files Using hosts_to_named

This section discusses the steps involved in creating the slave server configuration files using the hosts_to_named command.

  1. If you want your slave server to store its data in backup files on its disk, run the hosts_to_named command on the slave server as follows:

    /usr/sbin/hosts_to_named -z primary_server’s_IP_address

    If you want your slave server to always load its data from the master server, run hosts_to_named on the slave server as follows:

    /usr/sbin/hosts_to_named -Z primary_server’s_IP_address
  2. If you run hosts_to_named with the -z option, copy the file conf.sec.save from the current directory on the master server to the /etc directory on the slave server.

    If you run hosts_to_named with the -Z option, copy the file conf.sec from the current directory on the master server to the /etc directory on the slave server.

  3. On the slave server, rename /etc/conf.sec.save or /etc/conf.sec to /etc/named.conf.

  4. Copy the files /etc/named.data/db.cache and /etc/named.data/db.127.0.0 from the master server to the slave server.

The format of the data files copied from the master server is described in “Configuring a Master Name Server”.

An example named.conf configuration file for a slave server is shown in “Creating the Slave Server’s Data Files Manually”.

For more information on hosts_to_named, type man 1M hosts_to_named at the HP-UX prompt.

Creating the Slave Server’s Data Files Manually

To create the slave server’s data files manually, complete the following steps:

  1. Copy the files /etc/named.conf, /etc/named.data/db.cache, and /etc/named.data/db.127.0.0 from the master server to the slave server.

  2. On the slave server, make the following changes to the configuration file /etc/named.conf, using a text editor:

    • For every entry in the /etc/named.conf file containing the word primary, except the entry containing db.127.0.0, replace the word primary with the word secondary.

    • In every entry containing the word secondary, add the Internet address of the master server after the domain name.

    • If you do not want the slave server to store backup files on disk, delete the last field of every secondary line (the field that specifies the file name).

Following are the example /etc/named.conf configuration files for a slave server.

Example 1

The following example is a named.conf configuration file for a slave server that does not store the database information in a local file.

// generated by named-bootconf.pl
options {
check-names response fail;   //do not change this
check-names slave warn;
directory “/etc/named.data”;   //running directory for named
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an
* unprivileged port by default
*/
// query-source address * port 53;
};
//
// type domain source file
//

zone “0.0.127.IN.ADDR.ARPA” {
            type master;
            file “db.127.0.0”;
};

zone “div.inc.com”; {
            type slave;
            masters {
            15.19.8.119;
               };
};
zone “8.19.15.IN-ADDR.ARPA” {
             type slave;
             masters {
             15.19.8.119;
                };
};

zone “.” {
             type hint;
             file “db.cache”;
};

Example 2

The following example is a named.conf configuration file for a slave server that stores the database information in a local file.

// generated by named-bootconf.pl 
options {
check-names response fail;   //do not change this
check-names slave warn;
directory “/etc/named.data”;   //running directory for named
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* questions using port 53, but BIND 8.1 uses an
* unprivileged port by default.
*/
// query-source address * port 53;
};
//
// type domain source file
//
zone “0.0.127.IN.ADDR.ARPA” {
              type master;
              file “db.127.0.0”;
};

zone “div.inc.com”; {
               type slave;
               file “db.div”;
               masters {
                 15.19.8.119;
                 };
};
zone “8.19.15.IN-ADDR.ARPA” {
                type slave;
                file “db.15.19.8”;
                masters {
                15.19.8.119;
                 };
};

zone “.” {
                type hint;
                file “db.cache”;
};

In this example, the slave server uses the file db.div to store the database information. The slave server uses this file as a backup file. When the slave server reboots, it reads the authoritative data from the backup file, and later contacts the master server to verify the data. If the master server contains new data, the slave server saves this new data in the backup file.

The format of the data files copied from the master server is described in “Configuring a Master Name Server”.

Setting the Default Domain Name

You can initialize the default domain name either by specifying the domain name in the /etc/resolv.conf file or by specifying the host name using the hostname command in the /etc/rc.config.d/netconf file.

If you use an /etc/resolv.conf file on your host, configure the default domain name with the search or domain keyword. See “Configuring the Resolver to Query a Remote Name Server”.

If you do not use an /etc/resolv.conf file to configure the default domain name, follow these steps:

  1. Set the default domain name with the hostname command by appending the domain name to the host name. For example, type the following at the HP-UX prompt to set the default host name to indigo.div.inc.com:

    /usr/bin/hostname  indigo.div.inc.com

    Do not put a trailing dot at the end of the domain name.

  2. Set the HOSTNAME variable in the /etc/rc.config.d/netconf file to the same value, as in the following example:

    HOSTNAME=indigo.div.inc.com

Your default domain is now set.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.