Skip to content

Configuring Static IP Addresses

It is sometimes desirable to provide static IP configuration for network interface instead of relying on DHCP.

Using systemd-networkd

systemd-networkd is a system daemon that manages network configurations. It detects and configures network devices as they appear. systemd-networkd is an alternative network manager that can be used instead of ConnMann or NetworkManager. The network managers cannot coexist in the same Debian image, so enabling systemd-networkd requires disabling NetworkManager and ConnMan and rebuilding the image.

Create /etc/systemd/network/00-static.network with the following content:

[Match]
Name=eth0
[Network]
Address=192.168.1.100/24
Gateway=192.168.1.254
DNS=8.8.8.8 4.4.4.4

Restart systemd-networkd

# systemctl restart systemd-networkd