HP-UX Internet Services Administrator's Guide (May 2010)

For host information, you can configure your system to use BIND (DNS), NIS, or the
/etc/hosts file.
The default name service switch configuration is adequate for most installations, so
you probably do not have to change it. The default configuration is explained in the
section “Default Configuration” (page 26).
Also, for more information about the name service switch configuration files supplied
in the /etc directory, including the syntax of the configuration file and customizing
your configuration, see Installing and Administering NFS Services, available at the URL
http://www.docs.hp.com/hpux/netcom/index.html, or type man 4
nsswitch.conf at the HP-UX prompt.
Hostname Fallback
The ability to consult more than one name service for host information is often called
hostname fallback. The name service switch provides client-side hostname fallback,
because it is incorporated into client-side programs (for example, gethostbyname),
which request host information.
The Network Information Service (NIS), one of the NFS services, allows you to configure
a server-side hostname fallback. This feature causes the NIS server to query BIND
when it fails to find requested host information in its database. The NIS server then
returns the host information to the client through NIS. This server-side hostname
fallback is intended for use with clients such as PCs, which do not have the name service
switch feature. HP recommends that you use the name service switch if possible, instead
of the server-side hostname fallback provided by NIS. For more information about the
NIS server-side hostname fallback, see Installing and Administering NFS Services, at the
URL http://www.docs.hp.com/hpux/netcom/index.html.
NOTE: Configuring the name service switch is a separate task from configuring the
name services themselves. You must also configure the name services before using
them. The name service switch just determines which name services are queried and
in what order.
HP recommends that you maintain at least a minimal /etc/hosts file that includes
important addresses like gateways, diskless boot servers and root servers, and your
host’s own IP address. HP also recommends that you include the word files in the
hosts line to help ensure a successful system boot using the /etc/hosts file when
BIND and NIS are not available.
Default Configuration
If the /etc/nsswitch.conf file does not exist, or if the line for a particular type of
information is absent or syntactically incorrect, the following default configuration is
used:
26 Installing and Configuring Internet Services