Installing and Administering Internet Services
Chapter 3 79
Configuring and Administering the BIND Name Service
Overview of the BIND Name Service
The alias (the first field on each line) must be all one word, with no
dots.
To use the file, set the HOSTALIASES environment variable to the
name of the file, as in the following example:
export HOSTALIASES=/home/andrea/myaliases
• If the input host name does not end with a dot, BIND looks it up with
domain names appended toit. The domain names that BIND appends
to it can be configured in four places:
— The LOCALDOMAIN environment variable.
— The hostname command.
— The search option in the /etc/resolv.conf file.
— The domain option in the /etc/resolv.conf file.
If a user has set the LOCALDOMAIN variable, as in the following
example,
export LOCALDOMAIN="nmt.edu div.inc.com inc.com"
the LOCALDOMAIN variable overrides the hostname and any search or
domain option in /etc/resolv.conf, for BIND requests made within
the context of the user’s shell environment. The input host name is
looked up in each of the domains in the variable, in the order they are
listed.
If the local hostname is set to a fully qualified domain name, and the
search and domain options are not specified in /etc/resolv.conf,
the input host name is looked up in the domain configured in the fully
qualified hostname.
The search option specifies a list of domains to search. Following is
an example of a search option in /etc/resolv.conf:
search div.inc.com inc.com
You can set the search option to any list of domains, but the first
domain in the list must be the domain of the local host. BIND looks
up host names in each domain, in the order they are listed. BIND
uses the search option only if the LOCALDOMAIN variable is not set.
The domain option specifies the local domain. If you use the domain
option, BIND will search only the specified domain to resolve host
names. BIND uses the domain option for host name lookups only if
the LOCALDOMAIN variable is not set and the search option is not