The two methods for configuring a client machine to use NIS as its naming service are explained below.
ypinit. The recommended method for configuring a client machine to use NIS is to login to the machine as root and run ypinit -c.
# ypinit —c
You will be asked to name NIS servers from which the client obtains naming service information. You can list as many master or slave servers as you want. The servers that you list can be located anywhere in the domain. It is a better practice to first list the servers closest (in network terms) to the machine, than those that are on more distant parts of the net.
Broadcast method. An older method of configuring a client machine to use NIS to log in to the machine as root, set the domain name with the domainname command, then run ypbind.
# domainname doc.com
# ypbind -broadcast
When you run ypbind, it searches the local subnet for an NIS server. If it finds a subnet, ypbind binds to it. This search is referred to as broadcasting. If there is no NIS server on the client's local subnet, ypbind fails to bind and the client machine is not able to obtain namespace data from the NIS service.