Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 369585 - net-misc/dhcp - dhclient ignores lease time
Summary: net-misc/dhcp - dhclient ignores lease time
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-31 23:05 UTC by Michel Boaventura
Modified: 2011-06-16 01:18 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
dhclient output (dhclient.output,436 bytes, text/plain)
2011-05-31 23:06 UTC, Michel Boaventura
Details
dhclient log made by dhcpdump (dhclient.log,1.71 KB, text/plain)
2011-05-31 23:06 UTC, Michel Boaventura
Details
dhcpcd output (dhcpcd.output,316 bytes, text/plain)
2011-05-31 23:06 UTC, Michel Boaventura
Details
dhcpcd log made by dhcpdump (dhcpcd.log,2.15 KB, text/plain)
2011-05-31 23:07 UTC, Michel Boaventura
Details
dhclient config (dhclient.conf,883 bytes, text/plain)
2011-05-31 23:09 UTC, Michel Boaventura
Details
dhcpcd config (dhcpcd.conf,831 bytes, text/plain)
2011-05-31 23:09 UTC, Michel Boaventura
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Boaventura 2011-05-31 23:05:27 UTC
I don't know if this is related with a specific dhclient version, but it is just ignoring the leasetime sended by the dhcp server and choosing a value itself.

I made this test on a gentoo machine using both dhclient and dhcpcd. I take the dump using dhcpdump. You can see on the logs that dhclient just ignores the value, but dhcpcd doesn't.

The value choosen by dhclient is not random. It is around 40% of the lease time, but every time I run it, it uses a new one.

Reproducible: Always

Steps to Reproduce:
1. dhclient -v
2.
3.
Actual Results:  
It choose a "random" leasetime.

Expected Results:  
It should use the leasetime sended by dhcp server.
Comment 1 Michel Boaventura 2011-05-31 23:06:13 UTC
Created attachment 275405 [details]
dhclient output
Comment 2 Michel Boaventura 2011-05-31 23:06:35 UTC
Created attachment 275407 [details]
dhclient log made by dhcpdump
Comment 3 Michel Boaventura 2011-05-31 23:06:49 UTC
Created attachment 275409 [details]
dhcpcd output
Comment 4 Michel Boaventura 2011-05-31 23:07:06 UTC
Created attachment 275411 [details]
dhcpcd log made by dhcpdump
Comment 5 Michel Boaventura 2011-05-31 23:09:23 UTC
Created attachment 275413 [details]
dhclient config
Comment 6 Michel Boaventura 2011-05-31 23:09:40 UTC
Created attachment 275415 [details]
dhcpcd config
Comment 7 Wormo (RETIRED) gentoo-dev 2011-06-05 05:22:48 UTC
The confusion here is that dhclient and dhcpcd are reporting different variables: former is reporting renewal time, and the latter is reporting lease expiration time. Those are not the same thing: the renewal time is when the client will make a request to extend the lease, so it comes before the actual lease expiration to make sure there is plenty of time to receive an answer from the server before its leased IP becomes invalid.

I believe the small amount randomness in the renewal time is actually on purpose, so if you've got a big cluster of hosts doing netboot with dhcp they won't all hit the dhcp server at the same time (at least after initial bootup).

Does that make sense to you?
Comment 8 Michel Boaventura 2011-06-16 01:18:39 UTC
Hello Wormo!

Thank you very much for your explanation. Now it makes sense to me. In the end I think the problem I'm having is not related with this.

Again, thank you!