Sun Microsystems Logo
Products & Services
 
Support & Training
 
 

Previous Previous     Contents     Index     Next Next

A hosts file usually contains these elements:

  • A default TTL (time-to-live) for all records in the file that do not have an explicit TTL set

  • A Start of Authority (SOA) record

  • One or more Name Server (NS) records identifying master and slave DNS name servers

  • Address (A) records for each host in the zone

  • Canonical Name (CNAME) records for each host alias in the zone

  • One or more Mail Exchange (MX) records

The hosts.rev File

The hosts.rev file specifies a zone in the in-addr.arpa. domain, the special domain that allows reverse (address-to-name) mapping. The name of this file is specified in the configuration file.

Setting Up the hosts.rev File

The hosts.rev file sets up inverse mapping.


Note - The name hosts.rev is a generic name indicating the file's purpose and content. If you have more than one zone, each zone must have its own hosts.rev file and each of these zone hosts.rev files must have a unique name. For example, if your DNS domain is divided into doc.com and sales.doc.com zones, you could name one hosts.rev file doc.rev and the other sales.rev.


Example 5-17 Sample hosts.rev File

$TTL 5h
; SOA rec
6.45.123.in-addr.arpa.  IN SOA sirius.doc.com. sysop.centauri.doc.com. (
                 1997071401       ;  serial number (YYYYMMDD##)
                      10800       ;  refresh every 3 hours
                      10800       ;  retry every 3 hours
                      604800      ;  expire after a week
                      86400 )     ;  TTL of 1 day
; Name Servers
6.45.123.in-addr.arpa.   IN  NS  sirius.doc.com.
1                        IN  PTR sirius.doc.com.

A hosts.rev file contains the following elements.

  • A default TTL (time-to-live) for all records in the file that do not have an explicit TTL set

  • A Start of Authority (SOA) record

  • One or more Name Server (NS) records identifying master and slave DNS name servers

    Server names should be fully qualified.

  • A PTR record for each host in the zone

    Machine names should be fully qualified.

(See Resource Record Types for detailed descriptions of these resource record types.)

The named.local File

The named.local file specifies the address for the local loopback interface, or localhost, with the network address 127.0.0.1. The name of this file is specified in the configuration file. Like other files, you can give it a name other than the name used in this manual.

Setting Up the named.local File

The named.local file sets up the local loopback interface for your name server.

Example 5-18 Sample named.local File

$TTL 5h
; SOA rec
0.0.127.in-addr.arpa. IN SOA sirius.doc.com sysop.centauri.doc.com (
                          1997071401       ;  serial number (YYYYMMDD##)            
                           10800           ;  refresh every 3 hours
                           10800           ;  retry every 3 hours
                           604800          ;  expire after a week
                           86400 )         ;  TTL of 1 day
; Name Servers
0.0.127.in-addr.arpa.      IN  NS     sirius.doc.com
1                          IN  PTR  localhost.
 

A named.local file contains these elements:

  • A default TTL (time-to-live) for all records in the file that do not have an explicit TTL set

  • A Start of Authority (SOA) record

    The SOA record indicates the start of a zone and includes the name of the host on which the named.local data file resides.

  • One or more Name Server (NS) records identifying master and slave DNS name servers

    Server and domain names should be fully qualified.

  • A PTR record for localhost

The $INCLUDE File

An include file is any file named in an $INCLUDE() statement in a DNS data file. $INCLUDE files can be used to separate different types of data into multiple files for your convenience.

For example, suppose a data file contained following line:

$INCLUDE /etc/named/data/mailboxes

This line causes the /etc/named/data/mailboxes file to be loaded at that point. In this instance, /etc/named/data/mailboxes is an $INCLUDE file. Use of $INCLUDE files is optional. You can use as many as you wish, or none at all.

Previous Previous     Contents     Index     Next Next