dhcpcd-discuss

Dhcpcd not renewing lease in time

Jonas Ramstrand

Thu Oct 17 12:20:19 2019

Hi Roy/list
I’m troubleshooting an issue where we’ve seen devices using dhcp is using
the same ip address.

What I’ve observed is that I don’t see dhcpcd renewing the ip address in
time, for example (one hour lease time):

   Oct 15 18:32:09.706 ASC01832500056 dhcpcd[786]: wlan0: leased
172.20.16.155 for 3600 seconds

   Oct 15 18:32:09.706 ASC01832500056 dhcpcd[786]: wlan0: renew in 1800
seconds, rebind in 3150 seconds

   …

   Oct 15 21:23:53.808 ASC01832500056 dhcpcd[786]: wlan0: renewing lease of
172.20.16.155

   Oct 15 21:23:53.809 ASC01832500056 dhcpcd[786]: wlan0: sending REQUEST
(xid 0x1319a0ae), next in 3.9 seconds

   Oct 15 21:23:53.861 ASC01832500056 dhcpcd[786]: wlan0: acknowledged
172.20.16.155 from 1.1.1.1

   Oct 15 21:23:53.862 ASC01832500056 dhcpcd[786]: wlan0: leased
172.20.16.155 for 3600 seconds

   Oct 15 21:23:53.863 ASC01832500056 dhcpcd[786]: wlan0: renew in 1800
seconds, rebind in 3150 seconds



So int this case, the device uses the ip address for almost 2 hours after
it expired.
The device is battery powered, so suspend is used. What I’ve understood, is
that dhcpcd is using monotonic clock and that it’s not ticking during
suspend.

Is there any solutions for this in dhcpcd? It creates quite tricky bugs.

Thanks!
//Jonas

Follow-Ups:
Re: Dhcpcd not renewing lease in timeRoy Marples
Archive administrator: postmaster@marples.name