Solved

DHCP lease and expiry

Posted on 2010-11-24
5
1,133 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 96

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wondered why you had to use DHCP options (dhcp opt 60, 66 or 67) in order to use PXE? Well, you don't!
Learn how to PXE Boot both BIOS & UEFI machines with DHCP Policies and Custom Vendor Classes
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

726 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