Name resolution tuning

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.

  • If both the /etc/netsvc.conf file and the NSORDER are used, NSORDER overrides the /etc/netsvc.conf file. To specify host ordering with /etc/netsvc.conf, create the file and include the following line:
    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
  • If the local network is a domain network using a name server for name resolution and an /etc/hosts file for backup, specify both services. The /etc/netsvc.conf file would contain the following line:
    hosts=bind,local

    The NSORDER environment variable would be set as:

    NSORDER=bind,local

The algorithm attempts the first source in the list. The algorithm will then determine to try another specified service based on:

  • Current service is not running; therefore, it is unavailable.
  • Current service could not find the name and is not authoritative.