Installing and Administering Internet Services

66 Chapter 3
Configuring and Administering the BIND Name Service
Overview of the BIND Name Service
If the input host name contains at least the number of dots specified
by the ndots option in the /etc/resolv.conf file, BIND looks it up
as is, before appending any domains to it. (The default value of ndots
is 1, so if the input host name contains at least one dot, it will be
looked up as is before any domains are appended to it.)
If the input host name consists of a single component (contains no
dots), and you have set up a host aliases file, BIND looks in your
aliases file to translate the alias to a fully qualified host name.
You can create a host aliases file for frequently typed host names, like
the following example file:
john zircon.chem.purdue.edu
melody fermata.music.purdue.edu
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 to it. 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.