HP-UX HB v13.00 Ch-10 - Network Services

HP-UX Handbook Rev 13.00 Page 6 (of 26)
Chapter 10 Network Services
October 29, 2013
hosts: dns [NOTFOUND=return] nis [NOTFOUND=return] files
ipnodes: dns [NOTFOUND=return] nis [NOTFOUND=return] files
If the application actually uses the name localhost instead of the loopback IP address of 127.0.0.1
it means that every query to localhost will mean a query to DNS which will not be answered by
the nameserver so the query gets sent to another nameserver for outside queries which return
NXDOMAIN (no answer) or possibly SERVFAIL return code. The application gets to wait on
this for each attempted IPC.
ADVICE: The entry “files” corresponds to the simplest method to resolve names on the system;
this is the /etc/hosts file. The file should contain at least entries for localhost, loopback, the
hostname, and the local IP addresses, e.g.:
# grep loopback /etc/hosts
127.0.0.1 localhost loopback
# grep `hostname` /etc/hosts
15.140.10.113 grcdg089
If you do not use IPv6 addresses in your environment, it is a good idea to modify the Database
entry for ipnodes in /etc/nsswitch.conf.
ipnodes: files
This will not harm your IPv4 network, but it will prevent the system from asking the nameserver
for the IPv6 address, which may cause unexpected results.
Also, consider using /etc/hosts as the first source for all queries. Since all essential hostname/IP
mappings should be in /etc/hosts, the dependence on an outside source for resolution can be
minimized. (For example, /etc/fstab NFS entries which are mounted at every system startup or
an xntpd time server which is configured in startup scripts)
The system as a DNS client
The existence of /etc/resolv.conf is sufficient.
# cat /etc/resolv.conf
domain grc.hp.com
nameserver 15.137.22.252
Simple single level qualified hostnames will be expanded to complete DNS names with the
designation specified in the domain statement. If information for systems from different