Introduction to systemd-networkd (Tom Gundersen, RedHat)

networkd should be a tool that is part of the core of the OS, so can’t assume much about the environment or the use cases. Should be fast and small – for containers, boot speed matters a lot. Powerful declarative configuration – but mostly static. Behaviour should be uniform and predictable.

networkd configuration is static, so not changing configuration at runtime.

udev applies configuration from .link files when a network interface appears. It overrides kernel defaults. This happens before the device is announced. This used to be done with udev rules, but the link files are simpler. It’s an INI file with a [Match] section and a [Link] section. Only one .link file is matched.

.netdev files configure new virtual devices in the kernel: bridge, vlan, tun, … That again has a [Match] and [NetDev] section. The [Match] section matches on the host, not on the device because there is no device :-). It only deals with the creation, e.g. for a bridge, no NICs are added to it.

.network files configure the physical and virtual devices created above. It gives static IP address or DHCP or IPv4LL or LLDP or all of them. Some of the configuration is not used by networkd itself, just announced. E.g. DNS config is announced to the resolver which is a separate component.

sd-network is a C library for introspecting the network configuration, and a DBus interface is coming (depends on kdbus because there is no dbus in the initrd). Also runtime configuration is for the future. Also integrating with BlueZ and wpa_supplicant.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s