DHCP leases issue

Simon Hobson dhcp1 at thehobsons.co.uk
Sat Sep 7 22:30:25 UTC 2019


Surya Teja <suryateja042 at gmail.com> wrote:

> Thanks for reply as suggested i have increased lease time to one hour and I observerd one more scenario when the client moves from one subnet to another subnet ( lease time say 1hr). The client got IP from the second subnet scope but the previous IP in the 1st subnet is still in hold and in the lease file. It still recorded an active entry. How can the dhcp server reclaims those unused IP's?

You CANNOT do that without violating the DHCP specification. Note that the client is within it's rights to store all the leases it has, and on returning to the previous subnet, continue using the lease it still has for that subnet. So if the server has handed the address out to another client in the meantime, you can have an address clash.
So short version "do NOT do that" !

> The first IP is getting into free state after completing its 1 hour lease duration till that time it is active mode only.

That is correct operation.

The correct response to "I don't have enough addresses" is to increase the size of the address pool(s). It's a balancing act - on the one hand longer leases give you stability and more time to respond to DHCP server issues; while on the other hand, shorter leases suit highly mobile users (high churn rate). For short leases, even 60 minutes is (IMO) getting rather short - you only need one hiccup with your DHCP service and your users have between 30 and 60 minutes before they fall off the network and call your helpdesk.

If you are finding that you run out of leases then it suggests you have your network design wrong. There is LOTS of address space in the RFC1918 blocks, and you are certainly not constrained to use /24 subnets in the 192.168.n.n allocation. Use 10.n.n.n/8 and you have 16 million addresses to play with !




More information about the dhcp-users mailing list