Odd DHCP Client Behavior Using EthernetInterface

Context: I have a device configured to act as a DHCP client using an EthernetInterface object. This issue is not new; there was a longe period beforehand where this device acted perfectly normal as a DHCP client.

I’ve noticed that instead of renewing its DHCP lease, my device will release its address and initiate the DORA process again. Occasionally, the device will send a DHCP discover packet right before releasing, which leads to other weird behavior.

I have tested other devices running on the same server, and they don’t exhibit this behavior, leading me to believe that there could be an issue with the DHCP client code used by EthernetInterface.

Has anyone seen this issue before? Alternatively, is there some way to exercise more control over my device’s DHCP client behavior?

Thanks!

Hello,

few weeks ago there were also a topic about DHCP - Mbed6 and DHCP lease renewals don’t seem to work - Mbed OS - Arm Mbed OS support forum

Maybe you can share experiences with @chakie

BR, Jan

1 Like

In our case the dropped network caused a crash as our code was not prepared for it. I ended up fixing the crash in our code, increasing the DHCP lease time and recommending users to reboot if it acts up. There was no way I could debug the MBed code and fix the buggy behavior.

As this hasn’t been reported before I assume that MBed 6 devices aren’t really staying up long enough for DHCP leases to expire?