KEA Not respecting reservations during lease time

Started by Taunt9930, August 15, 2024, 11:10:54 AM

Previous topic - Next topic
August 15, 2024, 11:10:54 AM Last Edit: August 15, 2024, 11:13:08 AM by Taunt9930
Hi all,

Has anyone experienced Kea not respecting reservations? I have a static reservation set (172.16.60.100) that was successfully allocated to a device and renewed for several days. I rebooted the device (update), and upon coming back up and requesting an address, Kea tagged it as a conflict address and so allocated it from the pool, rather than static address. I have checked the MAC, and that has not changed.

Kea Log below (latest at top) - how can I stop this happening? Is it just a case of the renew/request after the reboot was too soon after than latest lease allocation (1.5 minutes or so).

2024-08-15T09:30:59 Informational kea-dhcp4 INFO [kea-dhcp4.packets.0x2e709a1b4000] DHCP4_PACKET_SEND [hwtype=1 04:17:b6:d2:59:c9], cid=[ff:b6:d2:59:c9:00:03:00:01:04:17:b6:d2:59:c9], tid=0x50e1f550: trying to send packet DHCPACK (type 5) from 172.16.60.254:67 to 172.16.60.1:68 on interface vlan06

2024-08-15T09:30:59 Informational kea-dhcp4 INFO [kea-dhcp4.leases.0x2e709a1b4000] DHCP4_LEASE_ALLOC [hwtype=1 04:17:b6:d2:59:c9], cid=[ff:b6:d2:59:c9:00:03:00:01:04:17:b6:d2:59:c9], tid=0x50e1f550: lease 172.16.60.1 has been allocated for 4000 seconds

2024-08-15T09:30:59 Informational kea-dhcp4 INFO [kea-dhcp4.packets.0x2e709a1b4000] DHCP4_PACKET_RECEIVED [hwtype=1 04:17:b6:d2:59:c9], cid=[ff:b6:d2:59:c9:00:03:00:01:04:17:b6:d2:59:c9], tid=0x50e1f550: DHCPREQUEST (type 3) received from 0.0.0.0 to 255.255.255.255 on interface vlan06

2024-08-15T09:30:59 Informational kea-dhcp4 INFO [kea-dhcp4.dhcp4.0x2e709a1b4000] DHCP4_QUERY_LABEL received query: [hwtype=1 04:17:b6:d2:59:c9], cid=[ff:b6:d2:59:c9:00:03:00:01:04:17:b6:d2:59:c9], tid=0x50e1f550

2024-08-15T09:30:59 Informational kea-dhcp4 INFO [kea-dhcp4.packets.0x2e709a1b4000] DHCP4_PACKET_SEND [hwtype=1 04:17:b6:d2:59:c9], cid=[ff:b6:d2:59:c9:00:03:00:01:04:17:b6:d2:59:c9], tid=0x50e1f550: trying to send packet DHCPOFFER (type 2) from 172.16.60.254:67 to 172.16.60.1:68 on interface vlan06

2024-08-15T09:30:59 Informational kea-dhcp4 INFO [kea-dhcp4.leases.0x2e709a1b4000] DHCP4_LEASE_OFFER [hwtype=1 04:17:b6:d2:59:c9], cid=[ff:b6:d2:59:c9:00:03:00:01:04:17:b6:d2:59:c9], tid=0x50e1f550: lease 172.16.60.1 will be offered
Remote ID: (none)
Relay ID: (none)
State: default
Pool ID: 0
Subnet ID: 3
Client id: ff:b6:d2:59:c9:00:01:00:01:2d:1d:cc:fb:04:17:b6:d2:59:c9
Hardware addr: 04:17:b6:d2:59:c9
Cltt: 1723710562
Valid life: 4000

[b]2024-08-15T09:30:59 Warning kea-dhcp4 WARN [kea-dhcp4.alloc-engine.0x2e709a1b4000] ALLOC_ENGINE_V4_DISCOVER_ADDRESS_CONFLICT [hwtype=1 04:17:b6:d2:59:c9], cid=[ff:b6:d2:59:c9:00:03:00:01:04:17:b6:d2:59:c9], tid=0x50e1f550: conflicting reservation for address 172.16.60.100 with existing lease Address: 172.16.60.100

2024-08-15T09:30:59 Informational kea-dhcp4 INFO [kea-dhcp4.packets.0x2e709a1b4000] DHCP4_PACKET_RECEIVED [hwtype=1 04:17:b6:d2:59:c9], cid=[ff:b6:d2:59:c9:00:03:00:01:04:17:b6:d2:59:c9], tid=0x50e1f550: DHCPDISCOVER (type 1) received from 0.0.0.0 to 255.255.255.255 on interface vlan06

2024-08-15T09:30:59 Informational kea-dhcp4 INFO [kea-dhcp4.dhcp4.0x2e709a1b4000] DHCP4_QUERY_LABEL received query: [hwtype=1 04:17:b6:d2:59:c9], cid=[ff:b6:d2:59:c9:00:03:00:01:04:17:b6:d2:59:c9], tid=0x50e1f550

