'\"macro stdmacro
.if n .pH g1a.ypset @(#)ypset	40.3 of 1/29/90
.\" Copyright 1989 AT&T
.\" @(#)ypset.8 1.8 89/09/28 SMI;
.\" Copyright (c) 1988 Sun Microsystems, Inc. - All Rights Reserved.
.nr X
.if \nX=0 .ds x} ypset 1M "" "\&"
.if \nX=1 .ds x} ypset 1M ""
.if \nX=2 .ds x} ypset 1M "" "\&"
.if \nX=3 .ds x} ypset "" "" "\&"
.TH \*(x}
.SH NAME
\f4ypset\fP \- point ypbind at a particular server
.SH SYNOPSIS
\f4/usr/sbin/ypset\fR
[
\f4\-d\fR
\f2ypdomain\fR
]
[
\f4\-h\fR
\f2host\fR
]
\f2server\fR
.SH DESCRIPTION
.P
In order to run
\f4ypset\fR,
\f4ypbind\fR
must be initiated with the
\f4\-ypset\fR
or 
\f4\-ypsetme\fR
options.
See
\f4ypserv\fR(1M).
\f4ypset\fR
tells
\f4ypbind\fR
to get
\s-1YP\s0
services for the specified
\f2ypdomain\fR
from the
\f4ypserv\fR
process running on
\f2server\fR.
If
\f2server\fR
is down, or is not running
\f4ypserv\fR,
this is not discovered until a
\s-1YP\s0
client process tries to
get a binding for the domain.
At this point, the binding set by
\f4ypset\fR
will be tested by
\f4ypbind\fR.
If
the binding is invalid,
\f4ypbind\fR
will attempt to rebind for the same domain.
.P
\f4ypset\fR
is useful for binding a client node which is not on a broadcast net,
or is on a broadcast net which is not running a
\s-1YP\s0
server host.
It also is useful for debugging
\s-1YP\s0
client applications, for instance where a
\s-1YP\s0
map only exists at a single
\s-1YP\s0
server host.
.P
In cases where several hosts on the local net are supplying
\s-1YP\s0
services, it is possible for
\f4ypbind\fR
to rebind to another host even while you attempt to
find out if the
\f4ypset\fR
operation succeeded. 
For example, you can type:
.RS
.nf
.ft 4
% ypset host1
% ypwhich
host2
.fi
.ft R
.RE
.P
which can be confusing.
This is a function of the
\s-1YP\s0
subsystem's attempt to
load-balance among the available
\s-1YP\s0
servers, and occurs when
\f2host1\fR
does not respond to
\f4ypbind\fR
because it is not running
\f4ypserv\fR
(or is overloaded), and
\f2host2\fR,
running
\f4ypserv\fR,
gets the binding.
.P
\f2server\fR
indicates the
\s-1YP\s0
server to bind to, and
must be specified as a name.
This will work only if the node has a current
valid binding for the domain in question,
and
\f4ypbind\fR
has been set to allow use of
\f4ypset\fR.
In most cases,
\f2server\fR
should be specified as an
\s-1IP\s0
address.
.P
\f4ypset\fR
tries to bind
\f4ypbind\fR
over a datagram transport first.
Datagram Transports are recommended for higher
performance.
The
\s-1YP\s0
library calls,
\f4yp_enum(\|)\fR,
\f4yp_all(\|)\fR,
\f4yp_next(\|)\fR,
and
\f4yp_first(\|)\fR
use circuit transports regardless of the \*(lqmain\*(rq
transport being used.
.P
Refer to
\f4ypfiles\fR(4)
and
\f4ypserv\fR(1M)
for an overview of the YP name service.
.P
The following options are available:
.TP .85i
\f4\-h \f2host\fR
Set
\f4ypbind\fR's
binding on
\f2host\fR,
instead of locally.
\f2host\fR
must be specified as a name.
.TP
\f4\-d \f2ypdomain\fR
Use
\f2ypdomain ,\fR
instead of the default domain.
.SH "SEE ALSO"
\f4ypserv\fR(1M),
\f4ypwhich\fR(1),
\f4ypfiles\fR(4)
