YPSERV, YPBIND(8,C) AIX Commands Reference YPSERV, YPBIND(8,C) ------------------------------------------------------------------------------- ypserv, ypbind PURPOSE NIS server and binder processes. SYNTAX /etc/ypserv ---| /etc/ypbind ---| Note: This command does not have MBCS support. DESCRIPTION NIS provides a simple network lookup service consisting of data bases and processes. The data bases are dbm files in a directory tree rooted at /etc/yp. These files are described in ypfiles. The processes are /etc/ypserv, the NIS data base lookup server, and /etc/ypbind, the NIS binder. The programmatic interface to NIS is described in ypclnt. Administrative tools are described in yppush, ypxfr, yppoll, ypwhich, and ypset. Tools to see the contents of NIS maps are described in ypcat, and ypmatch. Data base generation and maintenance tools are described in ypinit and makedbm. Both ypserv and ypbind are daemon processes typically activated at system startup time from /local/local.init.dir/Singl2multi. ypserv runs only on NIS server machines with a complete NIS data base. ypbind runs on all machines using NIS, both NIS servers and clients. The ypserv daemon's primary function is to look up information in its local data base of NIS maps. The operations performed by ypserv are defined for the implementer by the NIS protocol specification, and for the programmer by the header file <rpcsvc/yp_prot.h>. Communication to and from ypserv is by means of RPC calls. Lookup functions are described in ypclnt, and are supplied as C-callable functions in /lib/libc There are four lookup functions, all of which are performed on a specified map within some NIS domain: Match, Get_first, Get_next, and Get_all. The Match operation takes a key, and returns the associated value. The Get_first operation returns the first key-value pair from the map, and Get_next can be used to enumerate the remainder. Get_all ships the entire map to the requester as the response to a single RPC request. Two other functions supply information about the map, rather than map entries; Get_order_number, and Get_master_name. In fact, both order number and master name exist in the map as key-value pairs, but the server does not return either through the normal lookup functions. (If you examine the map with makedbm, however, they are visible.) Other functions are used within the NIS subsystem Processed November 8, 1990 YPSERV, YPBIND(8,C) 1
YPSERV, YPBIND(8,C) AIX Commands Reference YPSERV, YPBIND(8,C) itself, and are not of general interest to NIS clients. They include Do_you_serve_this_domain?, Transfer_map, and Reinitialize_internal_state. The function of ypbind is to remember information that lets client processes on a single node communicate with some ypserv process. ypbind must run on every machine which has NIS client processes; ypserv may or may not be running on the same node, but must be running somewhere on the network. The information ypbind remembers is called a binding - the association of a domain name with the internet address of the NIS server, and the port on that host at which the ypserv process is listening for service requests. The process of binding is driven by client requests. As a request for an unbound domain comes in, the ypbind process broadcasts on the net trying to find a ypserv process that serves maps within that domain. Since the binding is established by broadcasting, there must be at least one ypserv process on every net. Once a domain is bound by a particular ypbind, that same binding is given to every client process on the node. The ypbind process on the local node or a remote node may be queried for the binding of a particular domain by using the ypwhich command. Bindings are verified before they are given out to a client process. If ypbind is unable to speak to the ypserv process it's bound to, it marks the domain as unbound, tells the client process that the domain is unbound, and tries to bind the domain once again. Requests received for an unbound domain fail immediately. In general, a bound domain is marked as unbound when the node running ypserv crashes or gets overloaded. In such a case, ypbind binds to any NIS server (typically one that is less-heavily loaded) available on the net. The ypbind command also accepts requests to set its binding for a particular domain. The request is usually generated by the NIS subsystem itself, ypset is a command to access the Set_domain facility. FILES If the file /usr/etc/yp/ypserv.log exists when ypserv starts up, log information is written to this when error conditions arise. RELATED INFORMATION See the following commands: "ypmatch," "yppush," "ypwhich," and "yppoll." Processed November 8, 1990 YPSERV, YPBIND(8,C) 2