How to Fix Failed to Start Wait for Network to be Configured in Ubuntu

Booting up an Ubuntu server or reviewing system startup times with systemd-analyze blame frequently uncovers a multi-minute boot delay ending with the critical alert Failed to start Wait for Network to be Configured (systemd-networkd-wait-online.service). By default, systemd-networkd-wait-online blocks the boot process for up to 120 seconds waiting for every physical and virtual network interface to reach a fully configured carrier link state. If your motherboard has two Ethernet ports but only one is plugged into a cable, or virtual Docker/bridge interfaces take time to initialize, the service times out with exit status code 1. Marking inactive interfaces as optional in Netplan and restricting wait targets to active links restores instantaneous boot times.

Mark Unused Network Interfaces as Optional in Netplan

Netplan allows system administrators to designate secondary Ethernet interfaces as optional, preventing systemd from halting the boot process if a cable is unplugged.

  1. Open your terminal and navigate to the Netplan configuration folder:
    cd /etc/netplan && ls -la
  2. Open the active YAML configuration file (e.g., 01-netcfg.yaml or 50-cloud-init.yaml) in a text editor:
    sudo nano 01-netcfg.yaml
  3. Under each network interface definition (such as eth0 or enp3s0), add the optional: true directive:
    network:
      version: 2
      renderer: networkd
      ethernets:
        enp3s0:
          dhcp4: true
          optional: true
        enp4s0:
          dhcp4: true
          optional: true
  4. Save the file (press Ctrl + O and Enter, then Ctrl + X).
  5. Apply the updated Netplan configuration:
    sudo netplan apply

Instruct systemd-networkd-wait-online to Listen Only on Active Interfaces

By default, the service waits for all interfaces to be online. You can override the service parameters so it exits as soon as your primary WAN interface connects.

  1. Create a systemd service drop-in configuration directory:
    sudo mkdir -p /etc/systemd/system/systemd-networkd-wait-online.service.d
  2. Create an override file named override.conf:
    sudo nano /etc/systemd/system/systemd-networkd-wait-online.service.d/override.conf
  3. Add the following configuration, replacing eth0 with your primary active interface name (check with ip link):
    [Service]
    ExecStart=
    ExecStart=/lib/systemd/systemd-networkd-wait-online -i eth0 --timeout=15
  4. Save and exit the editor.
  5. Reload the systemd manager configuration:
    sudo systemctl daemon-reload

Disable or Mask the Service If Operating Under NetworkManager

If you run an Ubuntu Desktop environment or manage networks via NetworkManager rather than systemd-networkd, the wait-online service is completely redundant.

  1. Check which network renderer is currently active:
    systemctl is-active NetworkManager
  2. If NetworkManager is active, safely disable the networkd wait-online unit:
    sudo systemctl disable systemd-networkd-wait-online.service
    sudo systemctl mask systemd-networkd-wait-online.service
  3. Reboot your system and verify that boot delays vanish:
    systemd-analyze blame | head -n 5

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.