10

I used to use the following commands in order to release and renew the IP address:

dhclient -r    
dhclient eth0

But dhclient is not installed on Ubuntu 24.04.

I could probably just install it, but maybe there is another command that come instead of dhclient in the new release?

muru
  • 207,228
Foobarer
  • 517

3 Answers3

4

networkctl renew eth0

Ubuntu 24.04 uses systemd-networkd

https://www.freedesktop.org/software/systemd/man/latest/networkctl.html

4

With no dhclient and dhcpcd in 24.04 by default, using nmcli seems to be the way forward.

This following command works and renewed the lease:

nmcli connection down <interface_name> && nmcli connection up <interface_name>

Another option:

nmcli connection modify <connection_name> ipv4.dhcp-timeout 1 && nmcli device reapply <interface_name>

To find <connection_name>: nmcli connection show

To list <interface_name>: nmcli device status

3

24.04 has moved to a using dhcpcd5 for a DHCP client. Try "dhcpcd -k" to release the current lease and "dhcpcd eth0" to get a new one.