Configuring domain name servers - BIND version 9.4

In this scenario, a controller name server, worker name server, and hint name server will be configured to perform name resolution. Each name server will be a separate machine, and each will have an /etc/named.conf file configured, although the information in each will be different. The /etc/named.conf is read each time the named daemon is started, and it specifies what type of server it is (controller, worker, or hint) and where it will get its name resolution data. Each of these name servers will be running BIND 8.

Note: Controller name server and worker name server are conventionally known as master name server and slave name server. These terms are used interchangeably to use more inclusive language.

The controller name server will be configured to provide name resolution for the abc.aus.century.com zone. In this scenario, the IP address of the controller name server is 192.9.201.1, and its host name is venus.abc.aus.century.com. It will provide name resolution for the venus, earth, mars, and jupiter host names. The /etc/named.conf file will be configured to specify that the named daemon should search the /usr/local/domain directory for its data files. The data files that will be configured for the controller name server are named.ca, named.abc.local, named.abc.data, and named.abc.rev.

A worker name server will then be configured. The host name of the worker name server will be earth.abc.aus.century.com, and its IP address will be 192.9.201.5. In the worker name server's /etc/named.conf file, we will specify the controller name server's address so that the worker name server can replicate the controller name server's named.abc.data and named.abc.rev files. In addition, the named.ca and named.abc.local data files will be configured for this server.

A hint name server will then be configured. The hint name server will store a local cache of host name and address mappings. If a requested address or host name is not in its cache, the hint server will contact the controller name server, get the resolution information, and add it to its cache. In addition, the named.ca and named.abc.local data files will be configured for this server.

All information in the named data files (not the /etc/named.conf file) on the name servers must be in the Standard Resource Record Format. For explanations about the information about the named data files, see Standard Resource Record Format for TCP/IP in Files Reference.

The administrator for each of the name servers will be gail.zeus.abc.aus.century.com. This is specified in the local data files on each name server. In addition, in this scenario, the root name server is relay.century.com with IP address 129.114.1.2.

At the end of this scenario, name resolution will be provided for the hosts venus, earth, mars, and jupiter. In addition, reverse name resolution (IP address-to-host name) will also be provided. When a request is received that cannot be resolved, the controller name server will contact relay.century.com to find the information needed.

Things to Consider
  • The information in this how-to scenario was tested using specific versions of AIX®. The results you obtain might vary significantly depending on your version and level of AIX.

