Skip to content

Systemd-networkd

Debian wiki: Systemd-netword

Show inferface status:

networkctl status -a

Migrate from /etc/network/interfaces to systemd-networkd

Create a .link file i.e. /etc/systemd/network/20-wired.link. Be sure to get the unspoofed MAC address of the NIC!

[Match]
MACAddress=a1:b2:c3:d4:e5:f6

[Link]
AlternativeName=homelan

Create a .network file, i.e. /etc/systemd/network/20-wired.network:

DHCP example config:

[Match]
Name=enx920009b297b0

[Network]
DHCP=ipv4
Domains=local.example.org example.org

Static IP config:

[Match]
Name=eth0

[Network]
Address=10.27.64.131/29
Gateway=10.27.64.130
DNS=10.43.0.10
DNS=195.190.28.82
Domains=local.example.org example.org

See also How to Configure IPv6 with systemd-networkd

Cleanup:

systemctl enable systemd-networkd
systemctl start systemd-networkd
systemctl status systemd-networkd
sudo apt purge dhcpcd5 isc-dhcp-client isc-dhcp-common network-manager ifupdown
rm -rf /etc/network