[Dnsmasq-discuss] CNAME caching issue in Dnsmasq(2.76)

Yossi Boaron yossi.boaron.1234 at gmail.com
Sun Jan 20 13:51:14 GMT 2019


I run the same test with Dnsmasq 2.80 (2.80-32-g28cfe36) - and got the
similiar results.

10.0.2.200 is the VM's IP address
10.46.4.43 - is the IP address of the external DNS server

The dnsmasq log as response to ' dig +noedns  ostest-etcd-5.shiftstack.com.
A'

Jan 20 12:54:37 dnsmasq[711308]: query[A] ostest-etcd-5.shiftstack.com from
10.0.2.200
Jan 20 12:54:37 dnsmasq[711308]: forwarded ostest-etcd-5.shiftstack.com to
10.46.4.43
Jan 20 12:54:37 dnsmasq[711308]: reply ostest-etcd-5.shiftstack.com is
<CNAME>
Jan 20 12:54:37 dnsmasq[711308]: reply ostest-master-2.shiftstack.com is
NODATA-IPv4

The dnsmasq log as response to ' dig +noedns ostest-etcd-5.shiftstack.com.
AAAA  ostest-etcd-5.shiftstack.com.  A'

Jan 20 13:07:33 dnsmasq[711308]: query[AAAA] ostest-etcd-5.shiftstack.com
from 10.0.2.200
Jan 20 13:07:33 dnsmasq[711308]: forwarded ostest-etcd-5.shiftstack.com to
10.46.4.43
Jan 20 13:07:33 dnsmasq[711308]: reply ostest-etcd-5.shiftstack.com is
<CNAME>
Jan 20 13:07:33 dnsmasq[711308]: reply ostest-master-2.shiftstack.com is
NODATA-IPv6
Jan 20 13:07:33 dnsmasq[711308]: query[A] ostest-etcd-5.shiftstack.com from
10.0.2.200
Jan 20 13:07:33 dnsmasq[711308]: cached ostest-etcd-5.shiftstack.com is
<CNAME>
Jan 20 13:07:33 dnsmasq[711308]:
/var/lib/neutron/dhcp/1555837d-1114-41af-9820-a4c420f6a1ae/addn_hosts
ostest-master-2.shiftstack.com is 10.0.1.214


After I run once the dig AAAA, seems that dig A command works as expected
(probably because CNAME was chached):

Jan 20 13:43:23 dnsmasq[837744]: 2655 10.0.2.200/59700 query[A]
ostest-etcd-5.shiftstack.com from 10.0.2.200
Jan 20 13:43:23 dnsmasq[837744]: 2655 10.0.2.200/59700 cached
ostest-etcd-5.shiftstack.com is <CNAME>
Jan 20 13:43:23 dnsmasq[837744]: 2655 10.0.2.200/59700
/var/lib/neutron/dhcp/1555837d-1114-41af-9820-a4c420f6a1ae/addn_hosts
ostest-master-2.shiftstack.com is 10.0.1.214

Any help will be appreciated
Yossi


‫בתאריך יום א׳, 20 בינו׳ 2019 ב-13:03 מאת ‪Yossi Boaron‬‏ <‪
yossi.boaron.1234 at gmail.com‬‏>:‬

>
> Hi All,
> I have the following DNS topology (In my Openstack deployment):
> VM --> DNSMASQ --> external DNS server
> domain name= shiftstack.com, and Dnsmasq 2.76 is used at this Openstack
> deployment.
>
> I run the following test:
> 1. Define CNAME record at external DNS server
>
> ostest-etcd-5.shiftstack.com.     IN   CNAME        ostest-master-2
>
> 2. while 'ostest-master-2' is defined in --addn-hosts at Dnsmasq:
> the relevant entry:
> 10.0.1.214      ostest-master-2.shiftstack.com. ostest-master-2
>
> 3. next step, I tried to resolve 'ostest-etcd-5.shiftstack.com.' from the
> VM.
> I expected that dig ostest-etcd-5.shiftstack.com. should be replied with
> the ostest-master-2 IP (10.0.1.214).
>
> Actual behavior:
> When I run dig (see 1)  just for type A, Dnsmasq replied only with the
> CNAME entry and doesn't return ostest-master-2 IP address.
>
> But when I run dig (see 2) for types AAAA and A (at this order), I can see
> that Dnsmasq resolves  ostest-master-2 IP address as expected.
>
> It seems to me like an issue of CNAME caching  at Dnsmasq (2.76),
> Is it a known issue?
>
> Thanks in advance
> Yossi
>
>
> [1]
> $ dig +noedns  ostest-etcd-5.shiftstack.com.  A
>
> ; <<>> DiG 9.9.4-RedHat-9.9.4-72.el7 <<>> +noedns
> ostest-etcd-5.shiftstack.com. A
> ;; global options: +cmd
> ;; Got answer:
> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13837
> ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
>
> ;; QUESTION SECTION:
> ;ostest-etcd-5.shiftstack.com.  IN      A
>
> ;; ANSWER SECTION:
> ostest-etcd-5.shiftstack.com. 3600 IN   CNAME
> ostest-master-2.shiftstack.com.
>
> ;; Query time: 2 msec
> ;; SERVER: 10.0.0.2#53(10.0.0.2)
> ;; WHEN: Sun Jan 20 09:52:48 UTC 2019
> ;; MSG SIZE  rcvd: 118
>
> $
>
> [2]
> $ dig +noedns ostest-etcd-5.shiftstack.com. AAAA
> ostest-etcd-5.shiftstack.com.  A
>
> ; <<>> DiG 9.9.4-RedHat-9.9.4-72.el7 <<>> +noedns
> ostest-etcd-5.shiftstack.com. AAAA ostest-etcd-5.shiftstack.com. A
> ;; global options: +cmd
> ;; Got answer:
> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 63573
> ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
>
> ;; QUESTION SECTION:
> ;ostest-etcd-5.shiftstack.com.  IN      AAAA
>
> ;; ANSWER SECTION:
> ostest-etcd-5.shiftstack.com. 3600 IN   CNAME
> ostest-master-2.shiftstack.com.
>
> ;; Query time: 3 msec
> ;; SERVER: 10.0.0.2#53(10.0.0.2)
> ;; WHEN: Sun Jan 20 09:53:59 UTC 2019
> ;; MSG SIZE  rcvd: 118
>
> ;; Got answer:
> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15671
> ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0
>
> ;; QUESTION SECTION:
> ;ostest-etcd-5.shiftstack.com.  IN      A
>
> ;; ANSWER SECTION:
> ostest-etcd-5.shiftstack.com. 3600 IN   CNAME
> ostest-master-2.shiftstack.com.
> ostest-master-2.shiftstack.com. 0 IN    A       10.0.1.214
>
> ;; Query time: 0 msec
> ;; SERVER: 10.0.0.2#53(10.0.0.2)
> ;; WHEN: Sun Jan 20 09:53:59 UTC 2019
> ;; MSG SIZE  rcvd: 106
>
> $
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20190120/07d4e6cc/attachment.html>


More information about the Dnsmasq-discuss mailing list