Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    How can I automatically assign Kea DHCP leases to reservations?

    Scheduled Pinned Locked Moved DHCP and DNS
    2 Posts 2 Posters 293 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      gkokkinis
      last edited by

      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?

      GertjanG 1 Reply Last reply Reply Quote 1
      • GertjanG
        Gertjan @gkokkinis
        last edited by

        @gkokkinis

        You've missed the very important Netgate Blog post. Read that first.
        Netgate Adds Kea DHCP to pfSense Plus Software Version 23.0

        Now visit the pfSense GUI and read this one, as it is a follow up :

        8477993a-3a79-49c7-9485-fd2218ecdab3-image.png

        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 :

        2ef13369-2782-496d-8a19-3da879c2769a-image.png

        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.

        No "help me" PM's please. Use the forum, the community will thank you.
        Edit : and where are the logs ??

        1 Reply Last reply Reply Quote 1
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.