Discussion:
what is the subtil difference between max-lease-time and default-lease-time ?
Sébastien CRAMATTE
2006-07-10 11:07:45 UTC
Permalink
Hello

Does anyone could explain me what is the subtil difference between
max-lease-time and default-lease-time ?
To test purpose I've put the same value for twice in my "dhcpd.conf"

My problem is that I don't understand why state is always active and
why starts time of the current lease is inferior to ends time of the
previous ?

Any ideas and some explications ?
Thanks for your help

Regards

Sebastien
---------------- dhcpd.conf ------------------

default-lease-time 3600;
max-lease-time 3600;

ddns-update-style none;

log-facility local7;

subnet 192.168.1.0 netmask 255.255.254.0 {
option routers 192.168.1.1;
option domain-name "cpe.telelorca.com";
option ntp-servers ntp.telelorca.com;
option domain-name-servers 192.168.1.2,192.168.1.3;

one-lease-per-client on;

pool {
deny dynamic bootp clients;
default-lease-time 300;
max-lease-time 300;
range 192.168.1.50 192.168.1.254;
}



--------------- /var/lib/dhcp3/dhcpd.leases ---------------


# All times in this file are in UTC (GMT), not your local timezone.
This is
# not a bug, so please don't ask about it. There is no portable way to
# store leases in the local timezone, so please don't request this as a
# feature. If this is inconvenient or confusing to you, we sincerely
# apologize. Seriously, though - don't ask.
# The format of this file is documented in the dhcpd.leases(5) manual page.
# This lease file was written by isc-dhcp-V3.0.4

lease 192.168.1.50 {
starts 1 2006/07/10 10:53:15;
ends 1 2006/07/10 10:56:35;
tstp 1 2006/07/10 10:56:35;
binding state active;
next binding state free;
hardware ethernet 00:00:00:00:00:00;
uid "\001\000\017 #U\200";
client-hostname "tv";
}
lease 192.168.1.50 {
starts 1 2006/07/10 10:54:55;
ends 1 2006/07/10 10:55:45;
binding state active;
next binding state free;
hardware ethernet 00:00:00:00:00:00;
uid "\001\000\017 #U\200";
client-hostname "tv";
}
lease 192.168.1.50 {
starts 1 2006/07/10 10:55:20;
ends 1 2006/07/10 10:56:10;
binding state active;
next binding state free;
hardware ethernet 00:00:00:00:00:00;
uid "\001\000\017 #U\200";
client-hostname "tv";
}
....
Karl Auer
2006-07-10 11:30:00 UTC
Permalink
Post by Sébastien CRAMATTE
Does anyone could explain me what is the subtil difference between
max-lease-time and default-lease-time ?
To test purpose I've put the same value for twice in my "dhcpd.conf"
The max-lease-time is the maximum lease time that you will get. If you
ask for (say) 10000 seconds and the maximum lease time is (say) 6000
seconds, then you will get a lease time of 6000 seconds.

The default lease time is the lease time you will get if you don't
request any particular lease time. Generally you set the default lease
time to the lease time you would like everyone to use, and the maximum
lease time to the highest lease time you are prepared to accept. It's
perfectly acceptable to have them configured the same.
Post by Sébastien CRAMATTE
My problem is that I don't understand why state is always active and
why starts time of the current lease is inferior to ends time of the
previous ?
Leases are renewed way ahead of their actual expiry - usually after
about half the lease time has expired. So if your lease is 10000
seconds, the client will generally start trying to renew it after about
5000 seconds. If it succeeds, the new lease time will have a start time
way earlier than the previous lease' end time.

Regards, K.
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (***@biplane.com.au) +61-2-64957160 (w/h)
http://www.biplane.com.au/~kauer/ +61-428-957160 (mob)
Sébastien CRAMATTE
2006-07-10 11:35:23 UTC
Permalink
Many thanks for your answer
Now it's clear like water ...;)

And what about state ? When dhcp lease change of state ? I mean that
In my dhcpd.leases file I can see only actives leases ...
But normaly If a lease has expired should appear as "free" state ? isn't
it ?

Regards
Post by Karl Auer
Post by Sébastien CRAMATTE
Does anyone could explain me what is the subtil difference between
max-lease-time and default-lease-time ?
To test purpose I've put the same value for twice in my "dhcpd.conf"
The max-lease-time is the maximum lease time that you will get. If you
ask for (say) 10000 seconds and the maximum lease time is (say) 6000
seconds, then you will get a lease time of 6000 seconds.
The default lease time is the lease time you will get if you don't
request any particular lease time. Generally you set the default lease
time to the lease time you would like everyone to use, and the maximum
lease time to the highest lease time you are prepared to accept. It's
perfectly acceptable to have them configured the same.
Post by Sébastien CRAMATTE
My problem is that I don't understand why state is always active and
why starts time of the current lease is inferior to ends time of the
previous ?
Leases are renewed way ahead of their actual expiry - usually after
about half the lease time has expired. So if your lease is 10000
seconds, the client will generally start trying to renew it after about
5000 seconds. If it succeeds, the new lease time will have a start time
way earlier than the previous lease' end time.
Regards, K.
Loading...