Re: Behavior with "--lastlease" when DHCP server comes back
Roy Marples
Wed Sep 14 17:02:49 2016
Hi David
On 14/09/2016 17:28, David Hauck wrote:
> 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"?
If the persistent option is not specified then dhcpcd will drop the
least at exit/carrier down.
As such, there is no lease for the lastlease option to re-use.
More clear?
Roy
Archive administrator: postmaster@marples.name