Installing and Administering Internet Services

32 Chapter 2
Installing and Configuring Internet Services
Configuring the Name Service Switch
Also, for more information about the Name Service Switch configuration
files supplied in the /etc directory, see Installing and Administering
NFS Services.
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 or NIS+ server to query BIND when it fails to find requested
host information in its database. The NIS or NIS+ server then returns
the host information to the client through NIS or NIS+. This server-side
hostname fallback is intended for use with clients like PCs that do not
have a feature like the Name Service Switch. Hewlett-Packard
recommends that you use the Name Service Switch if possible, instead of
the server-side hostname fallback provided by NIS and NIS+. For more
information about the NIS server-side hostname fallback, see Installing
and Administering NFS Services.
NOTE Configuring the Name Service Switch is a separate task from configuring
the name services themselves. You must also configure the name services
before you can use them. The Name Service Switch just determines
which name services are queried and in what order.
For more information about configuring the Name Service Switch,
including the syntax of the configuration file and customizing your
configuration, see Installing and Administering NFS Services. You can
also type man 4 nsswitch.conf at the HP-UX prompt.
Hewlett-Packard 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.
Hewlett-Packard 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: