[RndTbl] DHCP lease renewal on Debian/Ubuntu

Gilbert Detillieux Gilbert.Detillieux at umanitoba.ca
Tue Feb 13 09:42:54 CST 2024


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?

-- 
Gilbert Detillieux          E-mail: Gilbert.Detillieux at umanitoba.ca
Computer Science            Web:    http://www.cs.umanitoba.ca/~gedetil/
University of Manitoba      Phone:  204-474-8161
Winnipeg MB CANADA  R3T 2N2
For best CS dept. service, contact <cs-support at lists.umanitoba.ca>.



More information about the Roundtable mailing list