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

Rob Townley rob.townley at gmail.com
Thu Dec 24 07:15:00 GMT 2020


https://serverfault.com/questions/272299/dnsmasq-mapping-2-mac-addresses-to-the-same-ip-address

Configuring both with the same clientID.
Specifying two MAC addresses on one line.

That serverfault discussion might help but not really convinced unless your
switch knows how to handle it somehow.

How would arp responses work exactly?   Whichever node responds quickest is
what it would do.   Probably best to set MACs to be same at BIOS and OS
levels.

On Thu, Dec 24, 2020 at 12:43 AM john doe <johndoe65534 at mail.com> wrote:

> On 12/23/2020 7:08 PM, 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
> >
>
> Couple of thoughts here and this assumes that DEVICE_V1 is having the
> correct IP before fiddling with cnames:
>
> - Does it help if you remove the line from /etc/hosts file and only use
> the 'dhcp-host' statement?
>
> With 'dhcp-host' as shown above, the client presenting the hostname
> 'DEVICE_V1' should get the fixed address shown above.
>
> The cname option that you have, will let DNS resolve  'DEVICEV1' or
> 'DEVICE_V2'.
>
> So 'host DEVICE_V1' or 'host DEVICE_V2' should show for both the IP of
> DEVICE_V1.
>
>
> - When Dnsmasq starts, is DEVICE_V1 present in the lease file?
>
> Cnames are only created if the hostname is known to Dnsmasq when starting.
>
>
> --
> John Doe
>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20201224/5a6234e3/attachment-0001.html>


More information about the Dnsmasq-discuss mailing list