Koozali.org: home of the SME Server

DHCP lease renual interval

Andrew

DHCP lease renual interval
« on: January 02, 2002, 11:00:47 AM »
Hi, is it possible to reduce the duration of DHCP leases handed out by E-Smith 4.x from the default 24 hr to around 30 mins? I have a laptop (win95) which needs to obtain a new address when I connect to the network at work. I'ts becomming irritating to have to manually use winipconfig to tell is to get a new address.
What I'd like is to have the lease assigned be my E-Smith server expire in the time it takes me to drive to work so the laptop just asks the NT4 server for a new address automaticly without my intervention.

Any help is appreciated.
Andrew

aniston

Re: DHCP lease renual interval
« Reply #1 on: January 02, 2002, 06:16:21 PM »
Hello,
.. you can find these two files in /etc/e-smith/templates/etc/dhcpd.conf

-rw-r--r--    1 root     root           43 Dec 31  2000 25LeaseTimeDefault
-rw-r--r--    1 root     root           45 Dec 31  2000 25LeaseTimeMax

that keep the defaults for the lease times of the DHCPdeamon

instead of modifying these lines directly ssh to your e-smith server and copy two newfiles to /etc/e-smith/templates-custom/etc/dhcpd.conf (this way if something goes wrong just delete these files :))

so assuming you have logged on as root key in the following commands.

cd /
mkdir -p /etc/e-smith/templates-custom/etc/dhcpd.conf
cp /etc/e-smith/templates/etc/dhcpd.conf/25LeaseTimeMax /etc/e-smith/templates-custom/etc/dhcpd.conf/
cp /etc/e-smith/templates/etc/dhcpd.conf/25LeaseTimeDefault /etc/e-smith/templates-custom/etc/dhcpd.conf/
cd  /etc/e-smith/templates-custom/etc/dhcpd.conf/

you can at this point launch mc and modify the values in there, then use the signal event method (first stop the dhcpd service) to activate your changes or reboot the server (informing your colleagues before hand !! )

all the best.

... aniston.