Skip to content

Static IP with systemd-networkd

Recent Raspberry Pi OS Lite images dropped dhcpcd and use systemd-networkd to manage interfaces. There are workarounds to put dhcpcd back, but they’re more trouble than they’re worth — systemd-networkd is well-supported, declarative, and ships with the OS.

The FR201’s PoE-capable port is eth0; the standard LAN port is eth1. The example below pins eth0 — swap the interface name if you wired into the other port.

  1. Create a network unit file in /etc/systemd/network/. The numeric prefix controls processing order — anything between 10- and 90- is fine for a single static config:

    Create the unit file
    sudo nano /etc/systemd/network/10-eth0-static.network
  2. Add the configuration. Replace the addresses with values that match your network:

    /etc/systemd/network/10-eth0-static.network
    [Match]
    Name=eth0
    [Network]
    Address=192.168.1.50/24
    Gateway=192.168.1.1
    DNS=192.168.1.1 1.1.1.1
  3. Save (Ctrl+O, Enter) and exit (Ctrl+X).

  4. Make sure systemd-networkd is enabled so the change survives a reboot, then restart it to apply:

    Enable and restart systemd-networkd
    sudo systemctl enable systemd-networkd
    sudo systemctl restart systemd-networkd
Show the address on eth0
ip addr show eth0

You can also ask networkctl for the high-level state of every managed interface:

Show interface status
networkctl status

A healthy result looks like State: routable (configured) with the address you set listed under Address:.

  • Both ports: if you want both Ethernet ports configured, create a second unit file (for example 10-eth1-static.network) with Name=eth1 and a different address.
  • DHCP fallback: replace the static Address= and Gateway= lines with DHCP=yes to revert to DHCP on a single interface without uninstalling anything.
  • Resolved DNS: on Lite images, systemd-resolved may not be enabled. If DNS lookups fail, install or enable it (sudo systemctl enable --now systemd-resolved) so the DNS= entries in your unit file are honored.