is my caching server caching responses to queries from other machines on my LAN?

Ronan Flood ronan at noc.ulcc.ac.uk
Fri Sep 10 12:22:39 UTC 2004


Barry Margolin <barmar at alum.mit.edu> wrote:

> zast at verizon.net (nic stage) wrote:
> 
> > i bet there is a better way for me to check what responses were cached
> > than just guessing based on dig response times, but i haven't found
> > out how.  any help would be greatly appreciated, and i'll look around
> > and see if i can help someone else right now too.
> 
> "rndc dumpdb" will dump the cache to a text file.
> 
> Also, when you use "dig" to query something, look at the TTL.  If it's 
> not a nice multiple of 60, there's at least a 95% chance that it came 
> from the cache.

Doing a non-recursive "any" query will show only what's in the cache
for that name (any type: A, MX, etc), I think, so

 dig @127.0.0.1 www.example.com. any +norec

Some websites have quite short TTLs on their records, so it's possible
that the record can expire from the cache before you get around to
checking it.  For example www.yahoo.com just now gave me

 www.yahoo.com.          300     IN      CNAME   www.yahoo.akadns.net.
 www.yahoo.akadns.net.   60      IN      A       66.94.230.42
 www.yahoo.akadns.net.   60      IN      A       66.94.230.47
 ...etc

so the A records will only stay in the cache for 60 seconds.

-- 
                      Ronan Flood <R.Flood at noc.ulcc.ac.uk>
                        working for but not speaking for
             Network Services, University of London Computer Centre
     (which means: don't bother ULCC if I've said something you don't like)


More information about the bind-users mailing list