1

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.

7
  • 1
    Run systemctl start systemd-networkd then verify the status Commented Nov 7, 2016 at 15:14
  • 1
    @GAD3R actually rebooted and at least it seems to run fine atm. Will know in a day or two. Commented Nov 7, 2016 at 15:24
  • 3
    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. Commented Nov 7, 2016 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. Commented Nov 7, 2016 at 15:49
  • @jasonwryan see above. Commented Nov 7, 2016 at 16:29

1 Answer 1

-1

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

[Resolve]
#DNS= ajouter votre nom de domaine ici
#FallbackDNS= votre ip
#Domains= votre domaine
#LLMNR=yes
#DNSSEC=no

then type:

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

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.