[comp.sys.sun] DNS and YP

drl@vuse.vanderbilt.edu (David R. Linn) (11/21/89)

I am looking for information concerning use of DNS in a network of Sun and
HP workstations and DNS-knowledgable PCs (NCSA-TELNET).  I understand that
there are some sort of bad interactions between DNS and YP (which I wich
to continue using).  Please send any information and experience (for or
against) you may have concerning this topic to me by mail; it there is
interest, I will summarize to the list.

	 David

David Linn / drl@vuse.vanderbilt.edu / ...!uunet!vuse.vanderbilt.edu!drl

terry@eesun1.eece.ksu.edu (Terry Hull) (05/29/90)

People seem to have problems getting YP and the DNS to cooperate and as I
was looking over some old Sun-Spots articles, I had an idea.  Has anybody
out there tried eliminating /etc/hosts service from YP, and replacing the
Sun r-utilities with the BSD versions and just linking them with the
Berkeley named resolver routines?  It seems like this method would allow
continued use of YP for things like /etc/passwd, and also allow
distributed hostname service using DNS.  

What problems do you sun.experts see with this scheme?  If you have
nameservers running, why do you need /etc/hosts served by YP?  

Terry Hull 
Department of Electrical and Computer Engineering, Kansas State University
Work:  terry@eece.ksu.edu, rutgers!ksuvax1!eecea!terry
Play:  terry@tah386.manhattan.ks.us, rutgers!ksuvax1!eecea!tah386!terry

lindh@uhasun.hartford.edu (Andrew Lindh) (05/31/90)

In article <8224@brazos.Rice.edu>, terry@eesun1.eece.ksu.edu (Terry Hull) writes:
> People seem to have problems getting YP and the DNS to cooperate and as I
> was looking over some old Sun-Spots articles, I had an idea.......

Here is how you get ALL suns running YP to get names from BOTH the YP
files and the DNS host. And you do not need the SunOS Source!

You first need to set up a host with DNS. This host does not have to be a
Sun and it does not have to be the YP master.

step 1:	Set up DNS correctly on some machine
step 2:	Set up ALL suns as DNS users.
	edit the file /etc/resolv.conf
	to contain the correct lines. Example:
	(note domain is not the same as YP domainname 
	 192.52.156.100 is our main DNS on campus 
	 it is a VAXstation 3100 with ultrix)
-----
domain		hartford.edu
nameserver	192.52.156.100
nameserver	192.35.82.2
nameserver	192.33.4.12
-----
step 3: edit the file /var/yp/Makefile of you YP master
	(not the YP slaves or clients)
	find the section where is does a makedbm on the
	host files (line 59? starts with "hosts.time")
	add "-b" after both "($MAKEDBM)" statements
	and before the "-". This IS documented the man page
step 4: reboot

This tells the system to use YP and then check DNS. But there is a problem
with this.....on some 4.0.3 (4.1??) systems it will forget to check DNS
sometimes, you then need to reboot the systems

You will need to check the manuals to correctly set up DNS. You can use
the /usr/etc/nslookup program to check the DNS setup.

Good Luck.....and yes it works here, including PC-NFS!!

Andrew Lindh, a student at the University of Hartford -- Computer Science
BITNET:    LINDH@HARTFORD.bitnet       INTERNET: lindh@uhasun.uofh.edu
UUCP/Usenet: lindh@evecs.uucp	---- When will I grduate???
NOTE: All views here are MINE!!! Not the schools or thoes of anyone else!