arduino-libraries / Ethernet

Ethernet Library for Arduino
http://arduino.cc/
252 stars 253 forks source link

Allow forced DHCP thread restart #265

Open enkidu opened 3 weeks ago

enkidu commented 3 weeks ago

Hello. I haven't find a way to refresh DHCP lease after cable has been reconnected. In the ideal way DHCP should be restarted. As this is not the case for most users, there could be method to force restart of DHCP instance. Why is it important?

  1. If you replug device into another vlan and want to keep its uptime for any reason
  2. For deployments where mac-auth is present - device has to send packet to even authorize to the network. That may be problematic if you even restart the switch.
  3. To force IP refresh remotely after it has been changed in DHCP server binding lists - often you would take the interface down for a few seconds.

basic logic could be embedded into maintain() method or be kept separately.