resolv.conf(5)
Name
resolv.conf − resolver configuration file
Description
The resolver configuration file, /etc/resolv.conf, contains information that the resolver routines read the first time they are invoked by a process. The resolver file contains ASCII text and lists the name-value pairs that provide various types of resolver information.
The /etc/resolv.conf file is required if your system is running BIND. This file must contain the BIND domain name for the local area network. If your system is a BIND client, this file must also contain nameserver entries.
There are two entry formats for the /etc/resolv.conf file:
domain binddomain
This line specifies the default domain to append to local host names. If no domain entries are present, the domain returned by gethostname after the first dot (.) is used. If the host name does not contain a domain, the root domain is assumed.
nameserver address
In this entry, the address is the IP address, in dot notation, of the BIND server that should be queried to resolve host name and address information. You should have at least one name server listed. Two or more name servers reduces the possibility of interrupted BIND service in the event that one of the servers is down. You can list up to NSMAX (10) name servers. If more than one server is listed, the resolver library queries you to try them in the order listed. If no name server entries are present, the default is to use the name server on the local machine.
The algorithm used is to try a name server, and, if the query times out, to try the next, until out of name servers or the query is resolved. The last step is to repeat trying all the name servers until a maximum number of retries has been made or the query has been resolved.
The name value pair must appear on a single line, and the keyword domain or nameserver must start each line.
Examples
The following is an example of a /etc/resolv.conf file:
;
; Data file for a client
;
domaincities.us
nameserver128.11.22.33
Lines beginning with a semicolon (;) are comment lines.
Files
/etc/resolv.conf
See Also
gethostname(2), resolver(3), named(8)
Guide to the BIND Service