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

    DHCP (IPv4) Leases list issue

    Scheduled Pinned Locked Moved 2.3-RC Snapshot Feedback and Issues - ARCHIVED
    11 Posts 4 Posters 3.2k 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
      divsys
      last edited by

      Are all the "past" leases the Static ones?
      Can't tell what time/date you took the screen shot.

      -jfp

      1 Reply Last reply Reply Quote 0
      • MikeV7896M
        MikeV7896
        last edited by

        It was taken a couple of minutes before the post was made, EST (GMT -5), with times showing in local time. The last three in my screenshot are static entries, all showing the same date/time, all with end times over 5 hours past (knowing that static entries don't really expire).

        Does 2.2.6 handle static DHCP entries the same way in this list? I thought it didn't show a date/time for them.

        The S in IOT stands for Security

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

          2.2.6 definitely shows "n/a" for Lease start and end times.
          Not sure what the intent with 2.3 is…..

          -jfp

          1 Reply Last reply Reply Quote 0
          • A
            AsgardianFW
            last edited by

            Mine also show times that are "out of date" for the static leases on occasion.  In my opinion, I'd like to see these times reflect the actual DHCP lease times (as the device getting the lease would see).  I have to troubleshoot DHCP issues from time to time and I'd like pfSense to show the lease times consistent which what the device thinks they are.  Sometimes it's nice to know when the lease was issued or when the device thinks the lease will "expire" and thus when the device might attempt to renew.  Just my 2 cents…

            1 Reply Last reply Reply Quote 0
            • C
              cmb
              last edited by

              dhcpd doesn't record leases for static mappings, as they aren't leases in the traditional sense. They'll never be handed out to anything else, and never expire. So it's not possible to display the lease time for static mappings.

              I'm guessing those who have a date listed for static mappings, those hosts obtained a normal lease before they had a static mapping configured, and it hasn't aged out of the leases file yet. That page in 2.2.x and prior just set "n/a" for static mappings. Restored that behavior.
              https://redmine.pfsense.org/issues/5942

              1 Reply Last reply Reply Quote 0
              • MikeV7896M
                MikeV7896
                last edited by

                Thanks Chris! Actually, it didn't ever seem to age out… in fact, the next day after my screenshots, the date and time had changed from the previous day, and again, all of the static leases had the same date and time.

                Glad to see the n/a functionality restored for those static leases! Not sure if that also needs to be applied to DHCPv6 leases list or not... I don't have any static DHCPv6 leases.

                The S in IOT stands for Security

                1 Reply Last reply Reply Quote 0
                • A
                  AsgardianFW
                  last edited by

                  cmb, could you comment more on these leases not being traditional leases?  It was my understanding that they really are "traditional" leases (from the point of view of the device getting the lease).  The device will have a time the lease was obtained and they seem to have an expire time consistent with the normal dynamic leases.  In other words, the device thinks it is a dynamic lease for all practical purposes.  In my mind, they are only static in that the DHCP server will always issue the assigned IP to the assigned MAC (no exceptions).  If all this is true, I personally feel like showing the leases times as the client will seem them to be beneficial.  I recently had to troubleshoot some DHCP issues that were static leases (for a non-pfSense situation) and it became critical to know the lease/expire times as the client was seeing them to understand the behavior properly.

                  1 Reply Last reply Reply Quote 0
                  • C
                    cmb
                    last edited by

                    @virgiliomi:

                    Thanks Chris! Actually, it didn't ever seem to age out… in fact, the next day after my screenshots, the date and time had changed from the previous day, and again, all of the static leases had the same date and time.

                    In that case it's probably pulling the last date from the leases file I guess, I didn't trace through the code to see what it'd end up with there otherwise.

                    @virgiliomi:

                    Not sure if that also needs to be applied to DHCPv6 leases list or not… I don't have any static DHCPv6 leases.

                    I checked that, it still had the same previous behavior so is fine.

                    @AsgardianFW:

                    cmb, could you comment more on these leases not being traditional leases?

                    Meaning dhcpd never puts them into the leases file. It only puts IPs assigned dynamically from pools into dhcpd.leases.

                    1 Reply Last reply Reply Quote 0
                    • A
                      AsgardianFW
                      last edited by

                      Thanks for the info.  Does the dhcp server record the static lease info anywhere?  I still think seeing the lease times for static leases is extremely helpful.  I don't need that info often, but when I do, it would be nice to know what it is.  Maybe, I'm just being too anal about DHCP leases.  :-\

                      1 Reply Last reply Reply Quote 0
                      • C
                        cmb
                        last edited by

                        It's not recorded anywhere outside the logs. That just records that it handed it out, no lifetime or anything. You don't get that type of info off DHCP static mappings in any widely-used DHCP server software.

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