Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Nov 2004 21:55:50 +0000
From:      Peter Risdon <peter@circlesquared.com>
To:        Jonathon McKitrick <jcm@FreeBSD-uk.eu.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Caching DNS for dialup
Message-ID:  <41AB9AE6.60206@circlesquared.com>
In-Reply-To: <20041129204452.GI73697@dogma.freebsd-uk.eu.org>
References:  <20041123233501.GA82229@dogma.freebsd-uk.eu.org> <5557305861.20041124004849@hexren.net> <20041124000014.GA83249@dogma.freebsd-uk.eu.org> <8763344284.20041124022927@hexren.net> <20041124141737.GA11648@dogma.freebsd-uk.eu.org> <41A49F58.4020000@circlesquared.com> <20041124154628.GE11648@dogma.freebsd-uk.eu.org> <41A4BFC8.8070702@circlesquared.com> <20041129204452.GI73697@dogma.freebsd-uk.eu.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Jonathon McKitrick wrote:
> On Wed, Nov 24, 2004 at 05:07:20PM +0000, Peter Risdon wrote:
> : A caching DNS server would help conserve bandwidth on a dialup 
> : connection - I generally run one myself with any connection with limited 
> : bandwidth.
> 
> After RTFM, I believe I have it up and running.  ;-)
> 
> Named is running, but how can I be sure the caching is working?

I'm rusty with bind - I've been using djbdns for the last few years. But 
the way to find out whether it's *working* is to query it directly:

dig @your.gateway.server.ip.or.hostname www.google.com

On the machine itself, dig@localhost ... should be fine.

or whatever. If it's working, you'll get a load of stuff back, including 
a line like this:

;; flags: qr rd aa ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

Do the query again and it should look like this[1]:

;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

ie. no *aa*. If that's what you get, it's caching. The *aa* means *I 
went out on the network for this answer*


> 
> Also, does it make sense to do this on each box, or just the gateway?

Just the gateway.

Peter.

[1] I looked this up because I don't use bind... With dnscache (the 
djbdns caching server, I tail the relevant log to see what it's doing, 
and look directly at the cache. I tried this with dnscache and it didn't 
work :-/ So I am assuming that bind handles these flags differently.

-- 

the circle squared

network systems and software

http://www.circlesquared.com



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