The answer, of course, depends on what distro and vintage, as this has changed over time...
https://www.google.com/search?q=debian+ubuntu+force+dhcp+renewal
For most modern, systemd-based distros, you would likely use something like this:
networkctl renew interface-name
Restarting systemd-networkd would also work, but as you pointed out, that's more extreme than necessary.
Gilbert
On 2024-02-13 8:53 a.m., Kevin McGregor wrote:
Is there a way to force the DHCP client on Debian/Ubuntu to renew its lease ahead of time? For example, if the lease duration is a week, but you want the client to refresh the list of DNS servers immediately.
Will "netplan apply" do it? Or "systemctl restart systemd-networkd"? That seems extreme; I don't want a network/service interruption -- things like IP address/netmask/gateway won't change in the case I'm thinking of but other configuration details may need updating. Mind you, I have little idea what all systemd-networkd is responsible for.
In Windows, for example, you'd run "ipconfig /renew". Is there an equivalent for Debian/Ubuntu?