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

    Accidentally Cleared All DHCP Leases

    Scheduled Pinned Locked Moved General pfSense Questions
    5 Posts 3 Posters 1.0k 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.
    • E
      EChumBucket
      last edited by

      I accidentally cleared all of my DHCP Leases in an effort to force a DHCP client reset. Is there any way to get those leases back? I only had 2 leases, one for my switch and one for my desktop. If they aren’t necessary then it’s fine but I just wanted to make sure.

      johnpozJ 1 Reply Last reply Reply Quote 0
      • johnpozJ
        johnpoz LAYER 8 Global Moderator @EChumBucket
        last edited by

        @echumbucket they should just normally request the IP they had before when they renew. Which unless some other client takes them before those renew they should just get their old IP on renewal.

        If you want to "make sure" devices always have the same IP, setup reservations for them in the dhcp server.

        https://docs.netgate.com/pfsense/en/latest/services/dhcp/ipv4.html#static-mappings

        An intelligent man is sometimes forced to be drunk to spend time with his fools
        If you get confused: Listen to the Music Play
        Please don't Chat/PM me for help, unless mod related
        SG-4860 24.11 | Lab VMs 2.8, 24.11

        1 Reply Last reply Reply Quote 0
        • E
          EChumBucket
          last edited by

          @johnpoz okay perfect thank you! How often are they scheduled to renew by default?

          johnpozJ 1 Reply Last reply Reply Quote 0
          • johnpozJ
            johnpoz LAYER 8 Global Moderator @EChumBucket
            last edited by johnpoz

            @echumbucket clients will renew at the 50% mark of the lease - what do you have the dhcp lease set too, off the top I don't recall the default.

            If the lease was 2 hours, then at 1 hour they would attempt to renew, if they can not at that time they continue to ask at intervals until they do. If it fails to renew, when it expires at the 2 hour mark they would send out a discover for any IP.

            If lease 4 hours then at 2 hour mark

            if 24 hours, then 12 hours etc. etc..

            Once they renew, then the timer resets to the length of the lease again.

            Depending on how many clients you have, how often you would like them to renew, or when you want old leases to expire etc. etc. Would determine how long you would want to set your leases for. I have mine set to 4 days.. But that is just me, and how often I want to see clients renew, etc. etc.. That is by no means a recommendation for what you should set.. 2 hours is common, and might be the default?

            Pretty much every device on my network has a reservation anyway - so they don't really need to renew etc.. which is part of the reason I have mine set so long..

            There are many variables that can come into play when determine the best default lease time for your network. Default is prob fine for almost everyone.. Part of the reason I have mine set that long is just to keep the log with less entries - all renews are logged, etc. ;)

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 24.11 | Lab VMs 2.8, 24.11

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

              @johnpoz Default lease is 7200s/2 hrs.

              Also, "Ping check" is enabled by default to try to see if an address is in use before assigning a conflict.

              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.