HPlogo Installing and Administering Internet Services: HP 9000 Networking > Chapter 3 Configuring and Administering the BIND Name Service

Configuring the Resolver to Query a Remote Name Server

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

Follow these steps if you want your host to query a name server on a remote host:

  1. Create a file on your host called /etc/resolv.conf. The /etc/resolv.conf file has three configuration options:

    • domain followed by the default domain name. The domain entry is needed only when the local system's host name (as returned by the hostname command) is not a domain name, and the search option is not configured.

    • search followed by up to six domains separated by spaces or tabs. The first domain in the search list must be the local domain. The resolver will append these domains, one at a time, to a host name that does not end in a dot, when it constructs queries to send to a name server. The domain and search keywords are mutually exclusive.

      If you do not specify the search option, the default search list will contain only the local domain.

    • nameserver followed by the internet address (in dot notation) of a name server that the resolver should query. You can configure up to three nameserver entries.

    The following is an example of /etc/resolv.conf:

    • search cs.Berkeley.Edu Berkeley.Edu

    • nameserver 132.22.0.4

    • nameserver 132.22.0.12

  2. If you did not specify the local domain with the search or domain option, set the default domain name with the hostname command, as in the following example,

    /usr/bin/hostname indigo.div.inc.com

    and set the HOSTNAME variable in the /etc/rc.config.d/netconf file to the same value, as in the following example:

    HOSTNAME=indigo.div.inc.com

    Do not put a trailing dot at the end of the domain name.

NOTE: If you want to run both BIND and HP VUE, you must have an /etc/resolv.conf file on your system, or HP VUE will not start.

If a user sets the LOCALDOMAIN environment variable, any BIND requests made within the context of the user's shell environment will use the search list specified in the LOCALDOMAIN variable. The LOCALDOMAIN variable overrides the domain and search options in /etc/resolv.conf.

On HP-UX releases before 10.0, by default, if the resolver could not find the requested host by appending the local domain, it would append the parent of the local domain and the grandparent of the local domain. It would not append just the top-level domain (like com or edu). For example, if BIND could not find host name aardvark in the local domain zoo.bio.nmt.edu, it would look for aardvark.bio.nmt.edu and aardvark.nmt.edu but not aardvark.edu.

On HP-UX release 10.0 and later releases, by default, if you do not specify a search list in /etc/resolv.conf, the resolver will append only the local domain to the input host name.

If you want BIND to behave as it did in releases before 10.0, configure a search list in the /etc/resolv.conf file. The following search list causes BIND to search the zoo.bio.nmt.edu domain as it did by default in releases before 10.0:

search zoo.bio.nmt.edu bio.nmt.edu nmt.edu
CAUTION: In order to reduce situations that may cause connections to unintended destinations, you should carefully select which domains you put in the search list in the /etc/resolv.conf file. Hewlett-Packard recommends that the possible domains for the search list be limited to those domains administered within your trusted organization. For more information on the security implications of search lists, please read RFC 1535, located in the /usr/share/doc directory.

Type man 4 resolver or man 5 hostname the HP-UX prompt for more details, or see “How BIND Resolves Host Names”.

© 2000 Hewlett-Packard Development Company, L.P.