RE: Extending a lease when dhcp server is offline (similar to lastleaseextend)
Matthew Clarkson
Tue Sep 01 23:47:10 2020
Hi Roy,
I switched to testing with master, latest commit is https://roy.marples.name/cgit/dhcpcd.git/commit/?id=c628d4a2a7474f72b99dce03571732667fc0c7b1.
I am still seeing the server offer a different ip address once it comes back online. The dhcpcd output looks like this:
root@RCFA-0001p:~# dhcpcd --lastleaseextend --nobackground --timeout 10 br0
dhcpcd-9.1.4 starting
no such user dhcpcd
DUID 00:01:00:01:26:3d:a6:3e:00:02:d9:1f:ff:ff
br0: IAID d9:1f:ff:ff
br0: rebinding lease of 192.168.10.24
br0: leased 192.168.10.24 for 471 seconds
br0: adding route to 192.168.10.0/24
br0: adding default route via 192.168.10.1
br0: failed to renew DHCP, rebinding
br0: DHCP lease expired, extending lease
br0: soliciting a DHCP lease
br0: offered 192.168.10.25 from 192.168.10.2
br0: probing address 192.168.10.25/24
br0: leased 192.168.10.25 for 600 seconds
br0: changing route to 192.168.10.0/24
br0: changing default route via 192.168.10.1
Thanks.
-----Original Message-----
From: Roy Marples <roy@xxxxxxxxxxxx>
Sent: Tuesday, September 1, 2020 10:42 AM
To: Matthew Clarkson <mclarkson@xxxxxxxxxxxxxxxxxxxx>; dhcpcd-discuss@xxxxxxxxxxxx
Subject: Re: Extending a lease when dhcp server is offline (similar to lastleaseextend)
Hi Matthew
On 01/09/2020 18:27, Matthew Clarkson wrote:
> After applying these patches I see the device replying to the last lease address during the expired state and there are periodic discover requests being broadcast. This is great.
>
> But when the server comes back online, there is a small problem. I believe that the server is arping the previous lease ip, when the discover comes in the server sees the client is using that ip, then offers a different address. Attached is an example.
>
> I'm not sure what the solution would be, but the older client appears to periodically unlink the previous ip address, attempt discover, then relink to the old ip.
At this point your probably better using the git master branch as this was fixed a while ago.
I think these are the commits:
https://roy.marples.name/cgit/dhcpcd.git/commit/?id=f021b552b5c53cfa785bc5f8df1c97fa8ffa9b86
https://roy.marples.name/cgit/dhcpcd.git/commit/?id=3ce2165cf3934267a28d79bbb9e1bde2e3e4462a
Roy
Archive administrator: postmaster@marples.name