How can I automatically assign Kea DHCP leases to reservations?
-
Hey,
I have a fairly unique problem. I spin up quite a bit of vm's on a per subnet basis. These vm's are given an IP address that's is the DHCP pool range. As users access these vms with RDP, I need to manually reserve these IPs after they get an address. I've tried setting the lease time to unlimited but upon router reboots, the lease table is cleared and they all try to obtain another address in the pool range (subsequently getting a different IP than they were initially given). Is there a way to automatically interact with the Kea DHCP server on Pfsense (or another way) to reserve these vm's IPs the ones they were initially given when they were handed the lease? -
You've missed the very important Netgate Blog post. Read that first.
Netgate Adds Kea DHCP to pfSense Plus Software Version 23.0Now visit the pfSense GUI and read this one, as it is a follow up :
As stated : this will be the future as 24.08 isn't out yet ...
Now, look up the top 10 KEA post on the forum ... and you'll notice that KEA somewhat works, but no options, gadgets or special requests. It servers leases and doesn't take your needs into account. This will change in the future, of course.
To make a long story short : don't use KEA, use ISC.
KEA doesn't support "DHCP Static MAC leases" yet.@gkokkinis said in How can I automatically assign Kea DHCP leases to reservations?:
the lease table is cleared and they all try to obtain another address in the pool range (subsequently getting a different IP than they were initially given)
A device on a LAN will recognize a DHCP by its interface MAC addresses. If it already used that DHCP ones before, it will request for the 'prefered' IP, the IP it had before.
That's why you see :This says that my PC wants to have 192.168.1.6, if possible.
Even if the remove the lease file from the DHCP server- this file is actually the DHCP server's memory - the DHCP server will grant that request, if - only one condiotion - if that IP wasn't already assigned to some device.