NFS Services Administrator's Guide

Troubleshooting NFS Services
Common Problems with NIS
Chapter 8310
If You Receive an “Unknown Host” Message
Issue the following command to trace a lookup of the unknown host:
/usr/contrib/bin/nsquery hosts hostname
The trace will indicate which name services (BIND, NIS, NIS+, or
/etc/hosts) were queried and in what order. If your host is not
performing lookups the way you want, see “Configuring the Name
Service Switch on page 267 for instructions on configuring the
Name Service Switch.
Issue the following command on the NIS client to determine which
master server supplies the hosts map:
/usr/bin/ypwhich -m hosts
If the server does not respond, see “If You Receive an NIS “Server
Not Responding” Message” on page 307.
If the ypwhich command returns the name of the NIS master server,
log in as root to the master server and make sure the unknown host
is listed in its /etc/hosts file. Then, issue the following commands
on the master server to generate the NIS hosts database from the
/etc/hosts file and push it to the NIS slave servers:
cd /var/yp
/usr/ccs/bin/make hosts
Issue the domainname command (with no arguments) to make sure
the client’s default domain is the domain served by the NIS master
server. If it is not, log in as root to the NIS client and issue the
following command to change its domain name:
domainname domainname
Issue the following command to check whether the unknown host is
listed in the hosts database on the NIS server to which the client is
bound:
/usr/bin/ypmatch hostname hosts
If the host is not listed in the hosts database, issue the following
command on the NIS server to which the client is bound:
/usr/sbin/ypxfr hosts
This command transfers the hosts database from the NIS master
server to the server where you issue the command.