KEA DHCP leases don't behave like ISC DHCP

Started by os914964619, August 18, 2025, 07:33:20 PM

Previous topic - Next topic
Quote from: hharry on August 21, 2025, 06:14:49 PM
Quote from: sopex8260 on August 21, 2025, 04:40:26 PM
Quote from: hharry on August 21, 2025, 01:57:14 PM
Quote from: sopex8260 on August 21, 2025, 01:54:22 PM
Quote from: hharry on August 21, 2025, 12:53:48 PM
Quote from: sopex8260 on August 21, 2025, 08:34:51 AM
Quote from: hharry on August 21, 2025, 01:38:32 AMso kea successfully gave 7 hours of lease affinity with below config, it behaved exactly according to kea 2.6.3 documentation

    "expired-leases-processing": {
        "reclaim-timer-wait-time": 10,
        "hold-reclaimed-time": 25200,
        "flush-reclaimed-timer-wait-time": 25
    },


Now that testing is done, I've now increased the lease affinity to 30 days (2592000 seconds ), as below....

        "expired-leases-processing": {
            "reclaim-timer-wait-time": 10,
            "hold-reclaimed-time": 2592000,
            "flush-reclaimed-timer-wait-time": 25
        },



Great to hear! I will try to add it over the next day or two. I will let you know to try it, if you feel brave :)

I already have it implemented, with 30 days of lease affinity, and have no intention of reverting back to having zero lease affinity...be nice if the OPNsense devs would expose the options to the UI so manual control of /usr/local/etc/kea/kea-dhcp4.conf is no longer needed...

wink wink -> https://github.com/opnsense/core/issues/9094

Yeah, I have seen the github issue. I am willing to fix it/ expose it to the UI for everyone.

Anyway, I will ping you when the code is ready but will probably test it myself since I don't see you being brave enough 😅

Thank your Sir, i'm always to happy to test code etc, already have a sandbox pre-production envionment allways available for use...

Would appreciate your feedback on this:

opnsense-patch -a sopex -c core c6d7453d5809d948df6f29eba32b6aee39b02227

patch worked, without any issue, and i found the UI options you added to be intuitive and effective, and built the correct / expected config in /usr/local/etc/kea/kea-dhcp4.conf

Thank you sir, very well done. Let me know if you'd like some test artifacts, screenshots etc...that may help with pull request / check in etc...



Quote from: hharry on August 21, 2025, 06:14:49 PM
Quote from: sopex8260 on August 21, 2025, 04:40:26 PM
Quote from: hharry on August 21, 2025, 01:57:14 PM
Quote from: sopex8260 on August 21, 2025, 01:54:22 PM
Quote from: hharry on August 21, 2025, 12:53:48 PM
Quote from: sopex8260 on August 21, 2025, 08:34:51 AM
Quote from: hharry on August 21, 2025, 01:38:32 AMso kea successfully gave 7 hours of lease affinity with below config, it behaved exactly according to kea 2.6.3 documentation

    "expired-leases-processing": {
        "reclaim-timer-wait-time": 10,
        "hold-reclaimed-time": 25200,
        "flush-reclaimed-timer-wait-time": 25
    },


Now that testing is done, I've now increased the lease affinity to 30 days (2592000 seconds ), as below....

        "expired-leases-processing": {
            "reclaim-timer-wait-time": 10,
            "hold-reclaimed-time": 2592000,
            "flush-reclaimed-timer-wait-time": 25
        },



Great to hear! I will try to add it over the next day or two. I will let you know to try it, if you feel brave :)

I already have it implemented, with 30 days of lease affinity, and have no intention of reverting back to having zero lease affinity...be nice if the OPNsense devs would expose the options to the UI so manual control of /usr/local/etc/kea/kea-dhcp4.conf is no longer needed...

wink wink -> https://github.com/opnsense/core/issues/9094

Yeah, I have seen the github issue. I am willing to fix it/ expose it to the UI for everyone.

Anyway, I will ping you when the code is ready but will probably test it myself since I don't see you being brave enough 😅

Thank your Sir, i'm always to happy to test code etc, already have a sandbox pre-production envionment allways available for use...

Would appreciate your feedback on this:

opnsense-patch -a sopex -c core c6d7453d5809d948df6f29eba32b6aee39b02227

patch worked, without any issue, and i found the UI options you added to be intuitive and effective, and built the correct / expected config in /usr/local/etc/kea/kea-dhcp4.conf

Thank you sir, very well done. Let me know if you'd like some test artifacts, screenshots etc...that may help with pull request / check in etc...



Thank you for your feedback, I saw that the file generated correctly but wanted a second set of eyes since I don't use Kea.

If the others agree, it will be added at 25.7.3

August 21, 2025, 07:55:22 PM #31 Last Edit: August 22, 2025, 11:19:00 AM by franco
Likely a later 25.7.x depending on merge time frame and an extra round on -devel package. Usually we bring in fixes more quickly, but this is a feature even if small could have side effects when introduced. (Generally speaking, it differs from case to case, but strangest things have happened over the years.)


Cheers,
Franco

August 21, 2025, 08:28:06 PM #32 Last Edit: August 21, 2025, 08:30:37 PM by Monviech (Cedrik)
Psssst, use dnsmasq it does this without any specific configuration.

I just turned in a client that was off 2 months and it got what it asked for in its dhcp request without reservation as IPs are not reused aggressively.
Hardware:
DEC740

Quote from: franco on August 21, 2025, 07:55:22 PMLikely a later 24.7.x depending on merge time frame and an extra round on -devel package. Usually we bring in fixes more quickly, but this is a feature even if small could have side effects when introduced. (Generally speaking, it differs from case to case, but strangest things have happened over the years.)


Cheers,
Franco

Let's not go back in time :)