Systemd-networkd reports device as "unmanaged"

Hello, I decided to use networkd instead of NetworkManager on a new install. NetworkManager is uninstalled and systemd-networkd is enabled.

I have a configuration file

# /etc/systemd/network/wired.network
[Match]
Name=en*

[Network]
DHCP=yes

However when I start the system, networkctl reports

IDX LINK   TYPE    OPERATIONAL SETUP
  1 lo     looback carrier     unmanaged
  2 enp2s0 ether   off         unmanaged

I can bring it up with networkctl up enp2s0 and run dhclient to get

IDX LINK   TYPE    OPERATIONAL SETUP
  1 lo     looback carrier     unmanaged
  2 enp2s0 ether   routable    unmanaged

Now I at least have a working connection. However the interface remains “unmanaged” and the changes don’t persist through reboot. The man pages for systemd.network strongly imply that creating the wired.network file is all I should need to do, so I’m not sure what I’m doing wrong.

EDIT

I’ve updated the unit file according to an SO question to increase the verbosity of logs.

# /etc/systemd/system/systemd-networkd.service.d/10-debug.conf
[Service]
Environment=SYSTEMD_LOG_LEVEL=debug

Then after systemctl daemon-reload; systemctl restart systemd-networkd:

I can now see in the logs:

enp2s0: Saved new link: ifindex=2, iftype=ETHER(1), kind=n/a
enp2s0: Saved original MTU 1500 (min: 68, max:9194)
enp2s0: Saved permanent hardware address: 00:00:de:ad:be:ef
enp2s0: Saved IPv6 link-local address generation mode: eui64
enp2s0: Flags change: +MULTICAST +BROADCAST
enp2s0: udev initialized link
enp2s0: Found driver: r8169
enp2s0: Link state is up-to-date
enp2s0: State changed: pending -> initialized
enp2s0: Unmanaging interface
enp2s0: State changed: initialized -> unmanaged

Perhaps have a look here? (the Arch wiki)

This is where I started. Most of the same info as the man page, albeit a bit more readable.

What you did is enough.

I suggest you sync systemd-resolvconf then enable systemd-resolved to fully switch. Then remove openresolv package.

Just for clearing up lingering issues: did you reboot and/or restart the systemd-networkd service in the meantime?

I have resolved enabled, but hadn’t tried uninstalling openresolv. Unfortunately still getting “unmanaged” even after reboot.

Issue persists, so I asked for help on the systemd-devel mailing list.

Resolved: Networkd: `SYSTEMD_LOG_LEVEL=debug` does not provide enough information to diagnose network manager conflicts · Issue #34436 · systemd/systemd · GitHub

.network file was unreadable for systemd-network user. Set permissions to 644 followed by systemctl daemon-reload && systemctl restart systemd-networkd.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.