[Dnsmasq-discuss] Time to live for cache
Simon Kelley
simon@thekelleys.org.uk
Sun, 06 Feb 2005 22:03:07 +0000
Anand Rangarajan wrote:
> I'm really sorry if this question has already been answered in the
> documentation. I couldn't find it. I have dnsmasq running on my linux
> box so that I can cache DNS requests because for some reason my ISP
> nameserver takes a long time to respond. For example, if I type
> harrypotter.com, I get a "Looking for harrypotter.com" for about 5
> seconds which is then followed by name resolution. When I run dnsmasq,
> it caches harrypotter.com (I know this because I've turned on logging
> and I see it in the messages) but it doesn't seem to cache it for very
> long. I can't be sure how long the cache survives, but after half an
> hour, it still takes 5 seconds to resolve the same request made earlier.
>
> Q: How do I make the cache live longer---say a month?
The time which an individual name lives in the cache is controlled by
the owner of the domain - Answers to DNS queries comes with a
"Time-to-live" which is the number of seconds for which it is safe to
cache the information. That value is set by the authoritative servers
for the domain - it varies from seconds to weeks.
If you use a tool like "dig" to do queries, you can see the TTL values
in the answers.
>
> I've switched off ipv6 since firefox and ipv6 don't work well together
> on my SuSE 9.2 box. Also, the same behavior is noticed for some other
> requests like latimes.com, consc.net. Oddly enough, name resolution in
> firefox on XP Pro on the same box is very fast---one second or less.
> Very sad. This is why I looked into dnsmasq in the first place.
This is worth chasing: it implies that there might be a DNS
misconfiguration in the Linux install. - If it's using the same servers
as XP, and trying them in the same order, then it should be as fast.
HTH
Simon.
>
> Thanks for any help.
>
> Anand
>
>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>