YP: binding client to server not on same broadcast net
David.Maynard at K.GP.CS.CMU.EDU
David.Maynard at K.GP.CS.CMU.EDU
Sun Jan 28 14:40:00 AEST 1990
> I need some help. I have a collection of Sun clients all in the same
> domain. One of the machines is in another physical building, and thus is
> not on the same broadcast net. When I run ypbind on this client, it
> hangs. How do I make use of YP in this situation. I cannot seem to even
> make this machine a slave server and pull in the maps using "ypinit -s
> master_server" on the client machine.
A partial solution is to do a 'ypset <server_ip_addr>' immediately after
starting ypbind. The appropriate lines in /etc/rc.local (for SunOS 3.5)
are:
if [ -f /etc/ypbind ]; then
/etc/ypbind; (echo -n ' ypbind') >/dev/console
fi
# Force yp server to 128.2.XXX.XXX (broadcasts won't work across gateway)
if [ -f /usr/etc/yp/ypset ]; then
/usr/etc/yp/ypset 128.2.XXX.XXX; (echo -n ' ypset') >/dev/console
fi
This works as long as the gateway between the two networks stays up. If
the client loses contact with the YP server (e.g. the gateway goes down
for a few minutes) then ypbind starts broadcasting for a new server (which
it will never find). I wrote a custom version of ypbind that "strongly"
binds the server (i.e. it will sit and wait forever for its original
server to come back). I only run "ypbind_stong" on non-broadcastable
clients since you lose the benefit of having multiple YP servers.
-David
More information about the Comp.sys.sun
mailing list