systemctl status systemd-networkd가 죽은 것으로 표시됩니다.

systemctl status systemd-networkd가 죽은 것으로 표시됩니다.

저는 데비안 테스트/스트레치 작업을 하고 있습니다. 내가 찾고 있어요데비안 사용자가 systemd-networkd를 통해 네트워크에 연결할 수 있나요? 그리고 같은 일을 했습니다.

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

드디어--

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

여기서 무슨 일이 벌어지고 있는지 아시나요? systemd-networkd.service가 죽은 것처럼 보이는 이유는 무엇입니까?

업데이트 - 시스템을 다시 시작하고 다음을 수행해야 했습니다.

$ sudo ifdown eth0

그런 다음 -

$ sudo ifup eth0

그러자 이 두 가지가 완벽하게 나타났습니다——

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

나는 이것이 효과가 있다고 생각합니다. 시스템이 오래된 워크스테이션이라 마더보드에 무선 네트워킹 칩이 없고, 칩 자체에 지원이 없어 아무것도 하지 않는다 wpa_supplicant.

답변1

파일 편집:/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

그런 다음 다음을 입력하십시오.

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

관련 정보