What are the possible issues in using very short DHCP lease time (< 1min)?
We have a network setup for a demo, which lasts about 15mn. Our DHCP server is configured to assign ~ 100 addresses (max number of simultaneous connections or our AP) ... but since people might come and go very quickly we need to keep the lease time very short in order to free the IP addresses and allow other people to connect.
Initially I wanted to go for a lease time as short as 25 seconds, considering that the demo is quite short, and to be sure that no IP will be "abusively" reserved by the DHCP server ... However, I am afraid of several things.
First, the impact on the load of the network.
Second, I have read here and there that there might be some "weird" issues with time leases below 1 minute (e.g. What is a good DHCP lease timeout configuration).
Does somebody know what can be the different problems with using such a short time lease? What is the impact on the network? What would be a short but safe lease duration to use?
Solution 1:
With a very low lease time you will see an increase of network traffic, particularly broadcast traffic as the "discover" and "offer" phases of DHCP are layer 2 broadcasts. How much of an issue this is depends on many factors such as the size and complexity of the network, latency, performance of the DHCP server, etc. Keep in mind DHCP clients do not wait until their lease is expired to try to renew it. So if you gave me a 60-second lease I'll be talking to the DHCP server (potentially) every 30 seconds to renew it.
As for "weird" issues, anything goes. Different DHCP clients will behave differently. Some may handle it fine, some may have problems renewing so often and fail. Perhaps there are clients which get a lease and simply sleep for a certain period of time then check if they need to renew or toss the address if it expired. If the sleep is longer than the lease then the system will keep the IP longer than it is allowed to. I haven't seen that issue before but I have seen things like the IP a client requests in the "request" phase being different than the one the server gave it in the "offer" phase but the server actually gave the client the "request" IP, which was already in use. Never under-estimate how poorly software can be written.
Solution 2:
Matching the DHCP lease times with the connection limit of your AP doesn't strike me as the best way of handling the issue. The two don't have to match. Lower the DHCP lease time to something like twice the length of the demo (completely arbitrary suggestion) and expand your DHCP scope to accommodate as many leases as you think you'll have in a reasonable amount of time. As users drop off of the AP and new users connect they'll either get an unused IP from your ample DHCP pool or they'll get a previously leased IP address once those lease times expire.
If configuring your DHCP ip address pool is your means of controlling how many people can connect to the AP then I'd say there's probably a better way of doing that.