[Kea-users] dnsmasq-style address allocation
Darren Ankney
darren.ankney at gmail.com
Sat Aug 10 15:26:32 UTC 2024
Hi WIllhelm,
You might try combining the random allocater with "lease affinity"
with a long "hold-reclaimed-time". This should offer similar
functionality:
random: https://kea.readthedocs.io/en/kea-2.6.1/arm/dhcp4-srv.html#random-allocator
lease affinity:
https://kea.readthedocs.io/en/kea-2.6.1/arm/lease-expiration.html#configuring-lease-affinity
Thank you,
Darren Ankney
On Fri, Aug 9, 2024 at 4:32 AM Wilhelm Schuster <lists+kea at rot13.io> wrote:
>
> Hi list,
>
> I'm evaluating switching from OpenWRT to VyOS on my main home network
> router setup. VyOS integrates kea as DHCPv4 server whereas OpenWRT
> relies on dnsmasq.
>
> dnsmasq implements an interesting address allocation strategy which I
> like quite a bit. Here is how its manpage describes it [1]:
>
> Dnsmasq is designed to choose IP addresses for DHCP clients using a
> hash of the client's MAC address. This normally allows a client's
> address to remain stable long-term, even if the client sometimes
> allows its DHCP lease to expire. In this default mode IP addresses
> are distributed pseudo-randomly over the entire available address
> range.
>
> Here is a link to the source code: [2]
>
> I'm a fan of that strategy as it keeps host addresses somewhat stable
> even after leases have expired. I've scoured the kea manual, but was
> unable to find a suitable strategy: the random allocator does not appear
> to use the client MAC address (from a brief look at the kea source). If
> there is no built-in way to mimic the allocation strategy, is there the
> possibility to implement a custom allocator as a plugin or hook, or does
> that require forking the codebase?
>
> [1]: https://man.archlinux.org/man/dnsmasq.8#dhcp-sequential-ip
> [2]:
> https://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=blob;f=src/dhcp.c;h=b65facd8707b03919d6f78afd2ea8dd25078e5e9;hb=HEAD#l790
>
> Cheers, Wilhelm.
> --
> ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.
>
> To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.
>
> Kea-users mailing list
> Kea-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/kea-users
More information about the Kea-users
mailing list