I have 2 lines with total 4mb ( 2mb for each) merged in one server , and I got this error message every 24 hours in the log:
dhcp1: failed to give out ip address pool <dhcp_pool1> is empty
The only solution I have now is to delete all (IP>hotspot>active) and also delete all (IP>DHCP Server>Leases) ,restart, and everything return fine.
But I need radical solution instead of turning off the server every 24 hours.
I tried some suggested solutions here in this forum for my problem but it didn’t help.
What is setting of lease-time on DHCP server? Default value is 10 minutes which might be the right value for busy hotspot with many clients connecting just for short period of time. Shorter time means more lease renewals for active clients but also means shorter time when non-active client occupies address.
I’m not sure if list IP>hotspot>active has anything to do with DHCP address pool depletion though.
You will need to decrease your leasetime and/or increase the size of your pool.
Of course the pool cannot be extended beyond the size of the subnet, so when your subnet is 192.168.88.0/24 you should change that to 192.168.88.0/21 and then you can extend the pool to 192.168.95.254.
(you will need to change the /24 to /21 in several places, at least in the IP address of the LAN, the DHCP server and network, and then in the pool. but maybe in other places as well when you have done other configuration like firewall)
As you’re getting pool empty after roughly 24 hours, I’d decrease lease time to something like 3 hours.
In my setups, I keep lease time around 1 hour or below on subnets where I expect most of devices “to come and go”. On subnets with more persistent devices (e.g. where most devices are wired), I set lease time to 1 day. I’ve never set it to longer time. IMHO it’s not necessary.
You only need to increase pool size if you regularly see high number of simultanously active devices (e.g. higher than one third of pool size … rule-of-tumb ratio highly depends on lease length as well).
Thanks a lot, the problem has been solved successfully. I set the Lease time to 23:59:59 and restarted the server and it’s working fine till now - more then 3 days without display the red log.
You should open the “Leases” tab of the IP->DHCP Server menu and check (without enabled filters) the number in the info line at the bottom: 99 items
(for example)
Check the number of items a couple of times during the day (preferably at peak hours) to see if it is getting near the number of items in your pool.
(subtract the first-address from the last-address in your pool to find the number)
When it is getting close you still need to further decrease your leasetime and/or increase the size of the pool (see above for info).
@CPU4U: you can see shorter DHCP lease kicking in in your screenshot. There’s a log entry “hotspot info debug” saying an user logged out due to lost DHCP lease. 5 seconds earlier DHCP lease was de-assigned and device did not try to re-new the lease. There are many devices which promptly re-new the lease after it gets de-assigned … there are a few that don’t re-assign which makes me think they’re not around any more.