Step 1. Configure the Controller Name Server

  1. On the controller name server, open the /etc/named.conf file. If there is no /etc/named.conf file in the /etc directory, create one by running the following command:
    touch /etc/named.conf
    Do the following to configure the /etc/named.conf file:
    1. Specify a directory clause in the options stanza. This enables the named data files to use paths relative to the /usr/local/domain directory. In this scenario, the following was added:
      options {
          directory "/usr/local/domain";
      };
      If you choose not to specify a directory here, the /etc directory will be searched for the necessary data files.
    2. To allow record data to be cached outside of the defined zones, specify the name of the hint zone file. In this scenario, the following was added:
      zone "." IN {
          type hint;
          file "named.ca";
      };
    3. Add the following stanzas to specify each zone, the type of name server you are configuring, and your name server's domain data file. In this scenario, the controller server for both forward and reverse zones is the following:
      zone "abc.aus.century.com" in {
          type master;
          file "named.abc.data";
      };
      zone "201.9.192.in-addr.arpa" in {
          type master;
          file "named.abc.rev";
      };
    4. Define the name of the named local file. For example:
      zone "0.0.127.in-addr.arpa" in {
          type master;
          file "named.abc.local";
      };
      After editing the file, save and close it.
  2. Open the /usr/local/domain/named.ca file. Add the addresses of the root name servers for the domain. The following was added in this scenario:
    ; root name servers.
    .          IN    NS    relay.century.com.
    relay.century.com.   3600000    IN    A     129.114.1.2
    After editing the file, save and close it.
  3. Open the /usr/local/domain/named.abc.local file. Add the following information:
    • The start of authority (SOA) of the zone and the default time-to-live information. The following was added in this scenario:
      $TTL 3h    ;3 hour
      
      @ IN SOA venus.abc.aus.century.com. gail.zeus.abc.aus.century.com.  (
      
                                 1       ;serial
                                 3600    ;refresh
                                 600     ;retry
                                 3600000 ;expire
                                 3600    ;negative caching TTL
      )
    • The name server (NS) record. Insert a tab space at the beginning of the line; the named daemon will replace the tab space with the zone name:
      <tab>	IN    NS     venus.abc.aus.century.com.
    • The pointer (PTR) record.
      1      IN    PTR    localhost.
      After editing the file, save and close it.
  4. Open the /usr/local/domain/named.abc.data file. Add the following information:
    • The start of authority of the zone and the default time-to-live information for the zone. This record designates the start of a zone. Only one start of authority record per zone is allowed. In this scenario, the following was added:
      $TTL 3h    ;3 hour
      
      @ IN    SOA     venus.abc.aus.century.com. gail.zeus.abc.aus.century.com. (
                      1       ;serial
                      3600    ;refresh
                      600     ;retry
                      3600000 ;expire
                      3600    ;negative caching TTL
      )
    • The name server records for all controller name servers in the zone. Insert a tab space at the beginning of the line; the named daemon will replace the tab space with the zone name:
      <tab>	IN    NS       venus.abc.aus.century.com.
    • The name-to-address resolution information on all hosts in the name server zone of authority:
      venus        IN    A        192.9.201.1
      earth        IN    A        192.9.201.5
      mars         IN    A        192.9.201.3
      jupiter      IN    A        192.9.201.7
      Include other types of entries, such as canonical name records and mail exchanger records as needed.

    After editing the file, save and close it.

  5. Open the /usr/local/domain/named.abc.rev file. Add the following information:
    • The start of authority of the zone and the default time-to-live information. This record designates the start of a zone. Only one start of authority record per zone is allowed:
      $TTL 3h    ;3 hour
      
      @  IN  SOA  venus.abc.aus.century.com. gail.zeus.abc.aus.century.com.  (
                                 1       ;serial
                                 3600    ;refresh
                                 600     ;retry
                                 3600000 ;expire
                                 3600    ;negative caching TTL
      )
    • Other types of entries, such as name server records. If you are including these records, insert a tab space at the beginning of the line; the named daemon will replace the tab space with the zone name. In this scenario, the following was added:
      <tab>	IN      NS      venus.abc.aus.century.com.
    • Address-to-name resolution information on all hosts to be in the name server's zone of authority.
      1                      IN    PTR    venus.abc.aus.century.com.
      5                      IN    PTR    earth.abc.aus.century.com.
      3                      IN    PTR    mars.abc.aus.century.com.
      7                      IN    PTR    jupiter.abc.aus.century.com.
      After editing the file, save and close it.
  6. Create an /etc/resolv.conf file by running the following command:
    touch /etc/resolv.conf

    The presence of this file indicates that the host should use a name server for name resolution.

  7. Add the following entry in the /etc/resolv.conf file:
    nameserver 127.0.0.1

    The 127.0.0.1 address is the loopback address, which causes the host to access itself as the name server. The /etc/resolv.conf file can also contain an entry similar to the following:

    domain abc.aus.century.com
    In this case, abc.aus.century.com is the domain name.

    After editing the file, save and close it.

  8. Use the smit stnamed SMIT fast path to enable the named daemon. This initializes the daemon with each system startup. Indicate whether you want to start the named daemon now, at the next system restart, or both.

Step 2. Configure the Worker Name Server

