Defines Domain Name Protocol (DOMAIN) name-server information for local resolver routines.
If the /etc/resolv.conf file exists, the local resolver routines either use a local name resolution database maintained by a local named daemon (a process) to resolve Internet names and addresses, or they use the DOMAIN protocol to request name resolution services from a remote DOMAIN name server host. If no resolv.conf file exist than the resolver routines continue searching their direct path, which may include searching through /etc/hosts file or the NIS hosts map.
Note: If the resolv.conf file does not exist, the resolver routines attempt name resolution using the default paths, the /etc/netsvc.conf file, or the NSORDER environment variable.
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, a sortlist entry, 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:
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 ...
The search entry can have from one to six DomainName variables. The first DomainName variable is interpreted as the default domain name. The DomainName variable is the name of a domain that should be included in the search list.
- The domain entry and search entry are mutually exclusive, so if both entries are used, the one that appears last will override the other.
- The resolver routines require you to set the default domain. If the default domain is not set in the /etc/resolv.conf file, then you must set it in the hostname on the machine.
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:
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 sortlist entry defines a list of preferred networks for a returned address. If a function returns a list of addresses, the list will be sorted so that those in the sortlist will be returned first. The entry is of the form:
sortlist Address/Netmask ...
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. Both the Address and Netmask variables must be included with the sortlist entry for the network address to be added to the sortlist.
The options entry specifies miscellaneous behaviors of the resolver. The entry is of the form:
The OptionName variable can have one of the following values:
|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.|
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 18.104.22.168 nameserver 22.214.171.124
The example contains entries in the resolv.conf file for a host that is not a name server.
This file is part of TCP/IP in Network Support Facilities in Base Operating System (BOS) Runtime.
|/usr/lpp/tcpip/samples/resolv.conf||Contains the sample resolv.conf file.|
The namerslv command.
The named daemon.
The /etc/hosts file format.
The gethostbyaddr subroutine, gethostname subroutine.
TCP/IP Name Resolution.
Configuring Name Servers and Naming in AIX Version 4.3 System Management Guide: Communications and Networks.