Override DHCP Valid Lifetime

Started by Diggy, March 25, 2026, 07:50:23 PM

Previous topic - Next topic
We're using Kea DHCP server.  The Valid Lifetime set on the Settings tab is sufficient for most of our subnets.  However, there are a couple subnets that require a shorter lease time.

Which Option code, if any, overrides the value set on the Settings tab?  There isn't a code that says "valid lifetime".  The closest I found is "renewal time [58]", but because this is a production router, I cannot do trial and error.  Is "renewal time [58]" the correct code to overrride default valid lifetime?

UPDATE:
The code I mentioned above is for IPv4.  I also need the correct code for IPv6.  Please and thanks.

Intel Xeon E5-2620 v4 CPU, 8 cores, 32 GB RAM, 4x Intel XL710 SFP+, 8x Broadcom NetXtreme BCM5719 UTP

Today at 07:30:55 AM #1 Last Edit: Today at 08:17:45 AM by hharry
Quote from: Diggy on March 25, 2026, 07:50:23 PMWe're using Kea DHCP server.  The Valid Lifetime set on the Settings tab is sufficient for most of our subnets.  However, there are a couple subnets that require a shorter lease time.

Which Option code, if any, overrides the value set on the Settings tab?  There isn't a code that says "valid lifetime".  The closest I found is "renewal time [58]", but because this is a production router, I cannot do trial and error.  Is "renewal time [58]" the correct code to overrride default valid lifetime?

UPDATE:
The code I mentioned above is for IPv4.  I also need the correct code for IPv6.  Please and thanks.



kea claims to support per subnet valid-lifetime config option https://kea.readthedocs.io/en/kea-3.0.2/arm/dhcp4-srv.html#shared-networks-in-dhcpv4, however isn't exposed in OPNsense UI, perhaps consider raising a new feature request ?

It's been requested before here -> https://github.com/opnsense/core/issues/7592
OPNsense 25.7.11_9-amd64 running on ESXi 6.7 U2 VM, 4Gbytes RAM, 2 x vCPU
frr OSPF + eBGP, IDS, AdGuard Home, mDNS proxy, sftp-backup plugins. limited kea DHCP server deployment.

Quote from: hharry on Today at 07:30:55 AMIt's been requested before here -> https://github.com/opnsense/core/issues/7592
Unfortunately that issue is "Closed as not planned".  Since I don't have a github login, I am officially making my request here for that feature.  LOL
Intel Xeon E5-2620 v4 CPU, 8 cores, 32 GB RAM, 4x Intel XL710 SFP+, 8x Broadcom NetXtreme BCM5719 UTP

Quote from: Diggy on Today at 04:09:36 PMSince I don't have a github login
Then create one! LOL! :P
Weird guy who likes everything Linux and *BSD on PC/Laptop/Tablet/Mobile and funny little ARM based boards :)

Make all of them short.
Or use affinity, a very useful subset of instructions.
Or use the manual configuration to do exactly what you want.