dhclient action on end leasetime
Simon Hobson
dhcp1 at thehobsons.co.uk
Thu Jun 2 06:55:18 UTC 2011
Michel Boaventura wrote:
>everytime the leasetime of my ip expires, dhclient deconfigures my
>interface, query from a new ip (which will be always the same, due
>to dhcp server configuration) and reconfigure it.
>
>the problem is that this makes my ssh connection to freeze while the
>proccess goes. on a small lease time, it becames annoying. wouldn't
>be smart if it only deconfigures my interface if the ips are
>different?
>
>i've tried with dhcpcd and it seems do work that way.
Then there's something wrong with your setup somewhere !
What *should* happen is that as the lease time goes on, the client
will request a renewal from the server it got the lease from. If it
gets no answer, it will try again for a while and then start
broadcasting requests so that other servers have a chance to answer.
Only if these renewals fail will it deconfigure the interface.
The defaults are (from memory) 1/2T to start renewing from the
original server, 7/8T to start broadcasting - where T is the lease
time. Not sure if these defaults are in the RFC or just
implementation specific in the ISC client.
That means if you use (for example) a 24hour (one day) lease, the
client will start trying to renew at 12 hours, start broadcasting to
renew after 21 hours, and only deconfigure the interface if it's had
no response from one server for 12 hours and any server from 3 hours.
It sounds like that isn't happening in your case, but as you haven't
given any information whatsoever about your setup and my crystal ball
still hasn't arrived, then I can't sugest what may be wrong.
--
Simon Hobson
Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.
More information about the dhcp-users
mailing list