Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!samsung!umich!terminator!dabo.ifs.umich.edu!rees From: rees@dabo.ifs.umich.edu (Jim Rees) Newsgroups: comp.sys.apollo Subject: Re: named and /lib/libresolv Message-ID: <1990Mar22.212921.17536@terminator.cc.umich.edu> Date: 22 Mar 90 21:29:21 GMT References: Sender: usenet@terminator.cc.umich.edu (usenet news) Reply-To: rees@citi.umich.edu (Jim Rees) Organization: University of Michigan IFS Project Lines: 32 In article , gjalt@ele.tue.nl (Gjalt de Jong) writes: > > We are running the name server (/etc/named) now on our apollos (SR10.2). But > now not all the programs which should use the name server, use it. > I found this confusing too. First of all, you don't have to do anything special at all to get the correct version of gethostbyfoo(). But the gethostbyfoo man page says, "If the local name server is not running these routines do a lookup in /etc/hosts." That's just wrong. I followed the man pages through named(8) to hostname(7) and finally resolver(5) before figuring out what is really going on here. Here's my understanding based on reading the docs and doing a few experiments: The gethostby calls first look in /etc/resolv.conf (described on the resolver(5) man page). If that file doesn't exist they just look up in /etc/hosts and you're done. If the file does exist and lists a host that has a named (man page named(8)) running, then they query that named. This all seems to work. I wanted to set up a local named to cache names in the local domain, so that if the remote named goes down I can still get around. I read the named man page many times and tried lots of things but can't get it to work. Here is the /etc/named.boot that I think should do it (addresses have been changed to protect the innocent; x and y are real numbers): secondary ifs.umich.edu 35.1.37.x 35.1.128.y /etc/named.cc1 forwarders 35.1.37.x 35.1.128.y Has anyone got this to work?