Pcornel
Linux · Linux Networking

systemd-networkd

Cheat sheet · https://pcornel.dk/topic.php?topic=2782

Back to the Topic

Answer

systemd-networkd configures interfaces from .network, .netdev and .link files in /etc/systemd/network/. It is the server backend for Netplan and works on its own on minimal systems.

Remember

A .network file applies to interfaces matched in [Match]. Virtual devices (VLAN, bond, bridge) are created by .netdev files. networkctl reload re-reads files. Pair with systemd-resolved for DNS.

First checks

  • ip -br addr — interfaces and addresses
  • ip route — routing table and default route
  • ip neigh — ARP/neighbour cache
  • ip route get <dest> — route, interface and source chosen for a destination
  • nmcli device status / networkctl — which tool manages each interface

Verify in this order

.link names the device → .netdev creates virtual devices → .network matched → addresses/routes applied → state configured

Where it usually breaks

First mismatch in link/interface → address/namespace → route/neighbor → firewall/policy → socket/daemon → DNS/TLS/SSH/application peer path; preserve identity/native diagnostic/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2782

Confirmation

Confirm action

Continue?