dhcpcd-discuss

RE: Behavior with "--lastlease" when DHCP server comes back

David Hauck

Wed Sep 14 16:29:08 2016

Hi Roy,
 
I had a follow-up question below on this (old) thread:

On Thu, 21 Apr 2016 at 08:45:00, Roy Marples wrote:
> Hi
> 
> On 20/04/2016 20:08, Shahid Mahmood wrote:
>> Wanted to know the behavior if dhcpcd is started with --lastlease
>> option and it actually re-uses the last lease when dhcp server disappears.
>> 
>> 1) Does it try to renew the lease in case the server comes back or
>> does it keep that previous lease forever? If it does retry, how often?
> 
> It keep the lease forever.
> However, it should also DISCOVER a DHCP server in accordance with the
> backoff (so once every 60 +/- 1 seconds). Any response is then treated for a normal renew.
> 
> I've not tested this option for a long time, but it should still work.
> 
>> 2) Same question, with additional --persistent option.
> 
> lastlease actually requires the persistent option.
> Without it, dhcpcd would destroy the lease at exit.

Are you saying that a non-expired lease will not be reused in the case where 'lastlease' is used without the 'persistent' option? The current man page suggests that the last lease will still be used in the case where the lease hasn't expired and 'persistent' has not been specified. I'm asking because I'm not sure what you mean by "lastlease actually requires the persistent option"?

Thanks,
-David 
 
> Roy

Follow-Ups:
Re: Behavior with "--lastlease" when DHCP server comes backRoy Marples
References:
Behavior with "--lastlease" when DHCP server comes backShahid Mahmood
Re: Behavior with "--lastlease" when DHCP server comes backRoy Marples
Archive administrator: postmaster@marples.name