<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 2, 2022 at 7:14 AM Matus UHLAR - fantomas via Dnsmasq-discuss <<a href="mailto:dnsmasq-discuss@lists.thekelleys.org.uk">dnsmasq-discuss@lists.thekelleys.org.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">>> > > On Tue, Mar 01, 2022 at 01:01:51AM -0800, Frank Liu wrote:<br>
>> > > > I am running dnsmasq for dhcp/dns of a local test domain: <a href="http://test.example.com" rel="noreferrer" target="_blank">test.example.com</a>.<br>
>> > > > Everything works fine. When a dhcp client (eg: client1) comes up, it gets<br>
>> > > > the IP from dnsmasq, and I can dig/nslookup <a href="http://client1.test.example.com" rel="noreferrer" target="_blank">client1.test.example.com</a> to get<br>
>> > > > its IP.<br>
>> > > ><br>
>> > > > When I add a cname in the same domain, eg:<br>
>> > > > cname=<a href="http://alias.test.example.com" rel="noreferrer" target="_blank">alias.test.example.com</a>,<a href="http://client1.test.example.com" rel="noreferrer" target="_blank">client1.test.example.com</a><br>
>> > > ><br>
>> > > > dig/nslookup of <a href="http://alias.test.example.com" rel="noreferrer" target="_blank">alias.test.example.com</a> only returns name<br>
>> > > > <a href="http://client1.test.example.com" rel="noreferrer" target="_blank">client1.test.example.com</a>, not the actual IP of <a href="http://client1.test.example.com" rel="noreferrer" target="_blank">client1.test.example.com</a><br>
>> > > ><br>
>> > > > It's interesting that if I add the cname for a different domain, eg:<br>
>> > > > cname=<a href="http://alias.dummy.example.com" rel="noreferrer" target="_blank">alias.dummy.example.com</a>,<a href="http://client1.test.example.com" rel="noreferrer" target="_blank">client1.test.example.com</a><br>
>> > > ><br>
>> > > > dig/nslookup of <a href="http://alias.dummy.example.com" rel="noreferrer" target="_blank">alias.dummy.example.com</a> will return both name<br>
>> > > > <a href="http://client1.test.example.com" rel="noreferrer" target="_blank">client1.test.example.com</a> and its IP.<br>
>> > > ><br>
>> > > > I tried a few different versions but that doesn't make a difference.<br>
<br>
>> > On Tue, Mar 1, 2022 at 3:37 AM Geert Stappers via Dnsmasq-discuss wrote:<br>
>> > > Please name those different versions.<br>
<br>
>> On Tue, Mar 01, 2022 at 09:21:58AM -0800, Frank Liu wrote:<br>
>> > 2.76 (Debian 9), 2.85 (Debian 11).<br>
<br>
>On Tue, Mar 1, 2022 at 2:39 PM Geert Stappers via Dnsmasq-discuss <br>
> <<a href="mailto:dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">dnsmasq-discuss@lists.thekelleys.org.uk</a>> wrote:<br>
>> Ah, I'm now beyond the ambiguty of different version of dig/nslookup.<br>
<br>
On 02.03.22 01:28, Frank Liu wrote:<br>
>I don't think it matters with test OS or test application.<br>
<br>
it may matter, <br>
<br>
>I also tried:<br>
>ping <a href="http://alias.dummy.example.com" rel="noreferrer" target="_blank">alias.dummy.example.com</a> works, but ping <a href="http://alias.test.example.com" rel="noreferrer" target="_blank">alias.test.example.com</a> gives<br>
>unknown host error.<br>
>(even though both names cname to the same <a href="http://client1.test.example.com" rel="noreferrer" target="_blank">client1.test.example.com</a> in<br>
>dnsmasq).<br>
<br>
What do there result in?<br>
<br>
dig <a href="http://alias.dummy.example.com" rel="noreferrer" target="_blank">alias.dummy.example.com</a> <a href="http://alias.test.example.com" rel="noreferrer" target="_blank">alias.test.example.com</a> <a href="http://client1.test.example.com" rel="noreferrer" target="_blank">client1.test.example.com</a><br>
dig -t any <a href="http://alias.dummy.example.com" rel="noreferrer" target="_blank">alias.dummy.example.com</a> <a href="http://alias.test.example.com" rel="noreferrer" target="_blank">alias.test.example.com</a> <a href="http://client1.test.example.com" rel="noreferrer" target="_blank">client1.test.example.com</a><br>
<br></blockquote><div><br></div><div>In below test, dnsmasq server (192.168.0.253) runs dnsmasq 2.85 (from Debian11).<br>I have below in the dnsmasq conf:<br><br>cname=<a href="http://alias.test.example.com">alias.test.example.com</a>,<a href="http://client1.test.example.com">client1.test.example.com</a><br>cname=<a href="http://alias.dummy.example.com">alias.dummy.example.com</a>,<a href="http://client1.test.example.com">client1.test.example.com</a><br><br>Test client is another Debian11 box<br><br>$ dig -v<br>DiG 9.16.22-Debian<br><br>$ dig @<a href="http://192.168.0.253">192.168.0.253</a> <a href="http://alias.dummy.example.com">alias.dummy.example.com</a> <a href="http://alias.test.example.com">alias.test.example.com</a> <a href="http://client1.test.example.com">client1.test.example.com</a><br><br>; <<>> DiG 9.16.22-Debian <<>> @<a href="http://192.168.0.253">192.168.0.253</a> <a href="http://alias.dummy.example.com">alias.dummy.example.com</a> <a href="http://alias.test.example.com">alias.test.example.com</a> <a href="http://client1.test.example.com">client1.test.example.com</a><br>; (1 server found)<br>;; global options: +cmd<br>;; Got answer:<br>;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29718<br>;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1<br><br>;; OPT PSEUDOSECTION:<br>; EDNS: version: 0, flags:; udp: 4096<br>;; QUESTION SECTION:<br>;<a href="http://alias.dummy.example.com">alias.dummy.example.com</a>. IN A<br><br>;; ANSWER SECTION:<br><a href="http://alias.dummy.example.com">alias.dummy.example.com</a>. 0 IN CNAME <a href="http://client1.test.example.com">client1.test.example.com</a>.<br><a href="http://client1.test.example.com">client1.test.example.com</a>. 0 IN A 192.168.0.70<br><br>;; Query time: 20 msec<br>;; SERVER: 192.168.0.253#53(192.168.0.253)<br>;; WHEN: Wed Mar 02 17:34:27 UTC 2022<br>;; MSG SIZE rcvd: 114<br><br>;; Got answer:<br>;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62870<br>;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1<br><br>;; OPT PSEUDOSECTION:<br>; EDNS: version: 0, flags:; udp: 4096<br>;; QUESTION SECTION:<br>;<a href="http://alias.test.example.com">alias.test.example.com</a>. IN A<br><br>;; ANSWER SECTION:<br><a href="http://alias.test.example.com">alias.test.example.com</a>. 5 IN CNAME <a href="http://client1.test.example.com">client1.test.example.com</a>.<br><br>;; Query time: 20 msec<br>;; SERVER: 192.168.0.253#53(192.168.0.253)<br>;; WHEN: Wed Mar 02 17:34:27 UTC 2022<br>;; MSG SIZE rcvd: 96<br><br>;; Got answer:<br>;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40301<br>;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1<br><br>;; OPT PSEUDOSECTION:<br>; EDNS: version: 0, flags:; udp: 4096<br>;; QUESTION SECTION:<br>;<a href="http://client1.test.example.com">client1.test.example.com</a>. IN A<br><br>;; ANSWER SECTION:<br><a href="http://client1.test.example.com">client1.test.example.com</a>. 5 IN A 192.168.0.70<br><br>;; Query time: 16 msec<br>;; SERVER: 192.168.0.253#53(192.168.0.253)<br>;; WHEN: Wed Mar 02 17:34:27 UTC 2022<br>;; MSG SIZE rcvd: 75<br><br>$ dig -t any @<a href="http://192.168.0.253">192.168.0.253</a> <a href="http://alias.dummy.example.com">alias.dummy.example.com</a> <a href="http://alias.test.example.com">alias.test.example.com</a> <a href="http://client1.test.example.com">client1.test.example.com</a><br><br>; <<>> DiG 9.16.22-Debian <<>> -t any @<a href="http://192.168.0.253">192.168.0.253</a> <a href="http://alias.dummy.example.com">alias.dummy.example.com</a> <a href="http://alias.test.example.com">alias.test.example.com</a> <a href="http://client1.test.example.com">client1.test.example.com</a><br>; (1 server found)<br>;; global options: +cmd<br>;; Got answer:<br>;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 24227<br>;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1<br><br>;; OPT PSEUDOSECTION:<br>; EDNS: version: 0, flags:; udp: 4096<br>;; QUESTION SECTION:<br>;<a href="http://alias.dummy.example.com">alias.dummy.example.com</a>. IN ANY<br><br>;; ANSWER SECTION:<br><a href="http://alias.dummy.example.com">alias.dummy.example.com</a>. 0 IN CNAME <a href="http://client1.test.example.com">client1.test.example.com</a>.<br><a href="http://client1.test.example.com">client1.test.example.com</a>. 0 IN A 192.168.0.70<br><br>;; Query time: 20 msec<br>;; SERVER: 192.168.0.253#53(192.168.0.253)<br>;; WHEN: Wed Mar 02 17:34:41 UTC 2022<br>;; MSG SIZE rcvd: 114<br><br>;; Got answer:<br>;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 12433<br>;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1<br><br>;; OPT PSEUDOSECTION:<br>; EDNS: version: 0, flags:; udp: 4096<br>;; QUESTION SECTION:<br>;<a href="http://alias.test.example.com">alias.test.example.com</a>. IN ANY<br><br>;; ANSWER SECTION:<br><a href="http://alias.test.example.com">alias.test.example.com</a>. 5 IN CNAME <a href="http://client1.test.example.com">client1.test.example.com</a>.<br><br>;; Query time: 20 msec<br>;; SERVER: 192.168.0.253#53(192.168.0.253)<br>;; WHEN: Wed Mar 02 17:34:41 UTC 2022<br>;; MSG SIZE rcvd: 96<br><br>;; Got answer:<br>;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31132<br>;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1<br><br>;; OPT PSEUDOSECTION:<br>; EDNS: version: 0, flags:; udp: 4096<br>;; QUESTION SECTION:<br>;<a href="http://client1.test.example.com">client1.test.example.com</a>. IN ANY<br><br>;; Query time: 20 msec<br>;; SERVER: 192.168.0.253#53(192.168.0.253)<br>;; WHEN: Wed Mar 02 17:34:41 UTC 2022<br>;; MSG SIZE rcvd: 59<br> </div></div></div>