Re: behaviour of TIMEOUT on version 7.0.0
Roy Marples
Mon Aug 17 18:50:24 2020
On 17/08/2020 18:07, shamli badole wrote:
Hi Roy,
Using dhcpcd 7.0.0.
A router is configured for DHCP on eth1. When the WAN connection is switched
from one network to another, TIMEOUT event is observed after it tries to renew
the currently assigned lease.
After TIMEOUT a DHCP DISCOVER is sent. To which an ip is offered from another
server.
But the router is not able to acquire this lease. It keeps on sending DHCP
REQUEST to the server. Attached logs for reference.
I observed this behaviour is because the old ip lease is maintained after TIMEOUT.
Since the old ip lease is not cleared, the DHCP REQUEST is sent back to the
previous DHCP Server and not the one which has assigned a new IP Address.
Can You help in understanding why this behaviour is observed on TIMEOUT when the
dhcp server network is changed?
I tested by explicitly clearing the old lease by making the s_addr = 0.0.0.0 in
the DHCP DISCOVER. In this case the DHCP DISCOVER and DHCP REQUEST both are
broadcast.
It accepts the ip which is offered by the server.
Can you please guide on how the TIMEOUT needs to be handled? Does the
application need to reset the interfaces and release the dhcp lease?
Thank you for your help.
The key line from your logs is this:
Jul 31 13:58:25 [7450]: eth1: timed out contacting a DHCP server, using last lease
Does it work if you disable the non default option you set to use the last lease
on timeout?
Roy
Archive administrator: postmaster@marples.name