ypserv(1M) ypserv(1M)
NAME
ypserv - yellow pages server and binder processes
SYNOPSIS
/etc/ypserv
/etc/ypbind
DESCRIPTION
The yellow pages (YP) provides a simple network lookup
service. YP consists of databases and processes. The
databases are dbm(3X) files in a directory tree rooted at
/etc/yp, described in ypfiles(4). The processes are
/etc/ypserv, the YP database server, and /etc/ypbind, the YP
binder. The programmatic interface to YP is described in
ypclnt(3N). Administrative tools are described in
yppush(1M) and ypcat(1). Database generation and
maintenance tools are described in ypinit(1M), ypmake(1M),
and makedbm(1M).
Both ypserv and ypbind are daemons: they are typically
activated at system startup time from /etc/inittab, and
theoretically run forever. ypserv runs only on YP server
machines with a complete YP database. ypbind runs on all
machines using YP services, both YP client machines and YP
servers.
The ypserv daemon has two functions: to look up information
in its local database (or YP maps), and to keep that
database consistent with those of its peers.
The operations performed by ypserv are defined in the header
file rpcsvc/ypprot.h. Communication to and from ypserv is
by means of RPC calls. Lookup functions are supplied (as a
C library) in the ypclnt package, defined in the header file
rpcsvc/ypclnt.h and described in ypclnt(3N). There are
three types of functions: match, get first, and get next.
The match operation takes a key, and returns the associated
value within a named map and domain. (Domains are described
in ypfiles (1M).) The get first operation returns the first
key-value pair within a named map and domain, and get next
can be used to enumerate the remainder. There are other
operations performed by ypserv: they either give back
information internal to the process itself, or are useful in
speeding up the update propagation algorithm which is
discussed in the next paragraph. Non-lookup functions are
accessible to programmers by coding the RPC calls defined in
rpcsvc/ypprot.h, and at the shell level by using the tools
yppush, yppull, and yppoll, all described in yppush(1M).
This paragraph discusses how map updates propagate among YP
servers, and how propagation converges. Each map is
associated with a version (or order) number. Each ypserv
Page 1 (last mod. 1/15/87)
ypserv(1M) ypserv(1M)
process communicates with its peers, and tries to find the
map availible with the greatest order number. The order
number is set at the time the map is is generated. Each map
is associated with a distinguished YP server host, called
the map's master. Updates to that map should be done only
at the map's master - maps should be generated only on their
master host. As each ypserv tries to find the version of
any map containg the greatest order number, it first tries
to communicate with the map's master. If the master is
unreachable, it chooses another peer at random, and will
transfer that map from any peer that has a map containing an
order number greater than the one in the map it currently
has.
This paragraph discusses the ypbind process, whose function
is to remember information that lets clients on a single
node communicate with ypserv processes. ypbind must be
running on every network node; 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 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
claims to serve maps within that domain. Since binding is
accomplished 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 running that ypbind. The binding
is verified before it is given out to a client process. If
ypbind is unable to speak to the ypserv process using its
binding it marks the domain as unbound, tells the client
process that the domain is unbound, and tries again to bind
the domain. Requests for binding received by an unbound
domain will fail immediately.
FILES
/etc/ypserv
/etc/ypbind
SEE ALSO
makedbm(1M), ypcat(1M), ypinit(1M), ypmake(1M), yppush(1M),
ypclnt(3N), ypfiles(4).
Page 2 (last mod. 1/15/87)