Why your Ubuntu 24.04 system stalls for 2–3 minutes and how to fix it safely
What Happens
On Ubuntu 24.04 LTS, you might notice boot messages such as:
A start job is running for Wait for Network to be Configured…
or, in the logs:
systemd-networkd-wait-online.service: Timeout occurred while waiting for network connectivity.
Boot then continues after roughly 120 seconds, sometimes longer.
This is caused by the systemd-networkd-wait-online.service, part of systemd’s network management system. Ubuntu includes this service even on systems that primarily use NetworkManager via Netplan — which can cause unnecessary waits.
What the Service Does
The job of systemd-networkd-wait-online.service is to delay boot until systemd-networkd reports the network is “online” — that is, all configured interfaces have a link and an IP address.
By default:
- It waits for all interfaces managed by systemd-networkd.
- The timeout is 120 seconds (2 minutes).
- It is triggered automatically by network-online.target.
If you are using NetworkManager or cloud-init networking, this service isn’t needed — but Ubuntu keeps it enabled in some cases for compatibility.
Why Ubuntu 24.04 Can Stall for ~2–3 Minutes
Typical causes include:
1. You’re using NetworkManager, but the wait service still runs
If Netplan is set to use NetworkManager, the systemd-networkd-wait-online service may still be pulled in and will wait for interfaces it doesn’t control.
2. Unplugged or virtual interfaces
Servers, laptops, or VMs with multiple NICs (e.g., enp0s25, enp1s0) may cause the wait service to hang while waiting for one inactive port.
3. DHCP delay or slow link detection
If DHCP takes too long or the carrier state changes slowly, the wait times out.
4. Netplan misconfiguration
If Netplan generates .network files for systemd-networkd and leaves a disabled or unused interface marked as “required”, the boot will pause until the timeout.
How to Fix or Work Around It in Ubuntu 24.04
Here are safe and effective solutions, depending on your setup.
Option 1 — Disable the Service Entirely (Recommended for Desktop & Laptop)
If you are using NetworkManager (the default on Ubuntu Desktop), this service is unnecessary.
Run:
sudo systemctl disable systemd-networkd-wait-online.service sudo systemctl mask systemd-networkd-wait-online.service
Then reboot:
sudo reboot
Boots instantly
No side effects for laptops/desktops
Not recommended if you use NFS mounts or remote boot requiring network readiness.
Option 2 — Limit It to One Interface (For Servers Using systemd-networkd)
If you’re on Ubuntu Server with Netplan configured to use renderer: networkd, restrict the wait service to your primary NIC (for example ens18).
Create an override:
sudo mkdir -p /etc/systemd/system/systemd-networkd-wait-online.service.d sudo tee /etc/systemd/system/systemd-networkd-wait-online.service.d/override.conf >/dev/null <<EOF [Service] ExecStart= ExecStart=/usr/lib/systemd/systemd-networkd-wait-online --interface=ens18 --any EOF
Then reload systemd:
sudo systemctl daemon-reload
Prevents delays on unused interfaces
Safe for servers needing network-ready boot
Option 3 — Reduce the Timeout
If you do need to wait, but 2 minutes is too long:
sudo mkdir -p /etc/systemd/system/systemd-networkd-wait-online.service.d sudo tee /etc/systemd/system/systemd-networkd-wait-online.service.d/timeout.conf >/dev/null <<EOF [Service] ExecStart= ExecStart=/usr/lib/systemd/systemd-networkd-wait-online --timeout=20 EOF
Reload systemd:
sudo systemctl daemon-reload
Boot waits only 20 seconds maximum
Still preserves network-ready semantics
Option 4 — Adjust Netplan Configuration
Ubuntu 24.04 uses Netplan to generate .network files for either NetworkManager or systemd-networkd.
Check your current renderer:
grep renderer /etc/netplan/*.yaml
If it says:
renderer: NetworkManager
then you don’t need the wait service — disable it (Option 1).
If it says:
renderer: networkd
and you want to exclude specific interfaces from being waited on, add:
ethernets:
ens19:
optional: trueThen apply:
sudo netplan apply
Marks that interface as “non-blocking”
Prevents systemd from waiting on it
Checking What’s Happening
Use these commands to verify behavior:
Show logs:
journalctl -b -u systemd-networkd-wait-online.service
List network links:
networkctl
See what slowed down boot:
systemd-analyze blame
Summary (Ubuntu 24.04 LTS)
ScenarioRecommended FixDesktop or laptop (NetworkManager) | Disable & mask the wait service
Server using networkd | Limit to one interface (--interface=ens18)
Multi-NIC server | Use Netplan optional: true on secondary NICs
Slow DHCP or flaky link | Shorten timeout (e.g. --timeout=20)
TL;DR Command Summary
# Disable service (desktop) sudo systemctl disable --now systemd-networkd-wait-online.service sudo systemctl mask systemd-networkd-wait-online.service # OR limit it (server) sudo mkdir -p /etc/systemd/system/systemd-networkd-wait-online.service.d echo -e "[Service]\nExecStart=\nExecStart=/usr/lib/systemd/systemd-networkd-wait-online --interface=ens18 --any" | \ sudo tee /etc/systemd/system/systemd-networkd-wait-online.service.d/override.conf sudo systemctl daemon-reload