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

    DHCP no free leases

    Scheduled Pinned Locked Moved DHCP and DNS
    26 Posts 3 Posters 8.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.
    • DerelictD Offline
      Derelict LAYER 8 Netgate
      last edited by

      That's how you have it set.  That's how it should be working.

      Note that those settings take effect when the lease is obtained so if you just changed it it will take some time to take effect.

      Status > DHCP Leases shows you the current leases.  Do they not look right?

      Chattanooga, Tennessee, USA
      A comprehensive network diagram is worth 10,000 words and 15 conference calls.
      DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
      Do Not Chat For Help! NO_WAN_EGRESS(TM)

      1 Reply Last reply Reply Quote 0
      • R Offline
        rovshango
        last edited by

        It shows 423 online&active and same time I am getting same alarm :(.

        Well when before this topic I cleaned dhcpd.leases file but it got filled with old data again.

        1 Reply Last reply Reply Quote 0
        • DerelictD Offline
          Derelict LAYER 8 Netgate
          last edited by

          What shows 423 online and active?  The DHCP leases?

          You have to account for the offline leases that haven't expired yet.  As far as I know, Status > DHCP Leases shows a lease as offline if there is no corresponding ARP entry, meaning the IP has dropped off the network.

          Obviously you need a bigger lease pool.

          Chattanooga, Tennessee, USA
          A comprehensive network diagram is worth 10,000 words and 15 conference calls.
          DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
          Do Not Chat For Help! NO_WAN_EGRESS(TM)

          1 Reply Last reply Reply Quote 0
          • R Offline
            rovshango
            last edited by

            Thanks for info.
            So I will change network range then.
            Let's see what will happen.

            1 Reply Last reply Reply Quote 0
            • R Offline
              rovshango
              last edited by

              Hi all,

              Very strange - CP shows me only 40 active users.
              But I am getting same syslog again.

              Despite there are almost 1000 free IP addresses.

              1 Reply Last reply Reply Quote 0
              • DerelictD Offline
                Derelict LAYER 8 Netgate
                last edited by

                How do you know what addresses are free?

                Chattanooga, Tennessee, USA
                A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                Do Not Chat For Help! NO_WAN_EGRESS(TM)

                1 Reply Last reply Reply Quote 0
                • R Offline
                  rovshango
                  last edited by

                  You mean, even though if CP will disconnect them, they will use IP address till lease time?

                  1 Reply Last reply Reply Quote 0
                  • DerelictD Offline
                    Derelict LAYER 8 Netgate
                    last edited by

                    Of course.  CP has nothing to do with DHCP.  They have to play together nicely and be set up in a complementary fashion but one doesn't influence the other.  Look into those dhcp status scripts I posted earlier.

                    Chattanooga, Tennessee, USA
                    A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                    DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                    Do Not Chat For Help! NO_WAN_EGRESS(TM)

                    1 Reply Last reply Reply Quote 0
                    • R Offline
                      rovshango
                      last edited by

                      Well my CP set for 59 minutes, so I should set DHCP lease time also 59 minutes.
                      Then I think lease/pool will be freed correctly.

                      Yes I saw your post, I had difficulties installed in into pfSense, as there some library dependencies. I will try again :)

                      1 Reply Last reply Reply Quote 0
                      • DerelictD Offline
                        Derelict LAYER 8 Netgate
                        last edited by

                        What CP is set for 59 minutes?  In these matters specifics count.

                        Chattanooga, Tennessee, USA
                        A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                        DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                        Do Not Chat For Help! NO_WAN_EGRESS(TM)

                        1 Reply Last reply Reply Quote 0
                        • DerelictD Offline
                          Derelict LAYER 8 Netgate
                          last edited by

                          And FWIW I didn't hassle trying to get the DHCP status running on pfSense - screw with your router as little as possible.  I got it running on my Mac and scp'd the leases file over and ran it there occasionally until I was confident I had things right.  If you don't have a Unix host to run things like this, install Linux, FreeBSD, or even pfSense on something else and install stuff on that.

                          Chattanooga, Tennessee, USA
                          A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                          DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                          Do Not Chat For Help! NO_WAN_EGRESS(TM)

                          1 Reply Last reply Reply Quote 0
                          • R Offline
                            rovshango
                            last edited by

                            Hi,

                            I changed DHCP lease time, you can see CP and DHCP configurations.
                            Seem I do not get same log, but I am getting another one now :)
                            See attachment syslog.jpg

                            CP.JPG
                            dhcp.JPG
                            syslog.JPG
                            CP.JPG_thumb
                            dhcp.JPG_thumb
                            syslog.JPG_thumb

                            1 Reply Last reply Reply Quote 0
                            • DerelictD Offline
                              Derelict LAYER 8 Netgate
                              last edited by

                              Those happen.  They appear harmless.

                              There is no use having an idle timeout of 59 with a hard timeout of 59.  Are you sure your idle timeout of 59 isn't good enough?  That means a user who is gone from your network for 59 minutes is logged out.

                              What are your goals for your captive portal?

                              Chattanooga, Tennessee, USA
                              A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                              DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                              Do Not Chat For Help! NO_WAN_EGRESS(TM)

                              1 Reply Last reply Reply Quote 0
                              • R Offline
                                rovshango
                                last edited by

                                Well I think my answer to this question will help "me" :)

                                I want user to login CP (with provided user/password), after 59 min user should disconnected. Also to release/free IP address which he took.
                                So maybe he will not re login after disconnect (59).

                                Thanks for help.

                                1 Reply Last reply Reply Quote 0
                                • DerelictD Offline
                                  Derelict LAYER 8 Netgate
                                  last edited by

                                  @rovshango:

                                  Well I think my answer to this question will help "me" :)

                                  I want user to login CP (with provided user/password), after 59 min user should disconnected.

                                  The hard timeout will do that.

                                  Also to release/free IP address which he took.

                                  Captive portal happens after a DHCP lease has happened.  Every device can get and keep a DHCP lease whether or not they even try to get on the internet or even look at the captive portal.

                                  So maybe he will not re login after disconnect (59).

                                  That is a function of whatever authentication backend you're using for captive portal.  Not DHCP.

                                  This is all assuming open, not WPA, Wi-Fi.

                                  Chattanooga, Tennessee, USA
                                  A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                                  DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                                  Do Not Chat For Help! NO_WAN_EGRESS(TM)

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