I am on Debian testing/strech. I looked at Is that possible for debian users to connect to network through systemd-networkd? and did the same things.
[$] cat /etc/systemd/network/wired.network
[Match]
Name=eth0
[Network]
DHCP=ipv4
DNS=8.8.8.8
DNS=8.8.4.4
[DHCP]
RouteMetric=10%
[$] sudo systemctl start systemd-resolved
[$] sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
[$] sudo systemctl enable systemd-networkd systemd-resolved
Created symlink /etc/systemd/system/multi-user.target.wants/systemd-networkd.service → /lib/systemd/system/systemd-networkd.service.
Created symlink /etc/systemd/system/sockets.target.wants/systemd-networkd.socket → /lib/systemd/system/systemd-networkd.socket.
Created symlink /etc/systemd/system/multi-user.target.wants/systemd-resolved.service → /lib/systemd/system/systemd-resolved.service.
[$] sudo mv /etc/xdg/autostart/nm-applet.desktop /etc/xdg/autostart/nm-applet-desktop
and finally -
[$] sudo systemctl status systemd-networkd
● systemd-networkd.service - Network Service
Loaded: loaded (/lib/systemd/system/systemd-networkd.service; enabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:systemd-networkd.service(8)
any idea what is wrong here ? Why systemd-networkd.service is being shown as dead ?
Update - rebooted the system and had to an -
$ sudo ifdown eth0
and then -
$ sudo ifup eth0
and then these two things show up beautifully -
[$] sudo systemctl status systemd-networkd
[sudo] password for shirish:
● systemd-networkd.service - Network Service
Loaded: loaded (/lib/systemd/system/systemd-networkd.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2016-11-07 20:44:52 IST; 5min ago
Docs: man:systemd-networkd.service(8)
Main PID: 764 (systemd-network)
Status: "Processing requests..."
Tasks: 1 (limit: 4915)
CGroup: /system.slice/systemd-networkd.service
└─764 /lib/systemd/systemd-networkd
[$] sudo systemctl status systemd-resolved
● systemd-resolved.service - Network Name Resolution
Loaded: loaded (/lib/systemd/system/systemd-resolved.service; enabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/systemd-resolved.service.d
└─resolvconf.conf
Active: active (running) since Mon 2016-11-07 20:44:54 IST; 5min ago
Docs: man:systemd-resolved.service(8)
http://www.freedesktop.org/wiki/Software/systemd/resolved
http://www.freedesktop.org/wiki/Software/systemd/writing-network-configuration-managers
http://www.freedesktop.org/wiki/Software/systemd/writing-resolver-clients
Process: 962 ExecStartPost=/bin/sh -c [ ! -e /run/resolvconf/enable-updates ] || echo "nameserver 127.0.0.53" | /sbin/resolvconf -a systemd-re
Main PID: 896 (systemd-resolve)
Status: "Processing requests..."
Tasks: 1 (limit: 4915)
CGroup: /system.slice/systemd-resolved.service
└─896 /lib/systemd/systemd-resolved
I guess this worked out. The system is a dated workstation and hence has no wireless networking chip either on the motherboard or support on the chip itself hence didn't do anything about wpa_supplicant.
systemctl start systemd-networkdthen verify thestatusenablecreates the symlinks that ensure the service is run the next time systemd starts (usually on reboot),startstarts the service immediately. Usesystemctl enable --nowto do both.--nowswitch doesn't seem to work.