[16] in Hesiod

home help back first fref pref prev next nref lref last post

problem with hesiod server

daemon@ATHENA.MIT.EDU (Tim Garlick -- UCSC Computer Center)
Wed Apr 26 18:53:27 1989

Date: Wed, 26 Apr 89 15:33:44 -0700
From: garlick@ucsco.UCSC.EDU (Tim Garlick -- UCSC Computer Center)
To: hesiod@ATHENA.MIT.EDU
To all the hesiod gurus out there:

I am trying to install hesiod into our nameserver.  I have gotten it 
to almost work.  The environment is such that "ucscc" (or just "c")
is the primary nameserver for IN addresses.  I set it up so that it is
also the primary name server for the HS class.  Here is its named.boot:

;
;  @(#)named.boot.master	1.14	(UCSC)  87/07/30
;
;  boot file for authoritative name server
; Note that there should be one primary entry for each SOA record.
;

sortlist 128.32.0.0 128.45.0.0 128.3.0.0 36.0.0.0 128.102.0.0 10.0.0.0 31.0.0.0

directory	/etc/namedb

; type    domain                 source file, or host and backup file

primary   UCSC.EDU           	 ucschosts
cache     .                      root.cache
primary   HESIOD		 ucschesiod
primary   114.128.IN-ADDR.ARPA   ucschosts.rev
primary   0.0.127.IN-ADDR.ARPA   localhost.rev

Here is the ucschesiod file on ucscc:

; Simulate authoritative data for UCSC.EDU, class HS.
;
@		HS	SOA	UCSCC.UCSC.EDU. HAYNES@UCSC.EDU (
			4.8	      ; serial - database version number
			1800	      ; refresh - sec servers
			300	      ; retry - for refresh
			3600          ; expire - unrefreshed data
			7200 )        ; min
		HS	NS	UCSCC.UCSC.EDU.
;
;
root.uid	HS	TXT	root:0	;sample HS record

Everything works fine on the server, ucscc.  Hesinfo and nslookup 
return all the correct information.  So then I tried to add it
to another machine.  This machine, ucsch, was a secondary server,
but I turned it into a caching only nameserver, thinking that might
help.  Here is ucsch's named.boot:

;
;  @(#)named.boot.slave	1.13	(UCSC)  87/08/05
;
;  boot file for secondary name server
; Note that there should be one primary entry for each SOA record.
;
;
sortlist 128.32.0.0 128.45.0.0 128.3.0.0 36.0.0.0 128.102.0.0 10.0.0.0 

directory	/etc/namedb

; type    domain		source host/file		backup file

cache     .			root.cache
primary	 HESIOD			ucschesiod

The file, ucschesiod is different on the client machine and the server.  
I used the one from the distribution, modified for our machines:

; Simulate authoritative data for ATHENA.MIT.EDU, class HS, and delegate
; name service NS.ATHENA.MIT.EDU.
;
@		HS	SOA	UCSCC.UCSC.EDU. (
			4.8	      ; serial - database version number
			1800	      ; refresh - sec servers
			300	      ; retry - for refresh
			3600          ; expire - unrefreshed data
			7200 )        ; min
		HS	NS	UCSCC.UCSC.EDU.
; pointers to Hesiod name servers
HESIOD.			99999999	HS	NS	    UCSCC.UCSC.EDU.
;NS.ATHENA.MIT.EDU.	99999999	HS	NS	    APOLLO.MIT.EDU.
;NS.ATHENA.MIT.EDU.	99999999	HS	NS	    CLIO.MIT.EDU.
; Hesiod address records (simply duplicates of IN address records)
UCSCC.UCSC.EDU.		99999999	HS	A	    128.114.129.1
;CLIO.MIT.EDU.		99999999	HS	A	    18.63.0.7
;APOLLO.MIT.EDU.	99999999	HS	A	    18.80.0.10
; Internet address records for the same Hesiod servers
; required because of implementations of gethostbyname() which use
; C_ANY/T_A queries.
;CLIO.MIT.EDU.		99999999	IN	A	    18.63.0.7
UCSCC.UCSC.EDU.		99999999	IN	A	    128.114.129.1
;APOLLO.MIT.EDU.	99999999	IN	A	    18.80.0.10

So here's the problem:  The client cannot resolve the CNAME for the server.
It works the first time, but each subsequent call to the nameserver returns
only the CNAME, not the A RR.  All other addresses, both local and distant,
resolve just fine.  Here is a script demonstrating this:

# kill `cat /etc/named.pid`;/etc/named

# hesinfo -bl root uid
hes_to_bind(root, uid) expands to
root.uid.hesiod.
which resolves to
root:0

# nslookup c		[c (an alias for ucscc) is the primary nameserver]
Server:  ucsch.UCSC.EDU
Address:  0.0.0.0

Name:    ucscc.UCSC.EDU
Address:  128.114.129.1
Aliases:  c.UCSC.EDU

# !!
nslookup c
*** ucsch.UCSC.EDU can't find c: Server failed
Server:  ucsch.UCSC.EDU
Address:  0.0.0.0

# !!
nslookup c
*** ucsch.UCSC.EDU can't find c: Server failed
Server:  ucsch.UCSC.EDU
Address:  0.0.0.0

# nslookup ucscc
Server:  ucsch.UCSC.EDU
Address:  0.0.0.0

Name:    ucscc.UCSC.EDU
Address:  128.114.129.1

[ucschosts is the primary file for the server.]

# rsh ucscc head -23 /etc/namedb/ucschosts
;
;	@(#)ucschosts	1.81	(UCSC)	89/4/24
;

@	IN	SOA	ucscc.UCSC.EDU. haynes.ucscc.UCSC.EDU. (
				1.81	; serial
				10800	; refresh
				600	; retry
				3600000	; expire
				86400 )	; minimum
		IN	NS	ucscc.UCSC.EDU.
		IN	NS	flatte.UCSC.EDU.
localhost	IN	A	127.1
loghost		IN	CNAME	localhost
ucscc		IN	A	128.114.129.1
		IN	HINFO	vax-11/780 unix
c		IN	CNAME	ucscc


[nslookup in debug mode:]
*** ucsch.UCSC.EDU can't find c: Server failed
Default Server:  ucsch.UCSC.EDU
Address:  0.0.0.0

> c
Server:  ucsch.UCSC.EDU
Address:  0.0.0.0

------------
Got answer:
    HEADER:
	opcode = QUERY, id = 1, rcode = SERVFAIL
	header flags:  response, want recursion, recursion avail.
	questions = 1,  answers = 1,  auth. records = 0,  additional = 0

    QUESTIONS:
	c.UCSC.EDU, type = A, class = IN
    ANSWERS:
    ->  c.UCSC.EDU	canonical name = ucscc.UCSC.EDU

------------
Failed: SERVFAIL, num. answers = 1, ns = 0, additional = 0
script done on Wed Apr 26 14:06:15 1989

I'm at a loss.  I've tried a bunch of different combinations, setting up
ucsch as both a primary and a secondary HS server (didn't work at all).
I got roughly the same results when ucsch was a secondary IN server.
Originally I had set up the hesiod domain to be hes.ucsc.edu, but changed
it to just "hesiod" thinking that might help.  It didn't.

I know this is long (and who wants to wade through someone else's problem),
but I'd appreciate any help, as I'm kind of stuck for new ideas.  If you 
need more information, just write- I'd be happy to oblige.  Thanks!

			-Tim Garlick.
			garlick@ucsco.ucsc.edu

home help back first fref pref prev next nref lref last post