Information Technology Reference
In-Depth Information
hosts —The DNS address (A type) records used for resolving hostnames
to IP addresses (not to be confused with the /etc/hosts file).
hosts.rev —The DNS pointer (PTR type) records used for resolving IP
addresses to hostnames.
named.local —The DNS records for the localhost or the loopback
interface.
The named.ca , hosts , hosts.rev , and named.local files are typically located
under the /var/named directory, but can be in any directory specified by the
/etc/named.conf file.
DNS Client
A host is configured as a DNS client (also referred to as a resolver) by creat-
ing the /etc/resolv.conf file and including the directives list in Table 16.1.
Table 16.1
The /etc/resolv.conf File Directives
Directive
Purpose
domain domain
The domain in which the host is included.
nameserver IP_address
The IP address of the DNS server to be used for queries.
options option1 option2 ...
Specifies one or more options.
search domain1 domain2 ...
The domains to search to resolve hostnames.
sortlist net1 net2 ...
In case a query receives multiple addresses, use the
address with net1 , and then net2 , and so on.
The following shows the contents of a sample /etc/resolv.conf file:
domain unixcert.net
nameserver 192.168.99.9
search unixcert.net quepublishing.com
sortlist 192.168.99.0
This /etc/resolv.conf file will:
Place the system in the unixcert.net domain.
Contact the DNS server with the IP address 192.168.99.9 to resolve
hostnames.
Will try to resolve a hostname as if it is in the unixcert.net domain. If that
fails, it will try to resolve the hostname as if it is in the quepublishing.com
domain.
Search WWH ::




Custom Search