[Dnsmasq-discuss] Using cname to alias dhcp-host IDs

Geert Stappers stappers at stappers.nl
Wed Dec 23 21:13:45 GMT 2020


On Wed, Dec 23, 2020 at 12:08:32PM -0600, Arthur Wiebe wrote:
> >From reading the man page, and my understanding of the statement "Only one
> hostname can be given in a --dhcp-host option, but aliases are possible by
> using CNAMEs. (See --cname )" I've been attempting to implement this
> without any success so far.
> 
> My goal is to have two names get assigned the same IP via DHCP. The purpose
> of this is transitioning IPSec IDs as I have strongswan using dnsmasq to
> assign static IPs to mobile clients.
> 
> In this example I would like both DEVICE_V1 and DEVICE_V2 to get the same
> IP address 10.1.2.3 and my current attempted configuration is as follows.
> 
> /etc/hosts contains:
> 
> 10.1.2.3 DEVICE_V1
> 
> --
> 
> dnsmasq conf file contains:
> 
> cname=DEVICE_V2,DEVICE_V1
> dhcp-host=DEVICE_V1,10.1.2.3,infinite
> 
> --
> 
> I've tried variations including defining both IDs in the hosts file as
> follows and adding "host-record" conf options for DEVICE_V1 but neither
> made a difference.
> 10.1.2.3 DEVICE_V1 DEVICE_V2
> 
> So far no matter what I've tried only the ID specified in the dhcp-host
> option actually gets an IP.
> In the dnsmasq log I get the following message for DEVICE_V2.
> client provides name: DEVICE_V2
> DHCPDISCOVER(eth0) 00:11:22:33:44:55 no address available
> 
> I'd love either some clarification on how this is supposed to work

[0]

`cname`  is DNS,   `dhcp-host` is not DNS.


> or perhaps this is a bug in dnsmasq 2.80?

http://www.catb.org/esr/faqs/smart-questions.html#idm368


Regards
Geert Stappers

[0] Not my smartest move for choosing to write an email when having no
    time to write an email ...
-- 
Silence is hard to parse



More information about the Dnsmasq-discuss mailing list