[Dnsmasq-discuss] Does dnsmasq support cname within same domain?

Matus UHLAR - fantomas uhlar at fantomas.sk
Fri Mar 4 18:56:23 UTC 2022


>On Thu, Mar 3, 2022 at 3:52 AM Matus UHLAR - fantomas via Dnsmasq-discuss <
>dnsmasq-discuss at lists.thekelleys.org.uk> wrote:
>> this is strange, my dnsmasq.conf (2.85, debian 11) states:
>>
>> # Provide an alias for a "local" DNS name. Note that this _only_ works
>> # for targets which are names from DHCP or /etc/hosts. Give host
>> # "bert" another name, bertrand
>> #cname=bertand,bert

On 03.03.22 10:38, Frank Liu wrote:
>Your config will work, because it is NOT from the same domain. The short
>name "bertand" in your config is considered a top domain by itself, so you
>can dig bertand. (ending dot), but you can't dig bertand.your.dhcp.domain.
>
>You will see the issue if you add the same domain in the cname config, eg:
>cname=bertand.your.dhcp.domain,bert

1. it's the default config from debian - I have not changed it.
    (and it's commented out)

2. it was already explained that the problem lies elsewhere, my e-mail was 
even reply to that explanation. 

It looks like the CNAME doesn't work for dhcp-assigned names although it 
should according to the config snippet above.

however, one should first verify this.


I avoid problems of this type by defining:
- hostnames and IP addresses in /etc/hosts
- hostnames and MAC addresses in /etc/ethers

so the hostnames exist all the time.
-- 
Matus UHLAR - fantomas, uhlar at fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
(R)etry, (A)bort, (C)ancer



More information about the Dnsmasq-discuss mailing list