How long do you set for DHCP Lease Time?


Recommended Posts

How long do you set for DHCP Lease Time?

By default it came as 1440 minutes, which is 24 hours.

Means after 24 hours, my connection will die for a few seconds for it to refresh?

If we can set it 5 days or more, why not?

Link to comment
Share on other sites

Sometimes, refreshing the lease can be a good thing (i.e. receiving a new IP address or refreshing the cable modem connection with the router). 24 hours is fine, but you can always set it to anything if you so desire.

Link to comment
Share on other sites

Means after 24 hours, my connection will die for a few seconds for it to refresh?

Where did you get that idea? If that is what is happening - then you have something wrong in how your dhcp is renewing..

Normally if you have 24 hour lease, at the 12 hour mark the client will request a renew - which if granted would reset the clock to 24 hours from that 12 hour mark. and then 12 hours later you would do it again.

If for some reason the 12 hour mark was not renewed, then in 6 hours it would try again, then at 3, then at 1.5 etc..

You should not loose your connection on a renew, yes if the lease actually expires and you have to get a new IP, or brand new lease vs a renew -- then yes you could have temp disconnect.

But if your dhcp is working correctly the lease should just continue to renew..

You can check on the lease expire time, etc.. from ipconfig /all

example

Lease Obtained. . . . . . . . . . : Thursday, December 14, 2006 10:16:45 AM

Lease Expires . . . . . . . . . . : Saturday, December 16, 2006 10:16:45 AM

On this lease - tmrw at 10:16:45 it should request a renew.. You can look on yours -- then look after the half way mark, and see if it renew or not.

Link to comment
Share on other sites

B.M.:

Is it not true that you will not need to renew the lease until you release the ip? Meaning, it does not try to renew the lease at the time of expiry? Do DHCP servers check for unavailable IPs on the network or are they "stupid" and only look in their pool?

Link to comment
Share on other sites

Huh? I thought I was pretty clear to how it works I even simplified it to 50%, 50% etc.. when normally it would be a renew time of 50% of the lease time, the the rebind time of .875 of the total lease time..

Here this should clear up any question you might have

http://www.microsoft.com/technet/network/e...d_ch06.mspx#E6C

Chapter 6 - Dynamic Host Configuration Protocol

When the client reaches 50% of the lease time it will attempt to renew.. if it does not it will wait another period of time before it requests rebind (.875 of the lease). But it should not give up its lease until it has actually expired, etc..

I think there is situation where after the second timer, it will try and ping its gateway -- if no response it will think moved network and send out a dhcp discover...

But in a nutshell if your dhcp is working correctly -- there should not be a time where you loose your connection.. Since your lease should just renew every time it gets to 50% of the lease.

As to duplicate address detection (part of IPv6 I think?) or Conflict Detection Attempts -- that would depend on your dhcp server if they support that type of option.. But yes the window ones can do some form of check if an ip is out there before it hands it out.. I do believe APIPA has some form of it as well. But dhcp just look to their pools, if they have not handed out an address - then yes they will hand it out. I hightly doubt the dhcp servers in your soho routers support that type of feature.

Link to comment
Share on other sites

What are the benefits of having a longer or shorter lease time?

In a home setup, with the very limited options that most soho routers dhcp support not much.. if you have lots of machines that use up most of your available scope.. you might want a shorter lease, to free up addresses as machines go off the network.

Or if you dns, or other options that can be handed out with dhcp change often - then a short lease time might be better to speed up how fast these changes would get pushed out, etc..

If you have lots of machines and do not make changes to your options, and your not worried about address space.. Or you want machines to be able to be off the network for awhile and when they come back still get the same address they had last time, and your looking to lower the network traffic for dhcp -- then a longer lease would make more sense.

But for the typical home setup.. whatever the default is should be fine, which quite often is 24 hours.

BTW -- which lease are we talking about, the one the cable modem gets from your ISP.. or the one your routers dhcp hands out to your clients? Most of the time you do not have an option to request a longer lease from your ISP.. and even if you could request a specific length -- they most likely just hand out whater they want to hand out - and could care less if you request a longer one or not, etc..

Since he was talking about changing the length of the lease - I assumed we were talking about the lease he hands out to clients of his dhcp server.. Are you talking about lease your router gets from your ISP??

Edited by BudMan
Link to comment
Share on other sites

Well let us know if it actually renews at the 30 minute mark.. If it does not renew, then yeah you have a issue.. And that might what is causing the temp disruption in your connection.

If it does not renew on its own - what about if you run an ipconfig /renew command?

The dhcp servers that part of every home router, never seem to be any good, and you could have some renew problems.. You could either bring up another dhcp for your network, or just move to static for your machines.. And just leave the dhcp running for guest machines, etc..

Are you running any type of software firewall that might interfere with the dhcp process? Ports 67 and 68 UDP are used.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.