Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 May 1998 16:40:14 -0400 (EDT)
From:      CyberPeasant <djv@bedford.net>
To:        matthew@federal.co.uk (Matthew Sharlot)
Cc:        questions@FreeBSD.ORG
Subject:   Re: Hmm! (DNS Problems)
Message-ID:  <199805092040.QAA10058@castor.loco.net>
In-Reply-To: <35535017.FA3D9479@federal.co.uk> from Matthew Sharlot at "May 8, 98 07:33:59 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Matthew Sharlot wrote:
> Hi,
> 
> I have recently set up my own name server and have a couple of queries.
> Firstly, since having set up the ns, I cannot get communicator 4.05 to
> run properly unless I have first established a PPP connection. What
> happens is communicator seems to hang and I cannot even kill the
> process. I also get a message  /etc/spwd.db: Invalid argument. Any
> suggestions? I know it isn't  a big problem, but it means that I have to
> be online all the time I'm writing e-mails which isn't very cost
> effective.

Don't know about communicator. The delay, of course, is to resolve a
name. Probably the name of netscape's homepage. Try putting that and
its IPA in /etc/hosts.  Then it will stall for something else, some
other name, of course. The solution? don't run it without a gateway.

> Secondly, I assume that having set up the ns there must be a local cache
> of addresses somewhere, to save having to look up the same addresses
> again and again. Any idea where this is and whether it is readable or
> not? I really just want to see that what I have set up is working
> correctly. I have deleted /etc/resolv.conf to make sure that I'm not
> using my ISP's name servers and everything seems to work O.K. I just
> really want a final bit of reassurance.
> 
Deleting /etc/resolv.conf was probably an error; I would recommend
restoring it with contents:

nameserver 127.0.0.1

Perhaps bind (named) defaults to this, but I feel it better (for human
eyes, if nothing else) to have it explicitly listed.

/etc/host.conf by default tells the resolver routines to first
search the DNS system, then looks in /etc/hosts. This default, in
my opinion, is unsuited for a host like yours (and mine) with an
intermittent connection to the root NS servers. If the search
order is this default:

bind
hosts

all name lookups will block for that /long timeout/ if named is unable
to retrieve the data from its cache.  (This is a common cause of
extremely slow booting, if unknown host names (instead of numbers)
are entered in /etc/rc.*, before named has access to the root servers,
or a forwarder).


If the search order is, instead,

hosts
bind

then namelookups can be satisfied by /etc/hosts, before bind goes about
its tortuous thing.

Concerning the named cache, I recommend 'man named' to you; it is
possible to have named dump this cache (normally built and held in
memory) to disc, for your inspection, amusement, and edification.
It is said to be possible to save this cache over reboots, reloading
it. I don't know how to do this (successfully :), nor do I think
it a big win. People concerned with performance just let the machine
run 24/7, anyway.  

If the ISP's nameserver is reliable, you may wish to use it as
a forwarder for lookups; (entry in /etc/namedb/named.boot). Then
lookups will also be cached at the ISP's server, assuming the ISP is
running a decent DNS system, of course.

Dave
--
		<----.   mail-to: djv@bedford.net
		<----|=================================== 
                <----'

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199805092040.QAA10058>