Koozali.org: home of the SME Server
Legacy Forums => Experienced User Forum => Topic started by: Taylor on May 09, 2002, 09:24:29 AM
-
Hello,
I have an SME server running version 5.1.2. It is running in server/gateway mode. The server hands out DHCP but it only leases the IP for 1 day. Is there any way to change the lease time? Thanks for all the help in advance.
~Taylor
-
Yes... change the value for max-leasese-time-time in dhcpd.conf.
The count is set in minutes.
Don't forget to make custom templates
-
Thanks!! BTW How do I make custom templates? Thanks again!
~Taylor
-
Just do a forum search.
-
mkdir -p /etc/e-smith/templates-custom/etc/dhcpd.conf
cp /etc/e-smith/templates/etc/dhcpd.conf/25LeaseTimeDefault /etc/e-smith/templates/etc/dhcpd.conf/25LeaseTimeDefault
cd /etc/e-smith/templates-custom/etc/dhcpd.conf/
pico 25LeaseTimeDefault
Edit the value (it is actually in seconds, not minutes as stated above). If it is over 1 week (I don't recommend it) you also need to mod 25LeaseTimeMax.
Expand the new template:
/sbin/e-smith/expand-template /etc/dhcpd.conf
restart dhcpd:
service dhcpd restart
Then, make sure you completely understand what you did above so it is real easy next time ;)
-
Taylor wrote:
>
> Hello,
> I have an SME server running version 5.1.2. It is running in
> server/gateway mode. The server hands out DHCP but it only
> leases the IP for 1 day.
Out of interest, why do you want more than a day? DHCP leases will
be renewed automatically after approximately half of the lease time
has been used, so your lease will continue indefinitely.
A longer lease time is a problem for dynamic sites with a small IP addresse
pool (e.g. lots of laptops which appear in office from time-to-time).
Gordon
-
Grodon wrote:
> A longer lease time is a problem for dynamic sites with a
> small IP address pool (e.g. lots of laptops which appear
> in office from time-to-time).
And further, if the opposite is the case (small number of PCs, large pool) the ISC dhcp server handles that well. You will almost always get the same IP back, even after months off-line. It is very stingey about re-using IPs. It will only recycle an address if the entire pool has been allocated, even then it will recycle the least recently used address. I have had machines off-line for many months, boot them up and they get their old IP back.