systemd-networkd is the system daemon in systemd that configures network interfaces declaratively, applying addresses, routes, DHCP, bridges, bonds and VLANs from plain configuration files. In Linux networking it is the lightweight alternative to NetworkManager, designed mainly for servers, containers, virtual machines and embedded systems where connections are static and predictable.
The daemon watches network devices through the kernel’s netlink interface, matches each device against configuration files and keeps its state as described, reacting automatically when links appear, disappear or change carrier. It is the backend that Netplan uses by default on Ubuntu Server, so many administrators run it without editing its files directly.
How systemd-networkd applies configuration
At startup the daemon reads configuration from /etc/systemd/network, /run/systemd/network and /usr/lib/systemd/network, with files in /etc taking precedence over packaged defaults of the same name. Files are processed in lexical order, and for .network files the first file whose [Match] section fits an interface wins, so names such as 10-lan.network and 90-default.network are used to control priority.
The configuration is split into three file types with different responsibilities. Keeping these roles apart is the key to understanding the daemon.
| File type | Purpose | Processed by |
|---|---|---|
| .network | Addresses, DHCP, routes, DNS and membership in bridges or bonds | systemd-networkd |
| .netdev | Creates virtual devices such as bridges, bonds, VLANs, VXLAN and WireGuard | systemd-networkd |
| .link | Low-level link settings such as interface name, MTU and MAC address | udev at device detection |
The .link files explain where predictable interface names such as enp3s0 come from. A default file shipped with systemd tells udev which naming policies to try, based on firmware data, PCI slot or bus path. Administrators can add their own .link file that matches a MAC address and assigns a stable name such as lan0, which keeps configurations valid when hardware is moved between slots.
The daemon itself does not resolve host names. DNS servers learned from DHCP or set with DNS= are passed to systemd-resolved, which manages name resolution and the stub resolver that /etc/resolv.conf usually points to.
Key sections and settings
A .network file consists of INI-style sections. A minimal static configuration needs only a match and a network section, while advanced setups add routes, routing policy rules or a built-in DHCP server.
| Section and key | Example value | Effect |
|---|---|---|
| [Match] Name= | en* or eth0 | Selects interfaces by name pattern |
| [Network] DHCP= | yes, ipv4, ipv6 or no | Enables the built-in DHCP client |
| [Network] Address= | 192.0.2.10/24 | Assigns a static address with prefix length |
| [Network] Gateway= | 192.0.2.1 | Adds a default route |
| [Network] DNS= | 192.0.2.53 | Supplies DNS servers to systemd-resolved |
| [Network] Bridge= | br0 | Attaches the interface to a bridge created by a .netdev |
| [Route] Destination= | 10.20.0.0/16 | Adds a static route |
| [Link] RequiredForOnline= | no | Excludes an interface from the online check |
The daemon also includes a DHCP server, IPv6 router advertisement support and IPv6 prefix delegation, which makes it suitable for small routers and container hosts without additional services.
Managing the daemon with networkctl
The networkctl tool shows and controls the state of interfaces managed by the daemon. Its output distinguishes operational state, such as routable or degraded, from setup state, such as configured, configuring or unmanaged, which helps locate problems quickly.
- `networkctl list` shows every link with its type and states.
- `networkctl status eth0` shows addresses, gateway, DNS and recent log lines.
- `networkctl reload` rereads configuration files without restarting the service.
- `networkctl reconfigure eth0` reapplies configuration to one interface.
- `journalctl -u systemd-networkd` shows the full log for troubleshooting.
The service systemd-networkd-wait-online blocks boot until configured interfaces are online, so services that need the network can order themselves after network-online.target. Its default timeout is two minutes, which explains slow boots on machines with an unplugged interface.
Comparison with other Linux network managers
Several tools can configure networking on Linux, and they suit different environments. The choice is mainly between static infrastructure and changing user connections.
| Tool | Typical environment | Strength | Limitation |
|---|---|---|---|
| systemd-networkd | Servers, containers, VMs | Small, declarative, part of systemd | No built-in Wi-Fi authentication |
| NetworkManager | Desktops and laptops | Wi-Fi, VPN plugins, graphical tools | Larger and more dynamic than servers need |
| Netplan | Ubuntu systems | One YAML format for both backends | A generator, not a daemon itself |
| ifupdown | Older Debian systems | Simple interfaces file | Limited reaction to runtime changes |
For wireless links, the daemon can manage addresses once wpa_supplicant or iwd has authenticated the connection, but roaming between networks is far more convenient with NetworkManager. Configuration of the interfaces themselves at runtime remains possible with the ip command, although such changes are not persistent.
In container platforms, the daemon is often used inside lightweight hosts and minimal images because it adds few dependencies. systemd-nspawn containers, for example, ship default files that configure the virtual Ethernet pair between host and container automatically, so container networking works without extra tools.
Common mistakes
| Symptom | Likely cause | Fix |
|---|---|---|
| Settings change unexpectedly | NetworkManager and networkd manage the same interface | Leave each interface to one manager |
| Boot waits two minutes | wait-online expects an unused interface | Set RequiredForOnline=no or narrow the check |
| Configuration ignored | Another file matched first in lexical order | Rename files to control priority |
| No name resolution | systemd-resolved not running or resolv.conf not linked | Enable resolved and link the stub file |
| Edits to .link files have no effect | udev applies them only at device detection | Reload udev rules and replug or reboot |
When Netplan is in use, files in /run/systemd/network are generated output. Editing them directly is a common error, because the next netplan apply or reboot overwrites the changes; the YAML in /etc/netplan is the source of truth.
In everyday language
systemd-networkd is a quiet background helper that sets up network connections on a Linux computer. It reads a few small text files that say which address each network port should have.
Then it makes it so and keeps it that way. If a cable is unplugged and plugged back in, the helper restores the settings automatically. It suits servers that stay in one place, while laptops that hop between Wi-Fi networks usually use a different tool.
Seen in the real world
A hosting provider runs virtualization hosts with two bonded 25 Gbps ports, several VLANs for customer traffic and a management network. Previously, interface scripts differed between hosts and a typo on one host once disconnected all its virtual machines after a reboot.
The team standardized on systemd-networkd with a set of .netdev files for the bond, the VLANs and one bridge per VLAN, plus .network files that attach each component. The files are generated from a template by the configuration management system, so every host receives identical, reviewed network definitions. After a reboot, networkctl list shows every link as routable within seconds, and adding a new customer VLAN means adding two small files and running networkctl reload.