From: jzwiebel@pgl-devsvr.den.mmc.com (John Zwiebel (303)977-1480)
Newsgroups: comp.protocols.tcp-ip.domains
Subject: Re: Need Info about setting up Domain Name services (named) on network
Date: 9 Sep 92 15:54:47 GMT
Distribution: usa
Organization: PAGE @ Martin-Marietta

In article <ellis.715893483@nova>, ellis@nova.gmi.edu (Stew Ellis) writes:
|> pgrine@nic.cerf.net (Robert Young) writes:
.
.
.
|> >Has anyone implemented this setup with NIS with DNS (named).
|> >The docs say that NIS can run with domain name services on top of it
|> >I am reading chapter 17 of the SUN : System & Network Administration in
|> >order to understand what is going on but I must confess that I am still
|> >not sure how to go about it.
.
.
.
|> >pgrine@nic.cerf.net
|> >(619) 431-2400, Ext 167
|> 
|> Once you have the DNS tables set up and are running in.named from
|> /etc/rc.local, and have NIS running, you have three additional changes to
|> make from the default Sun setup.  
|> 
|> 1) In /var/yp/Makefile, remove the comment
|> from the line that reads:
|> #B=-b
|> and add one to the line that read:
|> B=
|> This tells the makedbm program to make the NIS databases in such a way to
|> cooperate with DNS.
|> 
|> 2) In /etc/rc.local, set the -d switch for ypserv, again to get the NIS
|> stuff to interact with DNS.
|> 
|> 3) Create an /etc/resolv.conf on the NIS/DNS server with the following info:
|> domain your.domain
|> nameserver ip-number_of_your_primary_nameserver
|> nameserver ip-number_of_your_secondary_nameserver
|> 
|> When you run /var/yp/Makefile, watch to make sure the hosts databases are
|> remade.  If they are not, then touch /etc/hosts and remake.
|> 
|> You also will have to reboot (fastboot) I believe to get the ypserv switch
|> to take effect, although I guess you could kill the pid of ypserv and
|> restart it with the -d.
                                               ___________________
|>   R.Stewart(Stew) Ellis, Assoc.Prof., (Off)313-762-9765  /   _____  ______ 

The only problem is that this doesn't take into account your NIS slave servers.
If the slaves also have a resolv.conf they can forward the DNS names correctly,
_BUT_ it seems that they get their DNS names BEFORE they get NIS names.  This
can cause some MAJOR headaches since a hostname will be returned from the DNS
as pgl-dev2.den.mmc.com instead of pgl-dev2.  This, in turn, messes up
your .rhost and host.equiv files.  If you put a default domain in resolv.conf
then gethostbyname() always adds that default name on to the request and if
the DNS server doesn't answer then it has been my experience (which may not
be correct) that NIS won't know who the guy is either.  (ie.  pgl-dev2 gets
the default domain .den.mmc.com appended to the request.  My DNS server
knows this name but the NIS server only knows pgl-dev2, if DNS fails then
so does NIS).  

It 'should' be easier than this.

To complicate things even more...

I'm running AIX 3.2 on RS6000's.  Page 14-44 of "Communication Concepts and
Procedures" states the following:

In the middle of the page:
"Resolver routines on hosts running TCP/IP attempt to resolve names using the
following sources in the order listed:
1. The DOMAIN (named) name server
2. The local /etc/hosts file.

I you are using network information service (NIS) for name resolution, resolver 
routines will attempt to resove names using the following sources in the order listed:

1. The DOMAIN (named) name server
2. Network Information Service (NIS)

If you are using network information service (NIS) for name resolution, the 
local /etc/hosts file will not be consulted."

Later on on the _SAME_ page...

"NOTE:  I you are using network information service for name resolution, resolver routines will attempt to resolve names using the following sources in the order listd:

	1. Network Information Service
	2. The DOMAIN (named) name server
	3. The local /etc/hots file"

I've read this 30 times or more to see if there is some 'qualifying' information
on this page but I can't see it.

This _must_ be a FAQ.  Anyone have any ideas?

Thanks
John Zwiebel