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