[Dnsmasq-discuss] Using cname to alias dhcp-host IDs
Arthur Wiebe
arthur at artooro.com
Wed Dec 23 22:35:07 GMT 2020
Geert, I'm fully aware that a CNAME is DNS, and dhcp-host is not, but DNS
and DHCP do work together in dnsmasq in various ways.
This is why I quoted the statement from
http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html in the dhcp-host
option which specifically says to look at the documentation for --cname if
you want to have an alias for a host.
I'm pretty sure I'm misunderstanding some part of the documentation.
Perhaps it's trying to say if you are using dhcp-host to create DNS records
for a host, you can use CNAME to alias another name to it via DNS, which
seems too obvious to bother mentioning, but maybe that's all it's saying.
When I read that statement I understood that if you created a CNAME that
the DHCP server would use it to alias the name as well, but maybe that's
not the case.
On Dec 23, 2020 at 16:13:45, Geert Stappers <stappers at stappers.nl> wrote:
> 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
>
> _______________________________________________
> 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/20201223/c0799d62/attachment.html>
More information about the Dnsmasq-discuss
mailing list