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

    DHCP Lease Delete Button - $30

    Scheduled Pinned Locked Moved Completed Bounties
    19 Posts 7 Posters 21.1k 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.
    • D
      djamp42
      last edited by

      @jimp:

      The choice to delete will only appear for offline leases.

      I suppose that could be changed, but that seemed the safest course of action.

      Hmm, so if an active IP was deleted, and the user still had the DHCP address, i assume the DHCP server could possibly give out the same address to someone else, creating an IP conflict.

      For troubleshooting purposes, it might be nice to be able to delete both, maybe a little note in the gui to explain deleting active leases.

      When i can get the 1.2.3 release of this, i'll send over the bounty.

      THANKS!

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        @djamp42:

        Hmm, so if an active IP was deleted, and the user still had the DHCP address, i assume the DHCP server could possibly give out the same address to someone else, creating an IP conflict.

        For troubleshooting purposes, it might be nice to be able to delete both, maybe a little note in the gui to explain deleting active leases.

        When i can get the 1.2.3 release of this, i'll send over the bounty.

        THANKS!

        Actually, the DHCP server should test (via ping I believe) if an IP is active before it hands out a lease. I haven't tested it, but I'm not sure what would happen if the host in question blocks ping.

        I think there are supposed to be safeguards in place to ensure that it doesn't hand out conflicting IPs, but I'm not sure how robust they are, hence my erring on the side of caution.

        Attached is a version of the file that allows deleting active leases, give it a go and see what happens.

        This file has not changed between 1.2.2 and 1.2.3, so the same file will work on both.

        diag_dhcp_leases.php.123.txt

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • D
          djamp42
          last edited by

          It works great here, though i notice my client will receive the same IP, no matter how many times i delete the lease and do a renew on my client.

          I was under the impression that dhcpd saves all DHCP leases given, so if a client leaves and returns a month later, he'll receive the same IP. I don't really mind that, but it would be nice if the delete button would make it, so the client receives another IP the next time he renews, (or the same ip by chance)

          1 Reply Last reply Reply Quote 0
          • ?
            Guest
            last edited by

            This would appear to be a complete bounty.  Has the bounty been paid so I can classify this as a completed bounty?

            1 Reply Last reply Reply Quote 0
            • S
              Seth
              last edited by

              Your Windows client cant speak to other OSs will try and get the last IP that it had.

              -Seth

              1 Reply Last reply Reply Quote 0
              • D
                djamp42
                last edited by

                @submicron:

                This would appear to be a complete bounty.  Has the bounty been paid so I can classify this as a completed bounty?

                We are in the process now,  should be completed by the end of the day.

                1 Reply Last reply Reply Quote 0
                • D
                  djamp42
                  last edited by

                  @Seth:

                  Your Windows client cant speak to other OSs will try and get the last IP that it had.

                  -Seth

                  Ahhh so this is a feature of windows, rather then pfSense.

                  Thanks,
                  Adam

                  1 Reply Last reply Reply Quote 0
                  • jimpJ
                    jimp Rebel Alliance Developer Netgate
                    last edited by

                    It should be complete now.

                    As Seth mentioned, a DHCP client can express a preference for an IP. It may not get it, but it can try.

                    I'm not sure, but you can try to see if forcing an "ifconfig /release *" then "ifconfig /renew *" from the command prompt will make it pull a new IP after deleting the lease.

                    Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                    Need help fast? Netgate Global Support!

                    Do not Chat/PM for help!

                    1 Reply Last reply Reply Quote 0
                    • D
                      djamp42
                      last edited by

                      This is completed, please close thread

                      1 Reply Last reply Reply Quote 0
                      • S
                        sullrich
                        last edited by

                        This bounty has been completed and paid.  Thank you!

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