?
Solved

What is the maximum supported value for the DHCP lease time field?

Posted on 2011-04-27
16
Medium Priority
?
1,328 Views
Last Modified: 2012-06-21
I won't go into the back story, but the immediate question is what's the max supported value for DHCP lease time field?  It seems to take something around 9700 days or so (in seconds) but someone's set it to 10,000 days and it's causing problems.  We need a very very long lease time, and static IP's are out of the question.

For part 2 extra credit, anybody knows what happens if a server supports a larger max value than a client and hands the client a lease time value that goes over its supported range?

Server is default dhcpd on SuSE enterprise linux 11 GA, client is a firmware embedded stack.
0
Comment
Question by:Mike Rolfs
  • 5
  • 5
  • 4
  • +1
15 Comments
 
LVL 1

Author Comment

by:Mike Rolfs
ID: 35478652
Further information:

The DHCP server is truncating the value of 10,000 days down to a value of 9763 days, 17 hours, 7 minutes, and 12 seconds.  This comes out to be:
BIN  110010010010000001010101000000
DEC  843584832
HEX  32481540

which makes no sense, as it's not anywhere near a bit/byte/word rollover.
0
 
LVL 11

Accepted Solution

by:
brutaldev earned 2000 total points
ID: 35478669
Our own standard says that the max lease time is 999 days (to be more accurate, one second less than 1000 days). The DHCP server is responsible for expiring leased addresses and releasing them to new users, it will not lease an address for longer than the specified time. When a client obtains the lease the expiry time is usually extended to max configured by the server.

Just a side note, not a good idea to set the lease THAT high since the server may actually run out of addresses to lease out. Make sure you provide a fairly large IP address range to be safe.
0
 
LVL 1

Author Comment

by:Mike Rolfs
ID: 35478702
Not a worry there, no DHCP server is serving more than 7-12 clients at a time.  

That's interesting that you note it's 1000 days -1 second, because on a wireshark capture of the dhcp process it shows dhcpd sending the following with the DHCPOFFER:

     Option: (t=51,l=4) IP Address Lease Time = 9763 days, 17 hours, 7 minutes, 12 seconds

which is where I got the truncated value I noted above from.
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 11

Assisted Solution

by:brutaldev
brutaldev earned 2000 total points
ID: 35478887
Wow, looking around and my information may be out of date. Certain routers have the capability of leasing for up to 130+ years! Your clients may be reacting badly because the network card does not expect such a huge range or possibly does not support it, lowering to something reasonable will keep everyone happy. 999 days should be supported across the board and that's a seriously long time for an IP to expire...
0
 
LVL 1

Author Closing Comment

by:Mike Rolfs
ID: 35479160
Interesting what you get when people decide to ignore established standards...
0
 
LVL 1

Author Comment

by:Mike Rolfs
ID: 35479173
I'm going to experiment around with this but I'm willing to bet you're right on the money.  Probably dhcpd accepts a higher number, but the embedded dhcp client in the firmware is still back to the 1000 days -1 second standard and that's likely causing the problem.  Thanks much!
0
 
LVL 11

Expert Comment

by:pmasotta
ID: 35479207
130+ years = 2^32 secs
The RFC does not mention a limit... it seems to me its upon the DHCP server capabilies dealing with longer or shorter values when it comes to healthy mantain the IP pool...


"RFC 2132        DHCP Options and BOOTP Vendor Extensions      March 1997"

9.2. IP Address Lease Time

   This option is used in a client request (DHCPDISCOVER or DHCPREQUEST)
   to allow the client to request a lease time for the IP address.  In a
   server reply (DHCPOFFER), a DHCP server uses this option to specify
   the lease time it is willing to offer.

   The time is in units of seconds, and is specified as a 32-bit
   unsigned integer.

   The code for this option is 51, and its length is 4.
0
 
LVL 11

Expert Comment

by:brutaldev
ID: 35479333
My original info came from configuring many disparate routers and not being able to add more than 999 days. The hardware may actually have supported it but the software never allowed up further than that so I thought it was just a standard (since so many vendors stick to that, not the actual standard). Good to know what the actual standard is though.

10k days should actually work if it lets you set it that high. @MRolfs: Give some lower values a test and draw your conclusions from that. It may just be one or two clients that don't like it. It's possible that the hardware supports seconds up to 32-bit unsigned values but the software doesn't, as you mentioned though it truncates well outside of any 8/16/32 value range??
0
 
LVL 11

