KEA DHCP Reservation bypassed
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
- [x] I have read the contributing guide lines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md
- [x] I am convinced that my issue is new after having checked both open and closed issues at https://github.com/opnsense/core/issues?q=is%3Aissue
Describe the bug
I ' running opnsense 24.1.6 and have reservations on Kea DHCP. i have a synology nas which interface is configured to dhcp mode, and a reservation on Kea with the mac address. After reboots, the NAS still get the old IP it was getting before i setup the reservation and never get the reserved ip!
To Reproduce
Steps to reproduce the behavior:
- configure a device on your lan to use dhcp, and get an ip
- Configure a reservation in Kea using an ip different from the one received in previous step
- Restart your device so that he request ip to dhcp server
- check your IP, and it is still the old IP
Expected behavior
When restarted my lan device after created the dhcp reservation, the device should received the ip set in reservation
Describe alternatives you considered
- Deleted and recreated the reservations
- restarted Kea DHCP
Screenshots
none
Relevant log files
In Kea logs, i can see that the device request his old adress(normal dhcp behaviour), and the dhcp server leased it despite the reservation
2024-05-02T19:59:49 Informational kea-dhcp4 INFO [kea-dhcp4.leases.0x8323d0400] DHCP4_LEASE_ALLOC [hwtype=1 xx:xx:xx:xx:xx:xx], cid=[01:xx:xx:xx:xx:xx:xx], tid=0x2fd91b67: lease 192.168.xx.100 has been allocated for 4000 seconds
2024-05-02T19:59:49 Informational kea-dhcp4 INFO [kea-dhcp4.leases.0x8323d0400] DHCP4_INIT_REBOOT [hwtype=1 xx:xx:xx:xx:xx:xx], cid=[01:xx:xx:xx:xx:xx:xx], tid=0x2fd91b67: client is in INIT-REBOOT state and requests address 192.168.xx.100
Additional context
i was using ISC DHCP before, and it was working as expected
Environment OPNsense 24.1.6 (amd64). AMD GX-424CC SOC with Radeon(TM) R5E Graphics (4 cores, 4 threads)
I think after adding a reservation Kea DHCP service needs a restart and then a reservation works fine in our tests. This is not clear in the UI though so maybe a possible improvement would be to restart Kea service when "Apply" button is pressed?
maybe worth noting that KEA largely ignores MAC address and bypasses reservations if it already has a pool-IP cached to requestor's machine-id . I dont know enough about DHCP inner-workings to understand why sorry. (perhaps as part of the general networking stack rather than KEA itself)
On Debian machines dbus-uuidgen etc (ie resetting machine-id) can help alleviate the KEA DHCP cache pains, but I dont know how to ease issue that with SynologyOS, sorry
(hopefully just resetting the Kea Service is enough to fix for Syno's)