Kea DHCPv4 How to remove dynamic DHCP Lease

Started by Lip90, February 23, 2026, 07:04:55 PM

Previous topic - Next topic
I have the problem that when I convert a dynamic DHCP lease to a static one, both lease entries remain. The client receives the statically assigned IP but cannot connect to the network.

There must be a way to delete this dynamically assigned lease via the GUI. I am blind and cannot find anything... Can anyone help me?

Kea? It will be removed when it expires.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Yes, it's about kea (it's in the title). It can't be right to assign a static IP address and then wait until the dynamic lease expires so that the device can connect to the network. Is that really how it's supposed to work?

At the moment yes, because the standard says so. Once a lease is granted it is valid for the relevant time period. Only the client can release it. OPNsense follows the book here, I don't know from the top of my head if a change is planned.

You can find part of the discussion with links to more here:

https://github.com/opnsense/core/issues/9217


If the client is Windows you can use "ipconfig something something /release".
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Quote from: Lip90 on February 23, 2026, 10:24:01 PMYes, it's about kea (it's in the title). It can't be right to assign a static IP address and then wait until the dynamic lease expires so that the device can connect to the network. Is that really how it's supposed to work?
No, unless you have turned on some kind of "Don't allow Clients that don't have a Static DHCP Mapping configured" setting which some DHCP Servers have ??

Usually the let's say "Random DHCP Lease" from your DHCP Pool should be replaced when it expires and the Client shouldn't even notice the change to it's new Static DHCP Mapping IP Address :)
Weird guy who likes everything Linux and *BSD on PC/Laptop/Tablet/Mobile and funny little ARM based boards :)

Today at 02:55:55 PM #5 Last Edit: Today at 04:26:28 PM by Patrick M. Hausen
@nero355 yet it is a common workflow to onboard a new device with a static reservation like this:

- connect it to the network
- check DHCP for a new dynamic lease
- create a static reservation
- nuke the dynamic lease
- power cycle the device

I am willing to bet every sysadmin does this. Regardless of standards and lease expiry - just power cycle the thing, done.

Therefore it would be nice if Kea on OPNsense supported deletion of leases on the server side. As far as I read in the various discussions on Github it might be coming.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

It's operational reality vs protocol purity like always. Being an RFC warrior vs sysadmin. xD

No promises but since kea provides actual commands for this it can be looked into. Though since their control socket is weird and deprecated right now it might still take a while.

https://github.com/opnsense/core/issues/9647
Hardware:
DEC740