Solved

DHCP lease and expiry

Posted on 2010-11-24
5
1,118 Views
Last Modified: 2012-08-14
Hi

In regards to DHCP leases, can anyone tell me what happens when the lease expires but the client is still connected to the network? And what about when the client disconnects?

Basically, I have a wireless network with 30 IP addresses that are given out via DHCP. At the moment, the DHCP lease period is set to 24 hours. Since this is wireless, there are people joining and disconnecting all the time, unlike a wired environment with client PC's where they tend to remain.

If Laptop1 comes along and grabs an IP address at 13:00, then disconnects at 14:00, does this mean that IP is 'reserved' until 13:00 the next day?

Likewise, if we changed the lease time to 30 mins, will Laptop1 have to request a new IP at 13:30, or does it automatically keep the existing one although the lease time has expired, due to the fact that it is still connected?
0
Comment
Question by:kam_uk
5 Comments
 
LVL 5

Accepted Solution

by:
Bidonet earned 300 total points
ID: 34207937
IP address will be reserved for 24 hours so if the same client comes back within 24 hours, he will get the same IP address.  Otherwise, if the lease espires after 30 minutes, if the client is still connected it will renew the address automatically as long as he's still connected.  When disconnnected for more than 30 minutes the IP address will be released and available for anyone who connects to get it, even the client who released it.
0
 
LVL 95

Assisted Solution

by:Lee W, MVP
Lee W, MVP earned 100 total points
ID: 34207956
When a client requests a lease, the server gives it one for the term of the lease.  That lease cannot be given out again until the lease expires.  The CLIENT renews the lease at half time.  So if you have a 24 hour lease given by your server, the client will renew it after 12 hours holding on to it for another 24 from that point (and 12 hours after it renews it, it tries to renew it again).

When the client is disconnected from a network, the lease is lost, but when it reconnects to the network, the DHCP server, if it has record of the client's MAC address having a particular address, will hand it back the same address - otherwise, it would likely receive a new address.

If you're running out of leases because machines come and go, you should probably go with a shorter lease time.  Probably 8 hours... maybe less depending on how long clients typically remain on the network.  DHCP broadcasts are not generally a problem so you COULD go much shorter.
0
 
LVL 8

Assisted Solution

by:Den_HBR
Den_HBR earned 100 total points
ID: 34207967

Clients begin to attempt to renew their leases once half the lease interval has expired.
source: http://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol#Reliability

So, if the client stays connected he will renew his lease before it expires.
He will keep the same IP, as long as he stays connected.


If the client disconnects, the ip will return to the pool when the lease time expires.

0
 
LVL 3

Author Comment

by:kam_uk
ID: 34208049
Thanks...

So with the 24 hour lease and a large number of devices constantly trying to join, we won't see problems with existing clients losing their Wi-Fi connection (since they will renew the lease at half time), but we could see problems with new clients trying to connect (because there are no spare IP's in the DHCP scope)?

0
 
LVL 5

Expert Comment

by:Bidonet
ID: 34208082
If you plan to get more than 30 clients within a 24 hours period, you should reduce your release period otherwise all 30 IP addresses will be reserved.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
"No Logon servers available" - fresh essentials 2012 r2 4 88
DHCP DNS dynamic updates 13 86
2nd DC gone down 9 36
DNS Dynamic Update 7 58
Ever wondered why you had to use DHCP options (dhcp opt 60, 66 or 67) in order to use PXE? Well, you don't!
Configuring network clients can be a chore, especially if there are a large number of them or a lot of itinerant users.  DHCP dynamically manages this process, much to the relief of users and administrators alike!
This video discusses moving either the default database or any database to a new volume.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now