Name server resolution
In a hierarchical network, certain hosts are designated as name servers. These hosts resolve names into IP addresses for other hosts.
The named daemon controls the name server function and, therefore, must be run on a name server host.
Before you configure a name server, decide which type or types best fit the network it serves. There are several types of name servers.
A master name server actually stores the database that contains name-to-address mapping information. It loads its data from a file or disk and can delegate authority to other servers in its domain. A slave name server or stub name server receives its information at system startup time for a particular zone of authority from a master name server, and then periodically asks the master server to update its information. A hint name server responds to requests to resolve names by querying other servers that have the authority to provide the information needed.
Keep in mind that a name server can function in different capacities for different zones of authority. For example, one name server host can be a master name server for one zone and a slave name server for another zone. If your system has NIS or NIS+ installed, these services can also provide name resolution. For more information, see Network Information Services (NIS and NIS+) Guide.
There are several files that are involved in configuring name servers.
Item | Description |
---|---|
conf | This file is read when the named daemon starts. The records in the conf file tell the named daemon which type of server it is, which domains it has authority over (its zones of authority), and where to get the data for initially setting up its database. The default name of this file is /etc/named.conf. However, you can change the name of this file by specifying the name and path of the file on the command line when the named daemon is started. If you intend to use the /etc/named.conf as the conf file and it does not exist, a message is generated in syslog file and named terminates. However, if an alternative conf file is specified, and the alternative file does not exist, an error message is not generated, and named continues. |
cache | Contains information about the local cache. The local cache file contains the names and addresses of the highest authority name servers in the network. The cache file uses the Standard Resource Record Format. The name of the cache file is set in the conf file. |
domain data | There are three typical domain data files, also referred to
as the named data files. The named local file
contains the address resolution information for local loopback. The named data file
contains the address resolution data for all machines in the name
server zone of authority. The named reverse
data file contains the reverse address resolution information
for all machines in the name server zone of authority. The domain
data files use the Standard Resource Record Format. Their file names
are user definable and are set in the conf file.
By convention, the names of these files generally include the name
of the daemon (named ), and the type of file and name
of the domain is given in the extension. For example, the name server
for the domain abc might have the following files:
When modifying the named data files the serial number in the SOA Resource Record must be incremented for slave name servers to properly realize the new zone changes. |
resolv.conf | The presence of this file indicates to a host to go to a name
server to resolve a name first. If the resolv.conf file
does not exist, the host looks in the /etc/hosts file
for name resolution. On a name server, the resolv.conf file
must exist and can contain the local host address, the loopback address
(127.0.0.1), or be empty. Note: The resolver routines require the
default domain be set. If the default domain is not set in the /etc/resolv.conf file,
then it must be set in the hostname
|
Time-to-live (TTL) is specified in resource records. If TTL is not specified in a record, the length of this time period defaults to the minimum field as defined in the start of authority (SOA) record for that zone. TTL is used when data is stored outside a zone (in a cache) to ensure that the data is not retained indefinitely.