On Saturday 28 May 2005 21:16, Marko wrote:
Hi all, I set up named to be my caching dns, and changed my resolv.conf to 127.0.0.1 only but now if i "dig www.google.com" first time it takes 500ms second time 1ms, and if i wait 15min and try again it's 500ms again. Can anyone tell me what's the problem and why it doesnt cache the ip's for longer? Also shouldnt there be files in var/log since in named.conf there are two setting for logging. dump-file "/var/log/named_dump.db"; statistics-file "/var/log/named.stats";
The length of time the IP addresses are cached is a setting on the remote side. google.com is behind a rotating DNS, the IP you receive changes frequently. It's a form of load balancing. So google has configured their DNS to request a very short caching, to force DNS servers to update 500ms is a very long time for a lookup though, it's half a second if my math doesn't fail me completely, and that is way too long. Are you using a forwarder or do you have named to do the lookups itself? If so, is the forwarder DNS that slow? If it isn't, you could try disabling IPv6. If it is, you could try setting your DNS to do its own lookup (if your ISP allows it) The logs you mention aren't created automatically. Have a look at the rndc utility. You need to run commands like "rndc dumpdb" and "rndc stats"