[Kea-users] Lease affinity of released leases

Johannes Midgren johannes at midgren.net
Wed Nov 10 22:27:21 UTC 2021


So, I looked some more into this problem and now know some more that I like
to share if anyone else looks to

It turns out that only certain hosts on my network get a new IP address on
reboot, and the common denominator of them is that they are running Ubuntu
Server 20.04 with network configured using Netplan. (I don't know if it
matters, but Netplan uses networkd as "renderer" in these cases - it can
also use NetworkManager.) Also, I can recreate the behaviour on physical
hosts and VMs but e.g. not with LXD containers.

In the cases where it works as I expect, i.e. the host does not change IP
on reboot, I can see that the host does not send a DHCP Release at
shutdown. I can also see that it then includes the DHCP Option "Requested
IP Address" (50) with the DHCP Discover (or DHCP Request in some cases) it
makes when bringing up the network again.

Bob Harold wrote in another reply that I should try to tell the client not
to release when shutting down, and that seems to do the trick. Netplan has
an option "critical" that can be added along with the dhcp4 configuration.
So a very basic Netplan configuration that works the way I intended would
look something like this:

network:
  version: 2
  ethernets:
    enp1s0:
      dhcp4: true
      critical: true

Unfortunately the installation program of Ubuntu Server does not seem to
allow adding this option when installing manually, but if using e.g.
cloud-init I think it should be possible.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20211110/2da8594a/attachment.htm>


More information about the Kea-users mailing list