[comp.sys.apollo] named and /lib/libresolv

gjalt@ele.tue.nl (Gjalt de Jong) (03/21/90)

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.

According to the manual page of gethostbyname:

> Domain/OS EXTENSION
>      The Domain/OS version of gethostbyname locates the name server's resolver
>      routines in their own dynamic library, /lib/libresolv, rather than in the
>      /lib/clib global library.

This sounds great, since then you don't need to recompile (better: link) all
the programs (of which you normally don't have the sources) with the proper
library.

However, how do you get this working. Inlib (built-in command in the shells)
doesn't seem to help.

I think there must be a simple solution to this. But which??

Thanks in advance


--
__
Gjalt G. de Jong,                 | Phone: +(31)40-473345
Eindhoven University of Technology, Dept. of Electr. Eng. (ES/EH 7.26)
P.O. Box 513, 5600 MB Eindhoven, The Netherlands
Email: gjalt@ele.tue.nl

rees@dabo.ifs.umich.edu (Jim Rees) (03/23/90)

In article <GJALT.90Mar21085617@ele.tue.nl>, 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?

rees@dabo.ifs.umich.edu (Jim Rees) (03/24/90)

In article <1990Mar22.212921.17536@terminator.cc.umich.edu>,
rees@dabo.ifs.umich.edu (Jim Rees) writes:
> 
> 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().

I forgot to mention the most important part.  You have to run nmconfig,
usually from /etc/rc.local .  Again, this is inadequately documented on the
man pages.  It's quite well documented in the TCP/IP book, so the man page
omission is more likely Berkeley's than Apollo's.

ran@cns.umist.ac.uk (Bob Nutter) (03/27/90)

Hi!

(I'm new to this news game, and news.announce.newusers isn't
available, so bear with me if I mess up or break some golden rule of
etty-kitty)

In article <1990Mar22.212921.17536@terminator.cc.umich.edu> rees@citi.umich.edu (Jim Rees) writes:
>
>In article <GJALT.90Mar21085617@ele.tue.nl>, 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.
>> 
>
> ...deleted
>
>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?

-try taking the forwarders line out and using a cache. I'm certainly no
expert at this, but I'm told this might cause it not to work as expected.
The manual says you should always use a cache for a standard server.

-another idea is to get hold of the source for named. We had to do
this as we're running sr10.1 and the named there is about version 4.5
rather than the 4.8 you can get the source for (getting a new routed
helped us enormously as well, but I don't know how bad it is at 10.2).
We got the source from Imperial College London (ic.doc.src.ac.uk) over
ftp (username guest, password your_mail_id) in 
"<PUB>unix/bsd-sources/src/bind-4.8.tar.Z",but it *must* be available
in the States somewhere. This has quite a bit of useful documentation
(RFC's etc).

-a problem with /etc/resolv.conf is that it is only read when the node
boots up. (certainly at 10.1). The resolver(3) is initialised when the
global inlibs are initialised, ie: at boot time. This is obvioulsy an
apollo mod. The manual pages refer to the normal behaviour. If you
*really* want a way round this, get hold of the source and turn the
resolver into a new global inlib (which we're currently trying to do!)
You can then get any behaviour you want!  ;-)

Good luck, you'll probably need it!

bob
---------------------------------------------------------------
bob nutter, computer officer        Notice: The witty message
dept. of computation UMIST          is on holiday
PO Box 88 Manchester M60 1QD UK
tel: +44/0 61 200 3312
email: b.nutter@umist.ac.uk (pref)
       rn@ap.co.umist.ac.uk
       ran@cns.umist.ac.uk	    #include <std_disclaimer.h>