resolv.conf(4) — FILE FORMATS
NAME
resolv.conf − configuration file for name server
SYNOPSIS
/etc/resolv.conf
DESCRIPTION
The resolver is a set of routines in the C library [see resolver(3)] that provide access to the Internet Domain Name System. The resolver configuration file contains information that will be read by the resolver routines at the first instance when they are invoked by a process. The file is designed to be human readable and will contain a list of keywords with values that provide various types of resolver information.
On a normally configured system this file should not be necessary. The only name server to be queried will be on the local machine; then the domain name will be determined from the host name and the domain search path will be constructed from the domain name.
The different configuration options are:
nameserver The Internet address (in dot notation) of a name server that the resolver should query: Up to MAXNS (currently 3) name servers may be listed, one per keyword. If there are multiple servers, the resolver library will query them in the order listed. If no nameserver entries are present, the default will be to use the name server on the local machine. (The algorithm used is to try a name server; if the query times out, try the next one until you are out of name servers, then repeat trying all the name servers until a maximum number of retries have been performed).
domain Local domain name: Most queries for names within this domain can use short names relative to the local domain. If no domain entry is present, the domain will be determined from the local host name returned by gethostname(3); the domain part will be taken to be everything after the first ‘.’. Finally, if the host name does not contain a domain part, the “root domain” will be assumed.
search Search the list for host name lookup: Normally, the search list will be determined from the local domain name; by default, it will begin with the local domain name, then with successive parent domains that have at least two components in their names. This may be changed by listing the desired domain search path following the search keyword with spaces or tabs separating the names.
Most resolver queries will be attempted using each component of the search path in turn until a match is found.
FILES
/etc/resolv.conf
SEE ALSO
gethostbyname(3N), resolver(3), named(1M).
NOTES
The search process may be slow and will generate a lot of network traffic if the servers for the listed domains are not local and that queries will time out if no server is available for one of the domains.
The search list is currently limited to six domains with a total of 256 characters.
The domain and search keywords are mutually exclusive. If more than one instance of these keywords is present, the last instance will override the earlier one(s).
The keyword and its value must appear on a single line; the keyword (e.g., nameserver) must start the line. The value should follow the keyword, separated by white space.
It is possible for rlogind and telnetd to respond slowly when Domain Name Service is in place and the primary nameserver is unreachable or slow to respond. If your nameserver or network is heavily loaded, you should consider configuring a slave name server on your system. This will allow the nameserver database to be cached locally, doing away with the need for potentially slow resolver requests over the network on each and every login attempt. Four steps must be carried out to set up a slave nameserver:
1) The entry nameserver 127.1 should be placed at the top of the nameserver list in /etc/resolv.conf.
2) The address of the primary nameserver should be listed on the forwarders line in /etc/named.boot.
3) The nameserver should be placed into slave mode by uncommenting the keyword slave in /etc/named.boot.
4) The SOA information in /etc/named.data/localhost.rev should be filled in according to the comments listed there.
— Internet Utilities