<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">One thing that is unclear to me is whether the randomness or the predictability of the address reallocation is more important?<div><br></div><div>The chosen solution should reflect that choice. My reading of the original posting indicated to me that the reallocation of the same address was the main thing here - I might very well be wrong in that reading.</div><div><br></div><div><br id="lineBreakAtBeginningOfMessage"><div>
<div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;">Thanks</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><br></div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;">Sten</div>
</div>

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