Network Information Service (NIS) B.11.31.04 Administrator's Guide
IP_address specifies the Internet address of an NIS server or the subnet
of an NIS server from which the client accepts NIS information.
address_mask indicates the important bits in the IP_address field.
If a bit is set in the address_mask field, the corresponding
bit in the source address of any address of an NIS server must
match the same bit in the IP_address field.
Example 5-1 Configuring Safe Servers for an NIS Client
Example 5-1 displays how to configure safe servers for an NIS client.
The following entry from the /var/yp/securenets file allows the NIS client to
bind only to the server with the IP address 20.21.22.23:
255.255.255.255 20.21.22.23
Each bit is set in the address mask. The IP address of the NIS server must match
the IP_address field exactly, for the client to bind to the server.
Example 5-2 Configuring Safe Servers From a Subnet for an NIS Client
Example 5-2 displays how to configure safe servers from a subnet for an NIS client.
The following entry from a /var/yp/securenets file allows the client to bind
to any NIS server on the 20.21.12.0 network:
255.255.255.0 20.21.22.23
The last eight bits in the IP address are ignored because the last eight bits of the
address mask are set to 0. The client binds to any server whose IP address begins
with 20.21.22.
3. Restart the ypbind process:
# /sbin/init.d/nis.client stop
# /sbin/init.d/nis.client start
If the master or slave server has multiple network interface cards, which are used to
serve NIS, add the IP addresses of all cards to the secureservers file.
If you start the ypbind daemon with the -ypset option and run the ypset command,
the /var/yp/secureservers file is ignored and the NIS client may bind to any
server. However, if the NIS client fails to bind to an NIS server, the ypbind daemon
does not fall back to the broadcast mode. As a result, the NIS client remains unbound.
In such cases, you must use the ypinit –c command to configure the NIS client.
For more information about the ypbind daemon, see ypbind (1M).
56 Configuring and Administering an NIS Client