[Dnsmasq-discuss] [PATCH] DHCPv6 - List or Range reservation for single host
hjensas at redhat.com
Tue Feb 4 14:24:31 GMT 2020
On Tue, 2020-02-04 at 00:06 +0000, Simon Kelley wrote:
> I went though this carefully, and decided that replacing the address
> the dhcp-host with the next free one, but otherwise treating things
> same might not work well. For instance, there are places where the
> question is asked "is this address reserved in any dhcp-host?" and
> clearly that needs to be modified to answer "yes" to any of the
> addresses when there is more than one.
I thought this was only the case for IPv4? I.e I did'nt see that check
for IPv6 and tought it deliberately allowed having the same IP address
in different host-entries? (Fir laptop with wired/wireless interface
get's the same ip and such use cases?) Since it's checking for an
existing lease, it does'nt lease the same address to both hosts
I can with this patch put the following configuration, and dnsmasq
starts and serves addresses to the two different hosts from the same
With the git master; as well as older version 2.76 (the one in CentOS);
I also tested this configuration where two hosts share the same IP:
The configuration loads without error, and the first host to capture
the reservation gets the lease. The second one get "no addresses
Because of the above existing behaviour, I came to the conclusion that
implementing any check to verify each address in the arbitrary address
list wasn't necessary. I may have missed something?
> I ended with a different implementation of the same thing, with the
> exception that I only supported a prefix range of addresses, and not
> arbitrary list. That makes the internal representation much simpler.
> A quick test passes fine, but Harald you clearly have a better test
> harness. Please could you put this through its paces, and see if it
> what you need.
I ran some tests with your patch, and I did not run into any issues
with the prefix support.
Unfortunately, for my use-case in openstack the arbitrary list is the
useful option between the two. There is currently no way in openstack
networking api to ask the ip-address management to allocate a set of
consecutive addresses. Adding support for the prefix approach is a
major change to api, object model's, database schema etc.
Any chance we can add the arbitrary list back in? Or revert to my
initial approach allowing multiple host-entries with different
addresses? With the tag filtering support added for dhcp-hosts the
issue of ordering of entries in configuration file is somewhat relaxed,
as in; it's possible to control via tag's and filters.
More information about the Dnsmasq-discuss