|NIS clients and servers
|List the main commands used in NIS.
NIS Clients and Servers
The NIS server process is called
/usr/sbin/ypserv. When started, it registers with the portmapper process as an RPC service, then waits for incoming requests.
The NIS client process is called
/usr/sbin/ypbind. When this process is started, it broadcasts a request on the local network for a
ypserv process serving its domain. When a server responds, it “binds” to that server, and directs subsequent queries to that server.
How does the Network Information Service (NIS) communicate between client and server
The Network Information Service (NIS) uses a client-server model to communicate between the NIS client and server. The client sends requests for information to the server, and the server responds with the requested information.
When an NIS client needs to query the NIS server for information, it sends a request to the server using the Remote Procedure Call (RPC) protocol. The request is sent to a well-known port (typically port number 111) on the server. The request typically includes the name of the NIS map being queried, as well as the key for the requested information.
The NIS server receives the request and looks up the requested information in the appropriate NIS map. If the requested information is available, the server sends a response back to the client with the requested information. If the requested information is not available, the server sends a response indicating that the information was not found. The communication between the client and server is based on the Sun Remote Procedure Call (RPC) protocol, the NIS client and server communicates with each other using a specific set of procedures and data structures.
Additionally, The NIS server and clients use a broadcast to discover each other when they are on the same subnet. The client sends a broadcast and the server will answer with its IP address and domain name. The ypbind daemon running on the client will bind to the nearest server.
In addition to the NIS client and server processes, NIS distributions include programs to query the NIS database. These programs, and their purposes, are:
You will see examples of how to use these commands in the lessons that follow.
ypwhich, which asks
ypbind which server it has bound to.
ypcat, which lists NIS maps.
ypmatch, which looks up keys in NIS maps.
Nis Maps Clients Servers - Quiz