[Dnsmasq-discuss] test33: excessive queries for the same address

Simon Kelley simon at thekelleys.org.uk
Thu Jan 31 07:39:02 GMT 2008


Carlos Carvalho wrote:
> I've noticed that dsnmasq doesn't seem to cache negative responses
> long enough:
> 
> Jan 30 22:35:29 dnsmasq[4260]: query[A] vger.kernel.org.bl.open-whois.org from 192.168.3.18
> Jan 30 22:35:29 dnsmasq[4260]: forwarded vger.kernel.org.bl.open-whois.org to 127.0.0.1
> Jan 30 22:35:38 dnsmasq[4260]: query[A] vger.kernel.org.bl.open-whois.org from 192.168.3.18
> Jan 30 22:35:38 dnsmasq[4260]: forwarded vger.kernel.org.bl.open-whois.org to 127.0.0.1
> Jan 30 22:36:01 dnsmasq[4260]: query[A] vger.kernel.org.bl.open-whois.org from 192.168.3.18
> Jan 30 22:36:01 dnsmasq[4260]: forwarded vger.kernel.org.bl.open-whois.org to 127.0.0.1
> Jan 30 22:36:23 dnsmasq[4260]: query[A] vger.kernel.org.bl.open-whois.org from 192.168.3.18
> Jan 30 22:36:23 dnsmasq[4260]: forwarded vger.kernel.org.bl.open-whois.org to 127.0.0.1
> Jan 30 22:36:50 dnsmasq[4260]: query[A] vger.kernel.org.bl.open-whois.org from 192.168.3.18
> Jan 30 22:36:50 dnsmasq[4260]: forwarded vger.kernel.org.bl.open-whois.org to 127.0.0.1
> Jan 30 22:38:21 dnsmasq[4260]: query[A] vger.kernel.org.bl.open-whois.org from 192.168.3.18
> Jan 30 22:38:21 dnsmasq[4260]: forwarded vger.kernel.org.bl.open-whois.org to 127.0.0.1
> Jan 30 22:39:09 dnsmasq[4260]: query[A] vger.kernel.org.bl.open-whois.org from 192.168.3.18
> Jan 30 22:39:09 dnsmasq[4260]: forwarded vger.kernel.org.bl.open-whois.org to 127.0.0.1
> 
> This seems somewhat excessive, it should have cached the answer
> whatever it is; there was an answer (nxdomain) from the server at
> 127.0.0.1. I do NOT use --no-negcache. This is with test33, which is
> the same as rc1.

Carlos,

Please could you try the same query by hand, using dig

dig vger.kernel.org.bl.open-whois.org

There should be an SOA record in the AUTHORITY section of the answer, 
like this:

; <<>> DiG 9.3.4 <<>> vger.kernel.org.bl.open-whois.org
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 2313
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;vger.kernel.org.bl.open-whois.org. IN  A

;; AUTHORITY SECTION:
bl.open-whois.org.      900     IN      SOA     a.ns.open-whois.org. 
hostmaster.open-whois.org. 1201763520 900 450 604800 900

;; Query time: 163 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Thu Jan 31 07:28:17 2008
;; MSG SIZE  rcvd: 103

That record is needed to do negative caching (it provides the time for 
which the cache entry is valid) and without it no caching will take 
place. ISPs sometimes configure their customer-facing nameservers not to 
return authority records, to save in system load. (My ISP used to, but 
seems to have put them back, now.)

I checked here, and with the SOA record the result is cached.

There could be another explanation, but this is the most likely and 
should be checked first.

Cheers,

Simon.

> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 




More information about the Dnsmasq-discuss mailing list