[Dnsmasq-discuss] Caching issue question

Nick nick at double-stroke.com
Thu May 31 10:48:57 BST 2012


Hi everybody,

I updated the powerdns server to version 3.0. The bug with the 
alternating A and AAAA queries to a CNAME which did not get cached seems 
to be solved now. Thanks you very much for the help with the bug.

Sadly, another issue appeared to me. We have the following 2 CNAMES in 
our DNS:

"""
sql-master.fd.corp (CNAME to 1-sql.poz.fd.corp)
sql-master.poz.fd.corp (CNAME to 1-sql.poz.fd.corp)
"""

If I do alternating requests to those both addresses with dig, it seems 
the cache gets overwritten, because dnsmasq does a new query every time 
I execute the dig (in an alternating way). I do normal A queries:

"""
root at server:~ # dig sql-master.poz.fd.corp

; <<>> DiG 9.7.0-P1 <<>> sql-master.poz.fd.corp
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 46380
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;sql-master.poz.fd.corp.                IN      A

;; ANSWER SECTION:
sql-master.poz.fd.corp. 60      IN      CNAME   1-sql.poz.fd.corp.
1-sql.poz.fd.corp.      60      IN      A       10.193.7.130

;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Thu May 31 12:39:39 2012
;; MSG SIZE  rcvd: 76

root at server:~ # dig sql-master.fd.corp

; <<>> DiG 9.7.0-P1 <<>> sql-master.fd.corp
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 51308
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;sql-master.fd.corp.            IN      A

;; ANSWER SECTION:
sql-master.fd.corp.     60      IN      CNAME   1-sql.poz.fd.corp.
1-sql.poz.fd.corp.      60      IN      A       10.193.7.130

;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Thu May 31 12:39:41 2012
;; MSG SIZE  rcvd: 76

root at server:~ # dig sql-master.poz.fd.corp

; <<>> DiG 9.7.0-P1 <<>> sql-master.poz.fd.corp
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64093
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;sql-master.poz.fd.corp.                IN      A

;; ANSWER SECTION:
sql-master.poz.fd.corp. 60      IN      CNAME   1-sql.poz.fd.corp.
1-sql.poz.fd.corp.      60      IN      A       10.193.7.130

;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Thu May 31 12:39:43 2012
;; MSG SIZE  rcvd: 76

root at server:~ # dig sql-master.fd.corp

; <<>> DiG 9.7.0-P1 <<>> sql-master.fd.corp
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 36772
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;sql-master.fd.corp.            IN      A

;; ANSWER SECTION:
sql-master.fd.corp.     60      IN      CNAME   1-sql.poz.fd.corp.
1-sql.poz.fd.corp.      60      IN      A       10.193.7.130

;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Thu May 31 12:39:44 2012
;; MSG SIZE  rcvd: 76
"""

You can see that the TTL stays (60 seconds) and so dnsmasq does a new 
query for every request. The issue does not appear if I do several dig 
queries in a row to the same address. Could somebody please explain that 
to me? Because now there are 2 different hostnames which I query with 
dig.

I use version 2.59-4 of dnsmasq (the package from ubuntu 12.04 rebuild 
for ubuntu 10.04).

Cheers
Nick



Am 18.05.2012 17:19, schrieb Nick:
> Hi Simon,
> yeah that seems to be the bug. Thank you very much for your help.
>
> Cheers
> Nick
>
>
> Am 18.05.2012 15:31, schrieb Simon Kelley:
>> On 18/05/12 13:49, Nick wrote:
>>> Hi Simon,
>>> it seems that my powerdns gives me back the CNAMEs only for A 
>>> queries
>>> and not for AAAA queries. But if I understood you correctly it 
>>> should
>>> give back the CNAME for A and AAAA queries, right?
>>
>> This looks like it maybe a powerDNS bug, fixed in 3.0
>>
>> "In addition, queries for AAAA for a CNAMEd record pointing to a 
>> name
>> with no AAAA would deliver a direct SOA, without the CNAME in 
>> between."
>>
>> from
>>
>> 
>> http://bert-hubert.blogspot.co.uk/2011/07/powerdns-authoritative-server-30-has.html
>>
>>
>> Cheers,
>>
>> Simon.
>>
>>
>> _______________________________________________
>> Dnsmasq-discuss mailing list
>> Dnsmasq-discuss at lists.thekelleys.org.uk
>> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>
>
> _______________________________________________
> 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