Defines Domain Name Protocol (DOMAIN) name-server information for local resolver routines.
If the host is a name server, the resolv.conf file must exist and contain a nameserver reference to itself as well as a default domain.
The resolv.conf file can contain one domain entry or one search entry, a maximum of three nameserver entries, and any number of options entries.
A domain entry tells the resolver routines which default domain name to append to names that do not end with a . (period). There can be only one domain entry. This entry is of the form:
domain DomainName
The DomainName variable is the name of the local Internet domain. If there is no domain or search entry in the file, the gethostbyname subroutine returns the default domain (that is, everything following the first period). If the host name does not have a domain name included, the root domain is assumed.
A search entry defines the list of domains to search when resolving a name. Only one domain entry or search entry can be used. If the domain entry is used, the default search list is the default domain. A search entry should be used when a search list other than the default is required. The entry is of the form:
search DomainName ...
A nameserver entry defines the Internet address of a remote DOMAIN name server to the resolver routines on the local domain. This entry is of the form:
nameserver Address
The Address variable is the dotted decimal address of the remote name server. If more than one name server is listed, the resolver routines query each name server (in the order listed) until either the query succeeds or the maximum number of attempts have been made.
The Address variable is the address of the preferred network on which you want the address returned. The Netmask variable is the netmask of the corresponding network address.
The options entry specifies miscellaneous behaviors of the resolver. The entry is of the form:
options OptionName
The OptionName variable can have one of the following values:
Item | Description |
---|---|
debug | Turns on the RES_DEBUG resolver option, which enables resolver debugging. |
ndots:n | Specifies that for a domain name with n or more periods ( . ) in it, the resolver should try to look up the domain name "as is" before applying the search list. |
timeout:n | Enables you to specify the initial timeout for a query to a nameserver. The default value is five seconds. The maximum value is 30 seconds. For the second and successive rounds of queries, the resolver doubles the initial timeout and is divided by the number of nameservers in the resolv.conf file. |
attempts:n | Enables you to specify how many queries the resolver should send to each nameserver in the resolv.conf file before it stops execution. The default value is 2. The maximum value is 5. |
rotate | Enables the resolver to use all the nameservers in the resolv.conf file, not just the first one. |
inet6 | Uses or maps IPv6 in the gethostbyname subroutine. |
Entries in this file can be made using the System Management Interface Tool (SMIT), by using the namerslv command, or by creating and editing the file with an editor.
To define a domain host that is not a name server, enter:
domain abc.aus.century.com
nameserver 192.9.201.1
nameserver 192.9.201.2
The example contains entries in the resolv.conf file for a host that is not a name server.
Item | Description |
---|---|
/usr/lpp/tcpip/samples/resolv.conf | Contains the sample resolv.conf file. |