YPSERV(1M) — Series 300 Only
NAME
ypserv, ypbind − Yellow Pages server and binder processes
SYNOPSIS
/usr/etc/ypserv [ -l log_file ]
/etc/ypbind [ -l log_file ]
DESCRIPTION
The Yellow Pages (YP) provides a simple network lookup service consisting of databases and processes. The databases are files in a directory tree rooted at /usr/etc/yp (see ypfiles(4)). The processes are /usr/etc/ypserv, the YP database lookup server, and /etc/ypbind, the YP binder. Both ypserv and ypbind are daemon processes typically activated at system startup time from within /etc/netnfsrc.
The YP programmatic interface is described in ypclnt(3C). Administrative tools are described in ypwhich(1), yppoll(1M), yppush(1M), ypset(1M) and ypxfr(1M). Tools to see the contents of YP maps (databases) are described in ypcat(1) and ypmatch(1). Database generation and maintenance tools are described in makedbm(1M), ypinit(1M) and ypmake(1M). The command to set or show the default YP domain is domainname(1).
The ypserv daemon’s primary function is to look up information in its local collection of YP maps. It runs only on YP server machines providing data from YP databases. Communication to and from ypserv is by means of RPC. Lookup functions are described in ypclnt(3C) and are supplied as C-callable functions in /lib/libc.a.
Four lookup functions perform on a specific map within a YP domain: Match, Get_first, Get_next and Get_all. The Match operation matches a key to a record in the database and returns its associated value. The Get_first operation returns the first key-value pair (record) from the map, and Get_next enumerates (sequentially retrieves) the remainder of the records. Get_all returns all records in the map to the requester as the response to a single RPC request.
Two other functions supply information about the map other than normal map entries: Get_order_number and Get_master_name. The order number is the time of last modification of a map. The master name is the host name of the machine on which the master map is stored. Both order number and master name exist in the map as special key-value pairs, but the server does not return these through the normal lookup functions. (If you examine the map with makedbm(1M) or yppoll(1M), however, they will be visible.) Other functions are used within the YP system and are not of general interest to YP clients. They include Do_you_serve_this_domain?, Transfer_map, and Reinitialize_internal_state.
The ypbind daemon remembers information that lets client processes on its machine communicate with a ypserv process. The ypbind daemon must run on every machine using YP services, both YP servers and clients. The ypserv daemon may or may not be running on a YP client machine, but it must be running somewhere on the network or available through a gateway.
The information ypbind remembers is called a binding: the association of a YP domain name with the internet address of the YP server and the port on that host at which the ypserv process is listening for service requests. Client requests drive the binding process. As a request for an unbound domain comes in, the ypbind process broadcasts on the network trying to find a ypserv process serving maps within that YP domain. Since the binding is established by broadcasting, at least one ypserv process must exist on every network. (Use the ypset(1M) command to force binding to a server through a gateway.) Once a binding is established for a client, it is given to subsequent client requests. Execute ypwhich(1) to query the ypbind process (local and remote) for its current binding.
Bindings are verified before they are given to a client process. If ypbind is unable to transact with the ypserv process it is bound to, it marks the domain as unbound, tells the client process that the domain is unbound, and tries to bind again. Requests received for an unbound domain fail immediately. Generally, a bound domain is marked as unbound when the node running ypserv crashes or is overloaded. In such a case, ypbind binds to any YP server (typically one that is less heavily loaded) available on the network.
The ypbind daemon also accepts requests to set its binding for a particular domain. The ypset(1M) command accesses the Set_domain facility; it is for unsnarling messes and is not for casual use.
Options
−l log_file
Log diagnostic and error messages to the named log file, log_file. The ypserv daemon writes its messages to /usr/etc/yp/ypserv.log, if ypserv is started without the -l option and the file exists. The ypbind daemon writes its messages directly to the system console, /dev/console, if ypbind is started without the -l option. The information logged to the file includes the date and time of the message, the host name, process id and name of the function generating the message, and the message itself. Note that different services can share a single log file since enough information is included to uniquely identify each message.
AUTHOR
Sun Microsystems, Inc.
FILES
/usr/etc/yp/ypserv.logthe default ypserv error log file
SEE ALSO
domainname(1), ypcat(1), ypmatch(1), yppasswd(1), ypwhich(1), makedbm(1M), rpcinfo(1M), ypinit(1M), ypmake(1M), yppasswdd(1M), yppoll(1M), yppush(1M), ypset(1M), ypxfr(1M), ypclnt(3C), yppasswd(3N), ypfiles(4).
INTERNATIONAL SUPPORT
messages
Hewlett-Packard Company — May 11, 2021