Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP)
Previous Next

NIS Binding

NIS clients get information from an NIS server through the binding process, which can work in one of two modes: server-list or broadcast.

  • Server-list. In the server-list mode, the ypbind process queries the /var/yp/binding/domain/ypservers list for the names of all of the NIS servers in the domain. The ypbind process binds only to servers in this file. The file is created by running ypinit -c.

  • Broadcast. The ypbind process can also use an RPC broadcast to initiate a binding. Since 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 subnets since map propagation works across subnet boundaries. In a subnet environment, one common method is to make the subnet router an NIS server. This allows the domain server to serve clients on either subnet interface.

Server-List Mode

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

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

  2. ypbind looks in the /var/yp/binding/domainname/ypservers file for a list of NIS servers for the domain.

  3. ypbind 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. ypbind tells the client process which server to talk to. 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. ypserv sends the requested information back to the client.

Broadcast Mode

The broadcast mode binding process works as follows:

  1. ypbind must be started with the broadcast option set (broadcast).

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


    Note - In order to support such clients, it is necessary to have an NIS server on each subnet requiring NIS service.


  3. ypbind initiates binding to the first server that responds to the broadcast.

  4. ypbind tells the client process which server to talk to. 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. ypserv sends the requested information back to the client.

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

To find out 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, ypwhich defaults to the local machine (that is, the machine on which the command is run).

Previous Next

 
 
  Published under the terms fo the Public Documentation License Version 1.01. Design by Interspire