2024-08-15T09:29:22 Informational kea-dhcp4 INFO  [kea-dhcp4.packets.0x2e709a1b4000] DHCP4_PACKET_SEND [hwtype=1 04:17:b6:d2:59:c9], cid=[ff:b6:d2:59:c9:00:01:00:01:2d:1d:cc:fb:04:17:b6:d2:59:c9], tid=0x7232ff65: trying to send packet DHCPACK (type 5) from 172.16.60.254:67 to 172.16.60.100:68 on interface vlan06

2024-08-15T09:29:22 Informational kea-dhcp4 INFO  [kea-dhcp4.leases.0x2e709a1b4000] DHCP4_LEASE_ALLOC [hwtype=1 04:17:b6:d2:59:c9], cid=[ff:b6:d2:59:c9:00:01:00:01:2d:1d:cc:fb:04:17:b6:d2:59:c9], tid=0x7232ff65: lease 172.16.60.100 has been allocated for 4000 seconds[/b]

2024-08-15T09:29:22 Informational kea-dhcp4 INFO  [kea-dhcp4.packets.0x2e709a1b4000] DHCP4_PACKET_RECEIVED [hwtype=1 04:17:b6:d2:59:c9], cid=[ff:b6:d2:59:c9:00:01:00:01:2d:1d:cc:fb:04:17:b6:d2:59:c9], tid=0x7232ff65: DHCPREQUEST (type 3) received from 172.16.60.100 to 172.16.60.254 on interface vlan06

2024-08-15T09:29:22 Informational kea-dhcp4 INFO  [kea-dhcp4.dhcp4.0x2e709a1b4000] DHCP4_QUERY_LABEL received query: [hwtype=1 04:17:b6:d2:59:c9], cid=[ff:b6:d2:59:c9:00:01:00:01:2d:1d:cc:fb:04:17:b6:d2:59:c9], tid=0x7232ff65

2024-08-15T08:56:02 Informational kea-dhcp4 INFO  [kea-dhcp4.packets.0x2e709a018200] DHCP4_PACKET_SEND [hwtype=1 04:17:b6:d2:59:c9], cid=[ff:b6:d2:59:c9:00:01:00:01:2d:1d:cc:fb:04:17:b6:d2:59:c9], tid=0xc0de8be8: trying to send packet DHCPACK (type 5) from 172.16.60.254:67 to 172.16.60.100:68 on interface vlan06

2024-08-15T08:56:02 Informational kea-dhcp4 INFO  [kea-dhcp4.leases.0x2e709a018200] DHCP4_LEASE_ALLOC [hwtype=1 04:17:b6:d2:59:c9], cid=[ff:b6:d2:59:c9:00:01:00:01:2d:1d:cc:fb:04:17:b6:d2:59:c9], tid=0xc0de8be8: lease 172.16.60.100 has been allocated for 4000 seconds

2024-08-15T08:56:02 Informational kea-dhcp4 INFO  [kea-dhcp4.packets.0x2e709a018200] DHCP4_PACKET_RECEIVED [hwtype=1 04:17:b6:d2:59:c9], cid=[ff:b6:d2:59:c9:00:01:00:01:2d:1d:cc:fb:04:17:b6:d2:59:c9], tid=0xc0de8be8: DHCPREQUEST (type 3) received from 172.16.60.100 to 172.16.60.254 on interface vlan06

2024-08-15T08:56:02 Informational kea-dhcp4 INFO  [kea-dhcp4.dhcp4.0x2e709a018200] DHCP4_QUERY_LABEL received query: [hwtype=1 04:17:b6:d2:59:c9], cid=[ff:b6:d2:59:c9:00:01:00:01:2d:1d:cc:fb:04:17:b6:d2:59:c9], tid=0xc0de8be8


Thanks.


Static reservations must lie outside of the dynamic pool.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

August 15, 2024, 04:11:12 PM #2 Last Edit: August 15, 2024, 04:17:25 PM by Taunt9930
Quote from: Patrick M. Hausen on August 15, 2024, 11:19:37 AM
Static reservations must lie outside of the dynamic pool.

Agreed, and in my case they do - that is not the issue. Dynamic pool is x.1 - x.20 (hence being dynamically allocated x.1), and the static reservation is x.100

The issue is, having rebooted a device that had minutes before correctly renewed its static lease at x.100, when it came back up Kea said it was a duplicate/conflict and assigned it the first address from the dynamic pool. It wasn't a duplicate - there are two other devices on this vlan - one statically set to x.99 and one to x.101. Before the reboot, this device has just renewed correctly at x.100 - as per the logs.

Sorry, should have read and thought a bit more thoroughly. That was the quick "fits in 95% of all cases" answer.  :)
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

If I'm reading things[1] right (questionable), Kea is supposed to support both in-pool and out-of-pool reservations.

Other Google results show other people running into this issue, and it being blamed on Kea not being ready [2]. At least you're (aparently) not alone?

Keeping an eye on this, as I recently migrated to Kea, with some reservations (so to speak)


[1] https://kb.isc.org/docs/what-are-host-reservations-how-to-use-them
[2] https://www.reddit.com/r/opnsense/comments/1cl3a1q/kea_dhcp_not_abiding_by_the_static_leases_i_set/

That might explain why OPNsense doesn't generate an error message when a static reservation uses an IP address that is part of a pool. Perhaps the functionality to select how KEA should handle in-pool/out-of-pool reservations is coming to the OPNsense GUI. Though an error message would still be needed when an address is in conflict with the setting.