Go to main content

Working With Oracle® Solaris 11.3 Directory and Naming Services: DNS and NIS

Exit Print View

Updated: October 2017
 
 

NIS Binding

NIS clients are connected to an NIS server through the binding process. The svc:/network/nis/client and svc:/network/nis/domain services support the binding process. You must enable these services for any NIS service to operate. The svc:/network/nis/client service can work in one of two modes: server-list or broadcast.

  • Server-list – In the server-list mode, the ypbind process queries the svc:/network/nis/domain service for the names of all NIS servers in the domain. The ypbind process binds only to servers in this file.

    You can use the svccfg command to add NIS servers to any domain. They are added to the config/ypservers property in the svc:/network/nis/domain service. Each property value represents a specific NIS server.

    Additionally, any server name that is specified in the svc:/network/nis/domain service must contain an entry in the /etc/inet/hosts file for NIS binding to function.

  • Broadcast — The ypbind process can also use an RPC broadcast to initiate a binding. Because broadcasts are only local subnet events that are not routed further, there must be at least one server (master or slave) on the same subnet as the client. The servers themselves might exist throughout different subnetworks because map propagation works across subnet boundaries. In a subnet environment, one common method is to make the subnet router an NIS server. This enables the domain server to serve clients on either subnet interface.

    Broadcast mode is generally the recommended mode of operation. Broadcast mode does not require additional host entries to be specified or changes to be made to /etc/inet/hosts.

Normally, after a client is bound to a server, it stays bound to that server until something causes the binding to change. For example, if a server goes out of service, the clients it served will then bind to new servers.

To determine which NIS server is currently providing service to a specific client, use the following command.

% ypwhich machinename

where machinename is the name of the client. If no machine name is mentioned, the ypwhich command defaults to the local machine which the command is run.

Server-List Mode

The binding process in server-list mode works as follows:

  1. Any program, running on the NIS client machine that requires information provided by an NIS map, requests the ypbind daemon for the name of a server.

  2. The ypbind daemon searches the /var/yp/binding/domainname/ypservers file for a list of NIS servers for the domain.

  3. The ypbind daemon initiates binding to the first server in the list. If the server does not respond, ypbind tries the second, and so on, until it finds a server or exhausts the list.

  4. The ypbind daemon sends the information about the server to the client process. The client then sends the request directly to the server.

  5. The ypserv daemon on the NIS server handles the request by consulting the appropriate map.

  6. The ypserv daemon sends the requested information back to the client.

Broadcast Mode

The broadcast mode binding process works as follows:

  1. You must start the ypbind daemon with the –broadcast option set.

  2. The ypbind daemon issues an RPC broadcast in search of an NIS server.


    Note -  In order to support clients using the broadcast option, it is necessary to have an NIS server on each subnet that requires NIS service.
  3. The ypbind daemon initiates binding to the first server that responds to the broadcast.

  4. The ypbind daemon sends the information about the server to the client. The client then sends the request directly to the server.

  5. The ypserv daemon on the NIS server handles the request by consulting the appropriate map.

  6. The ypserv daemon sends the requested information back to the client.