Page 1 of 2
Geek Question
Posted: Tue Aug 03, 2004 12:41 pm
by SCIN
I've googled the crap out of this and can't seem to find an answer.
Does anyone know how to display the client resolver cache on a Linux box? On windoze it's ipconfig/displaydns.
Thanks.
Posted: Tue Aug 03, 2004 12:56 pm
by Horatio Felacio
you have to hook up to the Geneva Megaserver IPDNS. this will let you know what your transfixilator has been running at for the past 12 gigahertz. now, under options>tools> client resolver cache...should be there looking at you.
Posted: Tue Aug 03, 2004 1:02 pm
by lordjim_2001
doesn't ipconfig -all do that? It's been too long since I've played with linux.
try "ifconfig". I think that may show what you need.
Posted: Tue Aug 03, 2004 2:35 pm
by SCIN
Nah, ipconfig is a windows command. There is no argument to ifconfig for displaying the dns cache that I know of.
Posted: Tue Aug 03, 2004 2:57 pm
by Wes
Maybe an option within nslookup or dig?
Wes
Posted: Tue Aug 03, 2004 5:42 pm
by Boyd
is the cache written to disk? i was investigating named and read on a linux forum that dns cache was not viewable since it wasn't saved
Posted: Tue Aug 03, 2004 5:49 pm
by SCIN
Well, some of the TTL times are pretty long so I imagine it is written to disk. Even if it is written to memory that should not be a limitation with the power of Linux. I mean, the whole /proc filesystem isn't even really on disk but is used by many commands in Linux.
Posted: Tue Aug 03, 2004 6:11 pm
by Eric
have you checked the flux capacitor? it might not be generating the 1.21 gigawatts necessary.
Posted: Tue Aug 03, 2004 8:38 pm
by Boyd
i don't manage a dns, but can you try dns logging via adding some code into named.conf depending on implementation (i get lost here) or try tail -f /var/log/messages to look for errors interactively?
Posted: Tue Aug 03, 2004 10:28 pm
by zemkat
Linux does not cache DNS lookups. It queries a nameserver (or /etc/hosts file) every single time it needs it.
Since this can be pretty slow, many linux boxes run a name server locally which will answer queries (from itself) and caches the answers.
The command to interact with the most common of these is "rndc". Two useful rndc commands are "rndc flush" and "rndc dumpdb". The first empties the cache and the second outputs the cache to a database file (which neither Jack nor I have either bothered reading). Restarting the nameserver will also flush the cache, if you don't mind the lack of finesse.
Dig is a nice nameserver interacter, but it mostly acts as a client and not as an administrator. It can tell you things like which name server gave it the answer, if it was cached, and similar details.