[Dnsmasq-discuss] dhcp-range for DNS entries: how to gain A and AAAA for same host?
Geert Stappers
stappers at stappers.nl
Sun Mar 14 09:50:43 UTC 2021
On Sun, Mar 14, 2021 at 01:39:18AM +0100, Steffen Nurpmeso via Dnsmasq-discuss wrote:
> Hello.
>
> For being more automatic and flexible with (many) VMs i changed
> from a static addn-hosts= to a dhcp-hostsfile= approach, which
> luckily can still serve as the sole DNS source for already
> assigned IPs for all already existing VMs (slowly to be migrated
> to DHCP-based addresses, if at all), which is great!
> (Of course, this time only when the VM is running, but this does
> not really matter here.)
>
> However, i stumbled over a problem on Linux. If i scp a file with
> the name of the VM it tooks a long time, and this is because ssh
> uses getaddrinfo, and the GNU C library resolver sends out queries
> for A and AAAA at the same time. The A is delivered quickly by
> dnsmasq, but the AAAA one is forwarded (thus subject to fail, on
> dotless names).
That reminds on new dnsmasq feature of replying with NODATA
Visit https://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2021q1/014779.html
to read more about it.
> So i wondered how to add IPv6 support for this config in order to
> let dnsmasq simply serve the AAAA in addition, anyway a goal, to
> finally relearn, and this time for good, about IPv6. (I even
> "own" an unbelievable amount of them for a time. Could be used
> for something. Anyhow.)
> And this turned out to be impossible. First i simply changed
> a line in the hosts.dnsmasq (this last of some trials)
>
> 54:72:01:01:00:15,alp-2021,10.0.1.21,[::5472:101:15]
>
> but that turned out not to serve, so, understandable that,
> i tried to add the IPv6 range to the dhcp-range= line of
> dnsmasq.conf, which was
>
> dhcp-range=10.0.0.1,10.3.255.253,255.252.0.0,24h
>
> until then. This seems not to work, so i added another
>
> #dhcp-range=3fb:1::5472:101:1,3fb:1::5472:104:FFFF,24h
> and
> #dhcp-range=::1,constructor:vm,24h
>
> at least the latter worked, but now we _only_ had IPv6 in the VM,
> and the IPv4 address was not assigned.
Not knowning how much iterations it went through,
but I hope that
dhcp-range=10.0.0.1,10.3.255.253,255.252.0.0,24h
dhcp-range=3fb:1::5472:101:1,3fb:1::5472:104:FFFF,24h
and
dhcp-range=10.0.0.1,10.3.255.253,255.252.0.0,24h
dhcp-range=::1,constructor:vm,24h
where tried. Yes, two dhcp-range lines in the same file.
One for IPv4 the other for IPv6.
> In theory this would not be such an issue, but of course the
> origin of why i tried to change it was the DNS forwarding of the
> C library resolver, and now i wonder what to do.
>
> Is this a misconfiguration, or is there another way to support
> IPv4 + IPv6 DHCP, but especially DNS service for both address
> types for the same machine?
a misconfiguration could be at client side.
DHCP client not telling it's hostname to the DHCP server
during the request.
> Thanks.
Please report back
> A nice Sunday i wish, ciao,
:-)
Groeten
Geert Stappers
P.S.
Original poster might
deem https://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2021q1/014810.html
usefull.
--
Silence is hard to parse
More information about the Dnsmasq-discuss
mailing list