@dpward Thank you for your help keeping it open. @ffmancera Thank you for adding in this feature! We really appreciate it.
Easy with the duh. I figured out that release most likely wasn't implemented, but hoped maybe it was hidden somehow.
My suggestion is having a configuration variable to release on shutdown, or an nmcli command to manually send it similar to dhclient -r.
I understand why you would want persistence. I understand DHCP server lease timers for cleaning up those leases which don't shutdown cleanly.
In our case, we have two things going on. The first, our users are spinning up and down ephemeral VMs very fast and would like to have a way to cleanly release the IP when they are done. Our second use case is DHCPD is configuring DNS via DDNS. When we replace servers with the same name, we have to manually remove the A/TXT/DHCID records from DNS because DHCPD doesn't receive a DHCPRELEASE to trigger the DDNS update. We could wait for the lease time to expire and be cleaned up, but would much prefer to be able to trigger it programatically.
Regards
It doesn't appear that NetworkManager will send a DHCPRELEASE in any native way. As a workaorund, I can disable NM built in dhcp client and use dhclient. I can also fake a dhclient leases file and have it send the release.
Can we please get a native way to force NM to send DHCPRELEASE on shutdown or via nmcli command?