To configure a worker name server, use the following procedure. You will edit a series of files and then use SMIT to start the named daemon.

  1. On the worker name server, open the /etc/named.conf file. If there is no /etc/named.conf file in the /etc directory, create on by running the following command:
    touch /etc/named.conf

    Do the following to configure the /etc/named.conf file:

    1. Specify a directory clause in the options stanza. This enables the named data files to use paths relative to the /usr/local/domain directory. In this scenario, the following was added:
      options {
          directory "/usr/local/domain";
      };
      If you choose not to specify a directory here, the named daemon will search the /etc directory for the necessary data files.
    2. To allow record data to be cached outside the defined zones, specify the name of the hint zone file for the name server:
      zone "." IN {
          type hint;
          file "named.ca";
      };
    3. Specify the slave zone clauses. Each stanza includes the zone type, a file name to which the name server can back up its data, and the IP address of the controller name server, from which the worker name server will replicate its data files. In this scenario, we added the following slave zone clauses:
      zone "abc.aus.century.com" IN {
          type slave;
          file "named.abc.data.bak";
          masters { 192.9.201.1; };
      };
      zone "201.9.192.in-addr.arpa" IN {
          type slave;
          file "named.abc.rev.bak";
          masters { 192.9.201.1; };
      };
    4. To support resolving the loopback network address, specify a zone of type master with a source of named.abc.local, as well as the domain for which the name server is responsible.
      zone "0.0.127.in-addr.arpa" in {
          type master;
          file "named.abc.local";
      };
      
    After editing the file, save and close it.
  2. Edit the /usr/local/domain/named.ca file.
    This file contains the address server that is the root domain server of the network. In this scenario, the following was added:
    ; root name servers.
    .          IN    NS    relay.century.com.
    relay.century.com.   3600000    IN    A     129.114.1.2
    After editing the file, save and close it.
  3. Open the /usr/local/domain/named.abc.local file. In this scenario, the following was added:
    • The start of authority (SOA) of the zone and the default time-to-live information:
      $TTL 3h    ;3 hour
      
      @ IN SOA earth.abc.aus.century.com. gail.zeus.abc.aus.century.com.  (
      
                                 1       ;serial
                                 3600    ;refresh
                                 600     ;retry
                                 3600000 ;expire
                                 3600    ;negative caching TTL
      )
    • The name server (NS) record. Insert a tab space at the beginning of the line; the named daemon will replace the tab space with the zone name. For example:
      <tab>	IN    NS     earth.abc.aus.century.com.
    • The pointer (PTR) record.
      1      IN    PTR    localhost.
    After editing the file, save and close it.
  4. Create an /etc/resolv.conf file by running the following command:
    touch /etc/resolv.conf
  5. Add the following entry to that file:
    nameserver 127.0.0.1
    domain abc.aus.century.com
    After editing the file, save and close it.
  6. Use the smit stnamed SMIT fast path to enable the named daemon. This initializes the daemon with each system startup. Indicate whether you want to start the named daemon now, at the next system restart, or both.

Step 3. Configure the Hint Name Server

To configure a hint, or cache-only, name server, use the following procedure, which edits a series of files and then uses SMIT or the command line to start the named daemon.
  1. On the hint name server, edit the /etc/named.conf file. If there is no /etc/named.conf file in the /etc directory, create one by running the following command:
    touch /etc/named.conf

    Do the following to configure the /etc/named.conf file:

    1. Specify a directory clause in the options stanza. This enables the named data files to use paths relative to the /usr/local/domain directory. In this scenario, the following was added:
      options {
          directory "/usr/local/domain";
      };
    2. To support resolving the loopback network address, specify a zone of type master with a source of named.abc.local, as well as the domain for which the name server is responsible. In this example, the options directory keyword was specified in the /etc/named.conf file.
      zone "0.0.127.in-addr.arpa" IN {
          type master;
      	  file "named.abc.local";
      };
    3. Specify the name of the cache zone file. For example:
      zone "." IN {
          type hint;
          file "named.ca";
      };
    After editing the file, save and close it.
  2. Edit the /usr/local/domain/named.ca file.

    This file contains the addresses of the servers that are authoritative name servers for the root domain of the network. For example:

    ; root name servers.
    .          IN    NS    relay.century.com.
    relay.century.com.   3600000    IN    A     129.114.1.2
    After editing the file, save and close it.
  3. Edit the /usr/local/domain/named.local file. In this scenario, the following information was added to this file:
    • The start of authority (SOA) of the zone and the default time-to-live information:
      $TTL 3h    ;3 hour
      
      @ IN SOA venus.abc.aus.century.com. gail.zeus.abc.aus.century.com.  (
      
                                 1       ;serial
                                 3600    ;refresh
                                 600     ;retry
                                 3600000 ;expire
                                 3600    ;negative caching TTL
      )
    • The name server (NS) record. Insert a tab space at the beginning of the line; the named daemon will replace the tab space with the zone name:
      <tab>	IN    NS     venus.abc.aus.century.com.
    • The pointer (PTR) record.
      1      IN    PTR    localhost.
    After editing the file, save and close it.
  4. Create an /etc/resolv.conf file by running the following command:
    touch /etc/resolv.conf
  5. Add the following entry to that file:
    nameserver 127.0.0.1
    domain abc.aus.century.com
    After editing the file, save and close it.
  6. Use the smit stnamed SMIT fast path to enable the named daemon. This initializes the daemon with each system startup. Indicate whether you want to start the named daemon now, at the next system restart, or both.
When you reboot, your IPv6 configuration will be set. Repeat this process for each host.

Configuring domain name servers - BIND Version 9.16

For information about configuring domain name servers in BIND version 9.16, see the following topics: