The systemd-networkd.service daemon is the core networking back-end responsible for configuring physical interfaces, virtual bridges, VLANs, and IP routing tables in modern Ubuntu server distributions. When this service fails to start, servers lose network connectivity, fail to acquire DHCP leases, and display startup errors such as Job for systemd-networkd.service failed during boot.
Inspect Service Failure Logs via Journalctl
Diagnose the underlying trigger behind the daemon startup failure using systemd journal queries:
- Query the current status of the service:
sudo systemctl status systemd-networkd.service - Review detailed startup logs:
sudo journalctl -u systemd-networkd.service -e --no-pager - Examine the output for parse errors in configuration files under
/etc/systemd/network/or/run/systemd/network/, missing interface names, or conflicting MAC address matches.
Validate Netplan YAML Configuration Syntax
In Ubuntu, netplan generates the underlying systemd-networkd configuration files. Indentation mistakes in netplan YAML files propagate as fatal networkd errors:
- Inspect your netplan configuration files in
/etc/netplan/:ls -la /etc/netplan/ cat /etc/netplan/*.yaml - Ensure strict two-space indentation without hard tab characters.
- Validate and generate the backend configuration files:
sudo netplan generate - If no errors are returned, apply the configuration safely:
sudo netplan apply
Remove Corrupted Configuration Files and Restart
Stale or malformed drop-in files in /etc/systemd/network/ can cause systemd-networkd to abort execution:
- Inspect custom network link files:
Temporarily move any suspicious customls -la /etc/systemd/network/.networkor.netdevfiles to a backup directory. - Reload the systemd configuration manager:
sudo systemctl daemon-reload - Restart and enable the networkd daemon:
sudo systemctl restart systemd-networkd.service sudo systemctl enable systemd-networkd.service - Confirm operational status using
networkctl:networkctl status