Refreshing DHCP on Ubuntu Server 24.04
Ubuntu Server 24.04 uses netplan for network configuration, backed by either systemd-networkd (default on server) or NetworkManager. Here are the standard ways to release and renew your DHCP lease:
bash
# Release the current lease
sudo dhclient -v -r
# Request a fresh lease
sudo dhclient -v
You can also target a specific interface:
bash
sudo dhclient -v -r eth0
sudo dhclient -v eth0
This re-applies the netplan config, effectively restarting the network:
bash
sudo netplan apply
bash
sudo systemctl restart systemd-networkd
bash
sudo ip link set eth0 down
sudo ip link set eth0 up
# DHCP client on systemd-networkd will automatically request a new lease
|
Method |
Best for |
|
dhclient -v -r then dhclient -v |
A clean release & renew without dropping other interfaces |
|
netplan apply |
If you've just edited /etc/netplan/*.yaml |
|
systemctl restart systemd-networkd |
Restarts all network managed by systemd |
|
ip link set ... down/up |
Quick bounce of a single interface |
Tip: First check what backend you're running:
bash
# See if NetworkManager or systemd-networkd is managing things
systemctl status systemd-networkd
systemctl status NetworkManager
The default on Ubuntu Server 24.04 is systemd-networkd, so methods 1, 3, or 4 will work right out of the box.