Bug #15956
closedKea DHCP static mappings requires lease expiry before taking effect
0%
Description
See original issue here: https://www.reddit.com/r/PFSENSE/comments/1hqaf28/bug_report_kea_dhcp_static_mappings_ignored/
After having a device come online and setting up a static mapping, the Kea DHCP server (pfsense CE 2.7.2-RELEASE) keeps assigning different IPs than the one I put in the static mapping. User must wait for the lease to expire before the static mapping takes affect. The hack-the-GUI-to-delete-lease step below has a smell.
Repro Steps:
- Have pfsense be the DHCP server on a network with the Kea backend
- Plug in device into network
- See DHCP Leases page and note the MAC of your new device
- Create a new static mapping, enter the MAC previously noted and IPv4 address desired (follow the GUI to tweak your DHCP pools appropriately -- the desired IP* should be outside of DHCP pools as the GUI requires)
- Delete lease previously granted (this step is weird, since the GUI didn't let me delete it directly - I hacked the GUI to delete the old one)
- Reboot router and reboot device
Expected behavior: Device should have the desired IP set in step 4
Actual behavior: Device has some other IP in the pool
Updated by Kevin Thorne 3 months ago
Log snippet
INFO [kea-dhcp4.leases.0x258e04c17b00] DHCP4_INIT_REBOOT [hwtype=1 MYDEVICEMAC], cid=[no info], tid=0x13de032f: client is in INIT-REBOOT state and requests address SOME-OTHER-IP # ... WARN [kea-dhcp4.alloc-engine.0x258e04c17b00] ALLOC_ENGINE_V4_DISCOVER_ADDRESS_CONFLICT [hwtype=1 MYDEVICEMAC], cid=[no info], tid=0xfb49dbf6: conflicting reservation for address DESIRED-IP with existing lease Address: DESIRED-IP Valid life: 7200 Cltt: 1735627163 Hardware addr: MYDEVICEMAC Client id: (none) Subnet ID: 1 Pool ID: 0 State: default Relay ID: (none) Remote ID: (none)
The INFO line is interesting -- makes it sound like my device is asking for a different address.
Updated by Jim Pingle 3 months ago
- Status changed from New to Rejected
I can't reproduce this here. I tested this extensively before the last release. As soon as I enter a static mapping and either reboot or trigger a release/renew on the client, it picks up the new address.
You might have something else going on here, like the client itself is not behaving as expected, but either way it should be discussed on the forum until/unless a reproducible bug can be identified.
Updated by James Starowitz 2 months ago
i just ran into the same problem, under different circumstances, i change mac addresses on a static assignment using kea(that had been working), hard restarted kea, deleted readded assignment, raspi would always boot with random dhcp from the pool.
went into pfsense setting change from kea to isc, hit save rebooted the raspi device and it respected the static assignment.
switched back to kea, reboot raspi, ignored static assignment again got the same ip from the pool.
id imagine it would work when the lease on the pool expires, wish there was a button to expire a lease or something? who knows!
Updated by Cornel van Mastrigt about 2 months ago
Ran into the same issue. I have no way to reproduce it. I changed the assigned static ip to another ip address, unplugged the device and it was working again. Definitely something going on here.
WARN [kea-dhcp4.alloc-engine.0x2018de00] ALLOC_ENGINE_V4_DISCOVER_ADDRESS_CONFLICT [hwtype=1 00:27:02:19:ea:c2], cid=[no info], tid=0x40823e00: conflicting reservation for address 192.168.10.30 with existing lease Address: 192.168.10.30 Valid life: 86400 Cltt: [1737518591](tel:1737518591) Hardware addr: Client id: (none) Subnet ID: 3 Pool ID: 0 State: declined Relay ID: (none) Remote ID: (none) User context: { "Netgate": { "option-data": { "domain-name": "solar" } } } |