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

    DHCP - Long Lease Allocations

    Scheduled Pinned Locked Moved DHCP and DNS
    6 Posts 2 Posters 731 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.
    • penguinpagesP
      penguinpages
      last edited by

      DHCP - Long Lease Allocations

      I know this is a topic the forums and team has bantered about before, but I think there needs to be a work around.

      If I build out a resource which requires DHCP long lived leases. Ex: Deploying K8 cluster or nodes, the ignition via various tools like MAAS or k8 vendor installer, leans into site is "cloud like and has DHCP" for VM template build / deployment. But this then creates a post deployment step to convert lease into long lived leases. In other DHCP servers, you just select lease and convert within the scope to be "static" but PFsense this is blocked.

      The VMs, as they tear down (upgrades as example) will at times, require changes in these reservations. So there is no perfect answer, just to make a workflow that is flexible.

      Options:

      1. Allow reservation to be set within scope range
      2. Setup reservation so that you can set a lease to some crazy long time for that selected set of reservations

      And then the follow-up would be if this can be done via Ansible or TF, such that it can be a post deployment automation: If hostname = <variable set> then reach into PFSense and using one of above options, set it aside, and clean out old ones no longer needed.

      Thanks,

      S 1 Reply Last reply Reply Quote 0
      • S
        SteveITS Galactic Empire @penguinpages
        last edited by

        @penguinpages It's related to how the DHCP server used handles this. It is not a reservation so other devices might get that IP.

        https://docs.netgate.com/pfsense/en/latest/services/dhcp/mappings-in-pools.html

        A workaround is to split it into two pools: .100 to .119 and .121 to .150.

        They're looking at other DHCP servers...see the last few posts in https://redmine.pfsense.org/issues/5413

        Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
        When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
        Upvote ๐Ÿ‘ helpful posts!

        1 Reply Last reply Reply Quote 0
        • penguinpagesP
          penguinpages
          last edited by

          I am following, I understand the reason and logic.. but does not solve the problem.

          So my other work around is to spin out another VLAN upon which that subnet has its own working / more configurable IPAM.

          That is fine. BUT...

          DHCP Server is currently enabled. Cannot enable the DHCP Relay service while the DHCP Server is enabled on any interface.
          
          

          So.. I have setup NetBlox VM and it has subnet configured, but for the three networks for K8, I need to have routers (PFSense router in this case) relay DHCP for those three networks, to IP of the host.

          Is there a reason that DHCP service, is mutually exclusive, of relay on different logical LANs.

          S 1 Reply Last reply Reply Quote 0
          • S
            SteveITS Galactic Empire @penguinpages
            last edited by

            @penguinpages I have not used DHCP Relay. However if you are setting up different VLAN interfaces you should be able to set up a DHCP Server instance on each, with their own settings...?

            Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
            When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
            Upvote ๐Ÿ‘ helpful posts!

            penguinpagesP 1 Reply Last reply Reply Quote 0
            • penguinpagesP
              penguinpages @SteveITS
              last edited by

              @steveits

              Thanks for the reply. I have DHCP scopes set and active on three VLANs, but this fourth one I have to use other DHCP /DNS because I have to: Use API / IaC call to convert IP to static lease, and or remove post upgrade. But what would have helped would have been to have host in my normal server VLAN .. not having to have extra NIC set to that network to function.

              Meh.. Got it to work. Seems like pfsense upgrade from ISC to something a bit more modern like Kea would be in the works :)

              S 1 Reply Last reply Reply Quote 0
              • S
                SteveITS Galactic Empire @penguinpages
                last edited by

                @penguinpages said in DHCP - Long Lease Allocations:

                Kea

                https://redmine.pfsense.org/issues/5413#note-49

                Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
                When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
                Upvote ๐Ÿ‘ helpful posts!

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