OPNsense Forum

English Forums => 26.7 Series => Topic started by: epyon9283 on October 08, 2026, 08:13:44 PM

Title: Kea dhcpv6 leases disappearing before expiration
Post by: epyon9283 on October 08, 2026, 08:13:44 PM
I was looking at my DHCPv6 leases today for some reason and noticed there were way fewer than there should have been in the list. My lease lifetime is set for 86400. My laptop (as an example) grabbed a lease this morning at 10:50:41am. It's now a bit after 2pm and the lease is gone from the list on Kea. My laptop still thinks the lease is valid until tomorrow morning.

I double checked the memfiles in /var/db/kea/ and they're gone from there as well.

I'm running 26.7.6.
Title: Re: Kea dhcpv6 leases disappearing before expiration
Post by: epyon9283 on October 09, 2026, 07:46:01 PM
It appears that my backup WAN interface has been flapping and each time it happens it detects an IPv6 address change and wipes the leases. Fun times.
Title: Re: Kea dhcpv6 leases disappearing before expiration
Post by: Monviech (Cedrik) on October 09, 2026, 08:44:34 PM
Do you use a subnet with dynamic prefix enabled?

It whipes all leases when a new wan event happens cause there could be a new prefix:

https://github.com/opnsense/core/blob/7bbd7a3c4a3d8a91a0c18b2ea203e00c9bc891c5/src/etc/inc/plugins.inc.d/kea.inc#L203

https://github.com/opnsense/core/blob/7bbd7a3c4a3d8a91a0c18b2ea203e00c9bc891c5/src/opnsense/scripts/kea/kea_prefix_renew.py#L46

If there is some issue here please open one in the core repository.