[Dnsmasq-discuss] Time to live for cache

Anand Rangarajan anand@cise.ufl.edu
Sun, 06 Feb 2005 10:52:36 -0500


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?

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.

Thanks for any help.

Anand