Expert Comment

by:pmasotta
ID: 35479403
@brutaldev:
you where talking about "1000 days minus 1 sec" as the limit and now you say " I thought it was just a standard"  
now you fearlessly say that the software "doesn't support it"...

when we talk about RFC is good to read them....
0
 
LVL 40

Expert Comment

by:evilrix
ID: 35488556
>> when we talk about RFC is good to read them....
An RFC is not a standard, it is a proposal for a standard. A standard has to be ratified for it to be a standard.
0
 
LVL 11

Expert Comment

by:pmasotta
ID: 35489137
evilrix:
When it comes to Internet, we have not ISO, not ANSI, not IEEE; the IETF adopts some of the RFCs as official Internet Standards.The whole community and vendors take them as the reference for developing hardware and software.

The RFC 2132  is an IETF accepted RFC as you can se here  http://www.ietf.org/rfc/rfc2132.txt
then I can say The RFC 2132 it a standard and "when we talk about RFC is good to read them"
0
 
LVL 11

Expert Comment

by:pmasotta
ID: 35690575
@:brutaldev
"Our own standard says..."
if it is your "own" it is not a standard...
0
 
LVL 11

Expert Comment

by:brutaldev
ID: 35691954
@pmasotta:
1. You are reading into this too much because you are going on about the RFC standard that I never once referred to. When you say "when we talk about RFC is good to read them" it's all well and good except I wasn't talking about the RFC, I was talking about software limitations in terms of setting the value for lease time which I've come across many times.

2. I already corrected myself saying that my information was incorrect and is based on my own experience when dealing with long lease times. When I refer to "our standard" it's just something that's been established within the company or by myself that hasn't presented any issues so I stick to it. None-the-less, it's still a standard to someone.

3. I answered this question not because I know what the standard is, which is irrelevant to resolving the issue, but rather that it stuck out because I've never had an issue like this using much lower values and was concerned about MRolfs ability to set the number so high.

4. Standard or not, some hardware and software vendors do not comply with them. Internet Explorer is good example, you can't assume everyone is using a written standard as they may just have stuck to something that works for them, probably their "own" standard.

5. From my experience setting the value to no more than 999 days means you don't run into trouble, I was just trying to help MRolfs out with some suggestions and never fearlessly claimed to know anything. I even double checked what other people were saying because which is why I corrected myself but still stuck to my suggestion.

The comments that have followed have added no value to the discussion other than to point out that people can be misinterpreted and so can the RFC. MRolfs never asked for the "standard", he asked for "supported" which could mean anything. From my decade of dabbling with networks, 999 days for a lease seems to be widely supported albeit in no way a limitation or standard across the board. If this helped MRolfs solve his problem then it served it's purpose. If hardware/software developers limit the input of certain settings maybe they know something we don't...
0
 
LVL 11

Expert Comment

by:pmasotta
ID: 35692788
@:brutaldev
1) the asked value derives from a standard even if you never quoted/read it.
2) your personal experience cannot ever been called "your own standard" as you did.

I don't know, probably you have something to learn out of this thread and next time you'll get the standard figures before posting your personal experience as the ultimate Internet law.
0
 
LVL 11

Expert Comment

by:brutaldev
ID: 35693020
@pmasotta
Once again, no value added to the discussion. MRolfs never asked for the standard, merely what's supported. Standards are often not followed so experience counts for more in my opinion. You're misinterpreting "our standard" as some kind of international law but in fact it's just a rule of thumb. That's why I never said "the standard" or something similar where in fact would give you credit.

I never said my experience was my own standard either, this is something that hardware vendors seem to stick to and even if software or routers supported higher, keeping to the lowest common denominator can keep you out of trouble. This is my "own standard" that I've documented and stuck to when setting up.

I did learn something from this thread, what the real RFC standard is as you quoted, which still doesn't help explain or resolve the issue at hand. You should learn from this that not even a standard is a hard and fast rule. I posted my experience to try and assist someone with a problem they were experiencing while you are in fact "fearlessly" stating your claims on the subject and the reasons for my answer. We are all participating to help each other and learn a few things ourselves not make bold claims or establish anything as "law", if you have a different agenda please take it elsewhere.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

A Cisco router can be configured as a DHCP Server. There are advantages and disadvantages in making your Cisco router work as DHCP Server. Almost all the features for windows DHCP can be configured on Cisco-based DHCP server. Some of the features me…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses
Course of the Month13 days, 20 hours left to enroll

807 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