I've been looking at this problem for over a year on an off and on basis and I haven't yet fully solved it.
I am running NIS on my network with 3 slaves 1 master and about 100 clients. Sometimes though I would like to be able to just "ping mit.edu" instead of having to try running through nslookup or some similar kludge. It is fairly clear what happens when I run NIS alone or DNS alone but when both of them run together things get really confusing. Thanks to Hal Stern's NFS & NIS book I figured out how to set the clients to get full domain names from a DNS server through the ypserv daemon. (add a -b to
akefile in /etc/yp). However, since the NIS slaves have /etc/resolv.conf set to look for DNS names, they seem to blow of NIS and go straight to the DNS server. (The master NIS server may also do this but I don't think so yet)
Well, if the slave loses contact with the DNS server he can't talk to anyone. The NIS map is in place and show up with a ypcat but an attempt to ping a host results in failure until the connection to the DNS server comes back up. In addition there are horrible problems with domain names. (Right now I don't have resolv.conf using any).
Here is a slave server response:
pgl-hsp# ypwhich
pgl-devsvr.den.mmc.com
and a client response to that same server
pgl-amp2:/] ypwhich
pgl-hsp
and the master is bound to itself:
[ pgl-devsvr /etc/yp ]
root: ypwhich
pgl-devsvr
So why does the slave have the domain name added to it?
Watch what happens when I reset the master:
[ pgl-devsvr /etc/yp ]
root: ypwhich
pgl-devsvr
[ pgl-devsvr /etc/yp ]
root: /usr/etc/yp/ypset pgl-hsp
[ pgl-devsvr /etc/yp ]
root: ypwhich
pgl-hsp.den.mmc.com
[ pgl-devsvr /etc/yp ]
I should tell you that my NIS servers are RS6000's with AIX 3.2 and the DNS servers are Sun's.
I want the slaves to get their binding from NIS, not from DNS, I can not depend on the path to the DNS servers. I could set up my master NIS as a DNS server also but I don't want to have to.