systemctl status systemd-networkd aparecendo como morto

1

Estou no teste Debian / strech. Eu olhei para que possível para os usuários do Debian se conectarem à rede através do systemd-networkd? e fizeram as mesmas coisas.

[$] 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

e finalmente -

[$] 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)

alguma ideia do que está errado aqui? Por que o systemd-networkd.service está sendo mostrado como morto?

Atualização - reiniciou o sistema e teve que um -

$ sudo ifdown eth0

e depois -

$ sudo ifup eth0

e então essas duas coisas aparecem lindamente -

[$] 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

Eu acho que isso funcionou. O sistema é uma estação de trabalho datada e, portanto, não possui chip de rede sem fio na placa-mãe ou no próprio chip, por isso não fez nada sobre wpa_supplicant .

    
por shirish 07.11.2016 / 16:01

1 resposta

-1

Edite o arquivo: /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

digite:

$ systemctl start  systemd-resolved.service 
$ systemctl status systemd-networkd systemd-resolved
    
por 18.08.2018 / 14:16