[Dnsmasq-discuss] Caching issue question

Simon Kelley simon at thekelleys.org.uk
Fri May 18 09:35:01 BST 2012

On 18/05/12 09:14, Nick wrote:
> Hi,
> I have a question to the caching of dnsmasq. I installed dnsmasq on some
> of our boxes and configured the boxes to use in
> /etc/resolv.conf (so they use dnsmasq). That works really well and I can
> resolve DNS queries on those boxes. All the queries get send from
> dnsmasq to our internal DNS server (which has internal zones
> configured). For testing I checked the incoming DNS requests on the
> central DNS server with the usage of "dnscap". I encountered a strange
> thing:
> When I do a "dig session-storage.fd.corp" (fd.corp is an internal
> domain) the first time on one box where dnsmasq is installed I can see
> that one requests comes in on the central DNS server. The second time I
> execute it, nothing comes in on the central DNS. So it gets cached in
> dnsmasq which is fine. The problem appears when I do a "dig
> session-storage.fd.corp" and a "dig AAAA session-storage.fd.corp"
> alternately. I can see an incoming request for every dig request on the
> central DNS server which means that there is no caching. I enabled
> logging in dnsmasq and it seems that a request to the AAAA address
> overwrites the cache entry for the A request. There is no AAAA entry on
> our DNS server for session-storage.fd.corp (only an "A" entry is there
> and this is a CNAME).
> So my question is if this is a normal behaviour of dnsmasq or a bug? I
> have a php application which requests those A and AAAA names alternately
> (this is how I recognized it).
> I am running dnsmasq 2.59 (the version from Ubuntu 12.04). Our central
> DNS server uses powerdns.
I just tried to reproduce this with the current code, and can't. I've
created the domain


which has A and AAAA records and 10-minute TTL and it gets cached fine
even when I alternate A and AAAA queries.

So, to answer you question, it's certainly not intended behaviour, and
if it's a dnsmasq bug it's more complex than we currently know. Are you
sure the problem is not simply short time-to-live values?

Are you using a custom dnsmasq config? The default
launched-by-networkmanager dnsmasq install in Ubuntu precise disables



More information about the Dnsmasq-discuss mailing list