System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP)

How to Specify a Master Server

The two types of master server are as follows.

To specify a server as the master server for a given zone, add the following statements in that server's named.conf file.

  1. Create a directory for the zone files.

    The following line tells the DNS name server to look for the zone data files in the specified directory. It is recommended that the directory be owned by root and have 0700 permissions. It is also recommended that the directory be on a file system that is accessible to the name server when it starts up.


    options {
    	      directory "/var/named";
    };

    Statements in the options section are globally applicable configuration options and defaults for the name server. See the named.conf(4) man page for further details.

  2. Create the master record for the zone.

    The following lines designate the DNS name server as a master server for the zone. The zone definition begins with the keyword zone followed, in order, by the domain and the class. “in” denotes the Internet class and can be omitted as it is the default. The record also tells the server where to find the SOA record (Start of Authority) that makes the server authoritative for the zone. The file "db.doc.sun.com" should be in the directory specified in the options statement.


    zone "doc.sun.com"     in     {
           type master;
           file "db.doc.sun.com";
    };
  3. Create a master record for the zone's reverse maps.

    The following lines designate the server as a master server for the zone's reverse address map. The reverse address zone contains the zone's IP address in reverse order followed by in-addr.arpa. For example, assuming doc.sun.com zone's IP address is 10.0.0, the reverse address zone would be 0.0.10.in-addr-arpa.


    zone "0.0.10.in-addr.arpa"   in   {
            type master;
            file "db.10.0.0";
    };
  4. Create a master record for the local loopback interface.

    The following lines designate the server as a master server for the loopback interface.


    Note –

    Loopback hosts are always identified as 0.0.127.in-addr.arpa.


    Thus, the following line in a configuration file specifies that the server is the master server for the reverse address domain of the loopback host using authoritative data from the file named.local.


    zone "0.0.127.in-addr.arpa"   in   {
            type master;
            file "db.127.0.0";
    };
  5. Create a “root hints” file.


    zone "."   in   {
            type hint;
            file "named.ca";
    };

    The file named.ca contains the location of the name servers for the root zone. For the doc.sun.com zone above, it would be the name servers for the sun.com domain.