TCP/IP attempts to obtain an Internet Protocol (IP) address from a host name in a process known as name resolution. The process of translating an Internet Protocol address into a host name is known as reverse name resolution. A resolver routine is used to resolve names. It queries DNS, NIS and finally the local /etc/hosts file to find the required information.
You can accelerate the process of name resolution by overwriting the default search order, if you know how you want names to be resolved. This is done through the use of the /etc/netsvc.conf file or the NSORDER environment variable.
hosts=value,value,value
where value may be (lowercase only) bind, local, nis, bind4, bind6, local4, local6, nis4, or nis6 (for /etc/hosts). The order is specified on one line with values separated by commas. White spaces are permitted between the commas and the equal sign.
The values specified and their ordering is dependent on the network configuration. For example, if the local network is organized as a flat network, then only the /etc/hosts file is needed. The /etc/netsvc.conf file would contain the following line:
hosts=local
The NSORDER environment variable would be set as:
NSORDER=local
hosts=bind,local
The NSORDER environment variable would be set as:
NSORDER=bind,local
The algorithm will attempt the first source in the list. The algorithm will then determine to try another specified service based on: