[RndTbl] DHCP lease renewal on Debian/Ubuntu

Kevin McGregor kevin.a.mcgregor at gmail.com
Tue Feb 13 13:18:23 CST 2024


Thanks. Your Google-fu is better than mine; my attempts only turned up much
older results like "dhclient -r" or restarting systemd-networkd. The
command you listed only works for systemd >= 244 apparently (since Ubuntu
20.04) and even still many newer search results still don't mention
networkctl renew!

On Tue, Feb 13, 2024 at 9:42 AM Gilbert Detillieux <
Gilbert.Detillieux at umanitoba.ca> wrote:

> 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>.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://muug.ca/pipermail/roundtable/attachments/20240213/c64d8b4e/attachment.htm>


More information about the Roundtable mailing list