<div dir="rtl"><div dir="ltr">I run the same test with Dnsmasq 2.80 (<span style="font-family:monospace">2.80-32-g28cfe36)</span> - and got the similiar results.</div><div dir="ltr"><br></div><div dir="ltr"><span style="color:rgb(0,0,0);font-family:monospace">10.0.2.200 is the VM's IP address</span><br style="font-family:monospace"></div><div dir="ltr"><span style="font-family:monospace">10.46.4.43 - is the IP address of the external DNS server</span><span style="color:rgb(0,0,0);font-family:monospace"><br></span></div><div dir="ltr"><br></div><div dir="ltr">The dnsmasq log as response to ' dig +noedns <a href="http://ostest-etcd-5.shiftstack.com/" target="_blank">ostest-etcd-5.shiftstack.com</a>. A'</div><div dir="ltr"><br></div><div dir="ltr"><span style="font-family:monospace"><span style="color:rgb(0,0,0)">Jan 20 12:54:37 dnsmasq[711308]: query[A] <a href="http://ostest-etcd-5.shiftstack.com">ostest-etcd-5.shiftstack.com</a> from 10.0.2.200
</span><br>Jan 20 12:54:37 dnsmasq[711308]: forwarded <a href="http://ostest-etcd-5.shiftstack.com">ostest-etcd-5.shiftstack.com</a> to 10.46.4.43
<br>Jan 20 12:54:37 dnsmasq[711308]: reply <a href="http://ostest-etcd-5.shiftstack.com">ostest-etcd-5.shiftstack.com</a> is <CNAME>
<br>Jan 20 12:54:37 dnsmasq[711308]: reply <a href="http://ostest-master-2.shiftstack.com">ostest-master-2.shiftstack.com</a> is NODATA-IPv4</span></div><div dir="ltr"><span style="font-family:monospace"><br></span></div><div dir="ltr"><div dir="ltr">The dnsmasq log as response to ' dig +noedns <a href="http://ostest-etcd-5.shiftstack.com/" target="_blank">ostest-etcd-5.shiftstack.com</a>. AAAA <a href="http://ostest-etcd-5.shiftstack.com/" target="_blank">ostest-etcd-5.shiftstack.com</a>. A'</div><br class="gmail-Apple-interchange-newline"></div><div dir="ltr"><span style="font-family:monospace"><span style="color:rgb(0,0,0)">Jan 20 13:07:33 dnsmasq[711308]: query[AAAA] <a href="http://ostest-etcd-5.shiftstack.com">ostest-etcd-5.shiftstack.com</a> from 10.0.2.200
</span><br>Jan 20 13:07:33 dnsmasq[711308]: forwarded <a href="http://ostest-etcd-5.shiftstack.com">ostest-etcd-5.shiftstack.com</a> to 10.46.4.43
<br>Jan 20 13:07:33 dnsmasq[711308]: reply <a href="http://ostest-etcd-5.shiftstack.com">ostest-etcd-5.shiftstack.com</a> is <CNAME>
<br>Jan 20 13:07:33 dnsmasq[711308]: reply <a href="http://ostest-master-2.shiftstack.com">ostest-master-2.shiftstack.com</a> is NODATA-IPv6
<br>Jan 20 13:07:33 dnsmasq[711308]: query[A] <a href="http://ostest-etcd-5.shiftstack.com">ostest-etcd-5.shiftstack.com</a> from 10.0.2.200
<br>Jan 20 13:07:33 dnsmasq[711308]: cached <a href="http://ostest-etcd-5.shiftstack.com">ostest-etcd-5.shiftstack.com</a> is <CNAME>
<br>Jan 20 13:07:33 dnsmasq[711308]: /var/lib/neutron/dhcp/1555837d-1114-41af-9820-a4c420f6a1ae/addn_hosts <a href="http://ostest-master-2.shiftstack.com">ostest-master-2.shiftstack.com</a> is 10.0.1.214<br>
<br></span></div><div dir="ltr"><br></div><div dir="ltr">After I run once the dig AAAA, seems that dig A command works as expected (probably because CNAME was chached):</div><div dir="ltr"><br></div><div dir="ltr"><span style="font-family:monospace"><span style="color:rgb(0,0,0)">Jan 20 13:43:23 dnsmasq[837744]: 2655 <a href="http://10.0.2.200/59700">10.0.2.200/59700</a> query[A] <a href="http://ostest-etcd-5.shiftstack.com">ostest-etcd-5.shiftstack.com</a> from 10.0.2.200
</span><br>Jan 20 13:43:23 dnsmasq[837744]: 2655 <a href="http://10.0.2.200/59700">10.0.2.200/59700</a> cached <a href="http://ostest-etcd-5.shiftstack.com">ostest-etcd-5.shiftstack.com</a> is <CNAME>
<br>Jan 20 13:43:23 dnsmasq[837744]: 2655 <a href="http://10.0.2.200/59700">10.0.2.200/59700</a> /var/lib/neutron/dhcp/1555837d-1114-41af-9820-a4c420f6a1ae/addn_hosts <a href="http://ostest-master-2.shiftstack.com">ostest-master-2.shiftstack.com</a> is 10.0.1.214<br>
<br></span></div><div dir="ltr"><span style="font-family:monospace">Any help will be </span><font face="monospace">appreciated</font></div><div dir="ltr"><span style="font-family:monospace">Yossi</span></div><div dir="ltr"><br></div></div><br><div class="gmail_quote"><div dir="rtl">בתאריך יום א׳, 20 בינו׳ 2019 ב-13:03 מאת Yossi Boaron <<a href="mailto:yossi.boaron.1234@gmail.com">yossi.boaron.1234@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="rtl"><div><br></div><div dir="ltr">Hi All,</div><div dir="ltr">I have the following DNS topology (In my Openstack deployment):</div><div dir="ltr">VM --> DNSMASQ --> external DNS server </div><div dir="ltr">domain name= <a href="http://shiftstack.com/" target="_blank">shiftstack.com</a>, and Dnsmasq 2.76 is used at this Openstack deployment.</div><div dir="ltr"><br></div><div dir="ltr">I run the following test:</div><div dir="ltr">1. Define CNAME record at external DNS server</div><div dir="ltr"><br></div><div dir="ltr"><a href="http://ostest-etcd-5.shiftstack.com/" target="_blank">ostest-etcd-5.shiftstack.com</a>. IN CNAME ostest-master-2</div><div dir="ltr"><br></div><div dir="ltr">2. while 'ostest-master-2' is defined in --addn-hosts at Dnsmasq:</div><div dir="ltr">the relevant entry:</div><div dir="ltr">10.0.1.214 <a href="http://ostest-master-2.shiftstack.com/" target="_blank">ostest-master-2.shiftstack.com</a>. ostest-master-2</div><div dir="ltr"><br></div><div dir="ltr">3. next step, I tried to resolve '<a href="http://ostest-etcd-5.shiftstack.com/" target="_blank">ostest-etcd-5.shiftstack.com</a>.' from the VM.</div><div dir="ltr">I expected that dig <a href="http://ostest-etcd-5.shiftstack.com/" target="_blank">ostest-etcd-5.shiftstack.com</a>. should be replied with the ostest-master-2 IP (10.0.1.214).</div><div dir="ltr"><br></div><div dir="ltr">Actual behavior:</div><div dir="ltr">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.</div><div dir="ltr"><br></div><div dir="ltr">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.</div><div dir="ltr"><br></div><div dir="ltr">It seems to me like an issue of CNAME caching at Dnsmasq (2.76), </div><div dir="ltr">Is it a known issue?</div><div dir="ltr"><br></div><div dir="ltr">Thanks in advance</div><div dir="ltr">Yossi</div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr">[1] </div><div dir="ltr">$ dig +noedns <a href="http://ostest-etcd-5.shiftstack.com/" target="_blank">ostest-etcd-5.shiftstack.com</a>. A</div><div dir="ltr"><br></div><div dir="ltr">; <<>> DiG 9.9.4-RedHat-9.9.4-72.el7 <<>> +noedns <a href="http://ostest-etcd-5.shiftstack.com/" target="_blank">ostest-etcd-5.shiftstack.com</a>. A</div><div dir="ltr">;; global options: +cmd</div><div dir="ltr">;; Got answer:</div><div dir="ltr">;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13837</div><div dir="ltr">;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0</div><div dir="ltr"><br></div><div dir="ltr">;; QUESTION SECTION:</div><div dir="ltr">;<a href="http://ostest-etcd-5.shiftstack.com/" target="_blank">ostest-etcd-5.shiftstack.com</a>. IN A</div><div dir="ltr"><br></div><div dir="ltr">;; ANSWER SECTION:</div><div dir="ltr"><a href="http://ostest-etcd-5.shiftstack.com/" target="_blank">ostest-etcd-5.shiftstack.com</a>. 3600 IN CNAME <a href="http://ostest-master-2.shiftstack.com/" target="_blank">ostest-master-2.shiftstack.com</a>.</div><div dir="ltr"><br></div><div dir="ltr">;; Query time: 2 msec</div><div dir="ltr">;; SERVER: 10.0.0.2#53(10.0.0.2)</div><div dir="ltr">;; WHEN: Sun Jan 20 09:52:48 UTC 2019</div><div dir="ltr">;; MSG SIZE rcvd: 118</div><div dir="ltr"><br></div><div dir="ltr">$ </div><div dir="ltr"><br></div><div dir="ltr">[2] </div><div dir="ltr">$ dig +noedns <a href="http://ostest-etcd-5.shiftstack.com/" target="_blank">ostest-etcd-5.shiftstack.com</a>. AAAA <a href="http://ostest-etcd-5.shiftstack.com/" target="_blank">ostest-etcd-5.shiftstack.com</a>. A</div><div dir="ltr"><br></div><div dir="ltr">; <<>> DiG 9.9.4-RedHat-9.9.4-72.el7 <<>> +noedns <a href="http://ostest-etcd-5.shiftstack.com/" target="_blank">ostest-etcd-5.shiftstack.com</a>. AAAA <a href="http://ostest-etcd-5.shiftstack.com/" target="_blank">ostest-etcd-5.shiftstack.com</a>. A</div><div dir="ltr">;; global options: +cmd</div><div dir="ltr">;; Got answer:</div><div dir="ltr">;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 63573</div><div dir="ltr">;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0</div><div dir="ltr"><br></div><div dir="ltr">;; QUESTION SECTION:</div><div dir="ltr">;<a href="http://ostest-etcd-5.shiftstack.com/" target="_blank">ostest-etcd-5.shiftstack.com</a>. IN AAAA</div><div dir="ltr"><br></div><div dir="ltr">;; ANSWER SECTION:</div><div dir="ltr"><a href="http://ostest-etcd-5.shiftstack.com/" target="_blank">ostest-etcd-5.shiftstack.com</a>. 3600 IN CNAME <a href="http://ostest-master-2.shiftstack.com/" target="_blank">ostest-master-2.shiftstack.com</a>.</div><div dir="ltr"><br></div><div dir="ltr">;; Query time: 3 msec</div><div dir="ltr">;; SERVER: 10.0.0.2#53(10.0.0.2)</div><div dir="ltr">;; WHEN: Sun Jan 20 09:53:59 UTC 2019</div><div dir="ltr">;; MSG SIZE rcvd: 118</div><div dir="ltr"><br></div><div dir="ltr">;; Got answer:</div><div dir="ltr">;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15671</div><div dir="ltr">;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0</div><div dir="ltr"><br></div><div dir="ltr">;; QUESTION SECTION:</div><div dir="ltr">;<a href="http://ostest-etcd-5.shiftstack.com/" target="_blank">ostest-etcd-5.shiftstack.com</a>. IN A</div><div dir="ltr"><br></div><div dir="ltr">;; ANSWER SECTION:</div><div dir="ltr"><a href="http://ostest-etcd-5.shiftstack.com/" target="_blank">ostest-etcd-5.shiftstack.com</a>. 3600 IN CNAME <a href="http://ostest-master-2.shiftstack.com/" target="_blank">ostest-master-2.shiftstack.com</a>.</div><div dir="ltr"><a href="http://ostest-master-2.shiftstack.com/" target="_blank">ostest-master-2.shiftstack.com</a>. 0 IN A 10.0.1.214</div><div dir="ltr"><br></div><div dir="ltr">;; Query time: 0 msec</div><div dir="ltr">;; SERVER: 10.0.0.2#53(10.0.0.2)</div><div dir="ltr">;; WHEN: Sun Jan 20 09:53:59 UTC 2019</div><div dir="ltr">;; MSG SIZE rcvd: 106</div><div dir="ltr"><br></div><div dir="ltr">$ </div></div>
</blockquote></div>