Debian 13 Network Configuration: ifupdown vs systemd-networkd vs NetworkManager vs netplan, and Which One Is Running

“How do I set a static IP on Debian?” has at least four correct answers, and which one works depends on what is managing the interface. Most of the confusion I see is somebody editing /etc/network/interfaces on a machine where that file is never read.

I checked a fresh Debian 13 (trixie) cloud image on my test VM to see what is really in charge, then configured the same address and route two ways.

First, find out who owns the interface

Before changing anything, ask the system:

$ networkctl list --no-pager
IDX LINK TYPE     OPERATIONAL SETUP
  1 lo   loopback carrier     unmanaged
  2 eth0 ether    routable    configured

$ networkctl status eth0 --no-pager | sed -n 1,5p
● 2: eth0
                   Link File: /run/systemd/network/10-netplan-eth0.link
                Network File: /run/systemd/network/10-netplan-eth0.network
                       State: routable (configured)

configured means systemd-networkd is managing the link. unmanaged means it is not, which is fine for lo, and is a clue elsewhere that something else owns that link. The Network File line tells you exactly which file drives it.

Then the services and packages:

systemd-networkd: enabled active
NetworkManager: not-found inactive
networking: not-found inactive
systemd-resolved: enabled active
cloud-init-network: enabled active

ii cloud-init 25.1.4-1+deb13u1
ii netplan.io 1.1.2-7
ii systemd-resolved 257.13-1~deb13u1
un ifupdown <none>
un network-manager <none>

On this image:

  • ifupdown is not installed. /etc/network/interfaces exists but contains only a comment and a source line, and nothing reads it.
  • network-manager is not installed.
  • systemd-networkd is active, configured through netplan, which cloud-init wrote.

Where the config actually comes from

cloud-init generates /etc/netplan/50-cloud-init.yaml at first boot:

network:
  version: 2
  ethernets:
    eth0:
      match:
        macaddress: "bc:24:11:1b:52:2b"
      dhcp4: true
      set-name: "eth0"

netplan is only a translator here. It renders that YAML into systemd-networkd files under /run/systemd/network/ (the 10-netplan-eth0.network and .link that networkctl pointed at). /etc/systemd/network/ is empty. Note the files are in /run, so they are rebuilt from the YAML at every boot and any hand edit there is lost.

$ sudo netplan get
network:
  version: 2
  ethernets:
    eth0:
      match:
        macaddress: "bc:24:11:1b:52:2b"
      dhcp4: true
      set-name: "eth0"

$ netplan status eth0
●  2: eth0 ethernet UP (networkd: eth0)

netplan status names the backend in brackets: networkd: eth0. If you ever see NetworkManager: there instead, that is your answer.

DNS is a similar chain. /etc/resolv.conf is a symlink to systemd-resolved’s stub file, and the real servers are visible with resolvectl status eth0:

Current DNS Server: 192.168.11.1
DNS Servers: 192.168.11.1

Editing /etc/resolv.conf by hand on this image gets overwritten.

One more cloud-init detail. It will regenerate the netplan file on boot unless told not to. If you want to take over the network config yourself, create /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg containing network: {config: disabled}. Otherwise your YAML edits may be quietly replaced.

The same config, two ways

To compare fairly without touching the management interface, I used dummy interfaces. The goal in both cases: a static address and a route to a remote network via a gateway.

systemd-networkd

sudo ip link add dummy0 type dummy
sudo tee /etc/systemd/network/30-dummy0.network <<'EOF'
[Match]
Name=dummy0

[Network]
Address=10.77.0.1/24

[Route]
Destination=10.88.0.0/16
Gateway=10.77.0.254
EOF
sudo networkctl reload
15 dummy0 ether    routable    configured

inet 10.77.0.1/24 brd 10.77.0.255 scope global dummy0
10.88.0.0/16 via 10.77.0.254 dev dummy0 proto static

networkctl reload re-reads the files without a reboot, and the link shows configured, with Network File: /etc/systemd/network/30-dummy0.network. Files in /etc/systemd/network/ take priority over the generated ones in /run. Route proto static is how networkd labels what it installed.

ifupdown

ifupdown is one apt install ifupdown away:

sudo apt install ifupdown

Installing it on its own changes nothing for eth0. networking.service becomes enabled, but only configures interfaces listed in /etc/network/interfaces, and there are none. A stanza for the same job:

sudo ip link add dummy1 type dummy
sudo tee /etc/network/interfaces.d/dummy1 <<'EOF'
iface dummy1 inet static
    address 10.78.0.1/24
    up ip route add 10.89.0.0/16 via 10.78.0.254
EOF
sudo ifup dummy1
inet 10.78.0.1/24 brd 10.78.0.255 scope global dummy1
10.78.0.0/24 dev dummy1 proto kernel scope link src 10.78.0.1
10.89.0.0/16 via 10.78.0.254 dev dummy1

It works, with a difference you can see in the output of networkctl:

16 dummy1 ether    routable    unmanaged

systemd-networkd sees the link, reports it routable, and leaves it unmanaged. That is the clean coexistence rule: networkd manages only links that match a .network file, and ifupdown manages only links named in /etc/network/interfaces. The trouble starts when both claim one interface, or when you edit the file for the stack that is not running.

I removed ifupdown afterwards, and eth0 stayed configured throughout.

Which should you use?

SituationMy choice
Cloud or Proxmox cloud-init imageLeave netplan and networkd as shipped. Use the YAML or a .network file in /etc/systemd/network/
Server you configure by handsystemd-networkd. One mechanism, files, and networkctl tells you the truth
Old habits and existing scriptsifupdown works, and the up and post-up hooks are easy to read, but you must install it and make sure nothing else claims the link
Laptop with Wi-Fi, VPNs, roamingNetworkManager, which is built for that

I did not install or start NetworkManager for this post. Starting it on a live VM risks it grabbing eth0, and it was not part of the image, so there is nothing about it here I can vouch for from testing. The one rule I will pass on is the same as above: check which stack owns the link before you touch anything.

The 30 second diagnosis

networkctl list --no-pager          # configured or unmanaged?
networkctl status eth0 --no-pager   # which Network File?
netplan status eth0                 # which backend?
systemctl is-active systemd-networkd NetworkManager networking
ls /etc/systemd/network /etc/netplan /etc/network/interfaces.d

If you can answer “who owns this link?” from those five lines, the rest is just syntax.