YPSERV(8) COMMAND REFERENCE YPSERV(8)
NAME
ypserv, ypbind - Yellow Pages server and binder processes
SYNOPSIS
/usr/etc/ypserv
/etc/ypbind
DESCRIPTION
The Yellow Pages (YP) provide a simple network lookup
service consisting of data bases and processes.
Data Bases
The data bases are dbm(3d) files in a directory tree rooted
at /etc/yp; these files are described in ypfiles(5).
Processes
The processes are /usr/etc/ypserv, the YP data base lookup
server, and /etc/ypbind, the YP binder. The programmatic
interface to YP is described in ypclnt(3n).
Tools
Administrative tools are described in yppush(8), ypxfr(8),
yppoll(8), ypwhich(8), and ypset(8). Tools to see the
contents of YP maps are described in ypcat(1) and
ypmatch(1). Data base generation and maintenance tools are
described in ypinit(8), ypmake(8), and makedbm(8).
Daemons
Both ypserv and ypbind are daemon processes typically
activated at system startup time from /etc/rc.net; ypserv
runs only on YP server machines having a complete YP data
base; ypbind runs on all machines using YP services, both YP
servers and clients.
The ypserv daemon's primary function is to locate
information in its local data base of YP maps. The
operations performed by ypserv are defined for the
implementor by the YP protocol specification, and for the
programmer by the header file <rpcsvc/yp_prot.h>.
Communication to and from ypserv is by means of RPC (Remote
Procedure Calls). Lookup functions are described in
ypclnt(3n), and are supplied as C-callable functions in
/lib/libc.a. There are four lookup functions, all of which
are performed on a specified map within some YP 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
Printed 4/6/89 1
YPSERV(8) COMMAND REFERENCE YPSERV(8)
remainder. Get_all ships the entire map to the requester as
the response to a single RPC request.
Functions
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 will not return either
through the normal lookup functions. (If you examine the
map with makedbm(8), however, they will be visible.) Other
functions are used within the YP subsystem, and are not of
general interest to YP 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
YP client processes, ypserv may or may not be running on the
same node, but must be running somewhere on the network.
Bindings
The information ypbind remembers is called a binding- the
association of a 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. 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(1) 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 will 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 will bind any YP
server (typically one that is less-heavily loaded),
available on the net.
Server ypbind also accepts requests to set its binding for a
particular domain; the request is usually generated by the
Printed 4/6/89 2
YPSERV(8) COMMAND REFERENCE YPSERV(8)
YP subsystem where ypset(8) is a command to access the
Set_domain facility (it is for unsnarling messes, not for
casual use).
FILES
If the file /usr/etc/yp/ypserv.log exists when ypserv starts
up, log information is written to this file when error
conditions arise.
CAVEATS
If ypbind is running without ypserv running on a machine on
the local network, many commands will either hang or time
out after a long sequence of retries. It is important to
have more than one YP server per local network. If commands
hang, ypbind must be killed until some machine on the local
network starts serving YP services.
If your machine is running YP and you want to add a new
machine to the list of known hosts, you must either kill
ypbind on your machine and add the new machine to your local
/etc/hosts file or you must ask the YP administrator for
your domain to add the new machine to the hosts map, and
wait until this has been accomplished before accessing the
new machine.
SEE ALSO
ypclnt(3n), ypfiles(5), ypcat(1), ypmatch(1), yppush(8),
ypset(8), ypwhich(8), and ypxfr(8).
YP Protocol Specification in Networking on the Sun
Workstation document.
Printed 4/6/89 3
%%index%%
na:288,109;
sy:397,388;
de:785,3178;4323,3985;8668,172;
fi:8840,300;
ca:9140,1094;
se:10234,505;
%%index%%000000000130