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




[$] 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
   Active: active (running) since Mon 2016-11-07 20:44:54 IST; 5min ago
     Docs: man:systemd-resolved.service(8)
  Process: 962 ExecStartPost=/bin/sh -c [ ! -e /run/resolvconf/enable-updates ] || echo "nameserver" | /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.

  • 1
    Run systemctl start systemd-networkd then verify the status – GAD3R Nov 7 '16 at 15:14
  • 1
    @GAD3R actually rebooted and at least it seems to run fine atm. Will know in a day or two. – shirish Nov 7 '16 at 15:24
  • 2
    enable creates the symlinks that ensure the service is run the next time systemd starts (usually on reboot), start starts the service immediately. Use systemctl enable --now to do both. – jasonwryan Nov 7 '16 at 15:32
  • That actually didn't work. See paste.debian.net/893326 for more. Maybe some configuration file is missing, dunno. While I shouldn't need it, it doesn't seem to have any harm to have that as a service. --now switch doesn't seem to work. – shirish Nov 7 '16 at 15:49
  • @jasonwryan see above. – shirish Nov 7 '16 at 16:29

Edit the file: /etc/systemd/resolved.conf

#  This file is part of systemd.
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
# See resolved.conf(5) for details

#DNS= ajouter votre nom de domaine ici
#FallbackDNS= votre ip
#Domains= votre domaine

then type:

$ systemctl start  systemd-resolved.service 
$ systemctl status systemd-networkd systemd-resolved

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.