Я установил Debian 8 на Gigabyte Brix Pro, и все, кажется, работает правильно, за исключением сети.
Я включил systemd-networkd.service
отключил networking.service
и создали соответствующие network
файлы в / и /etc/systemd/network
Я настроил и включил wpasupplicant
для беспроводного адаптера.
Когда система загружается, она находит файл wlan0.network
, запускает интерфейс, обнаруживает ссылку и работает отлично, но по какой-то причине не видит (или не регистрирует, что видит) созданный мной файл eth0.network
, Он не обнаруживает ссылку и вообще не вызывает eth0
.
После полной загрузки системы я могу запустить systemctl restart systemd-networkd.service
или ifup eth0
и он включит интерфейс и правильно настроит его, после чего он будет работать нормально. Это просто не поднимет это при загрузке.
/etc/systemd/network/wlan0.network
[Match]
Name=wlan0
[Network]
Address=192.168.1.21/24
DNS=192.168.1.1
/etc/systemd/network/eth0.network
[Match]
Name=eth0
[Network]
Address=192.168.1.10/24
Gateway=192.168.1.1
DNS=192.168.1.1
IP-ссылка
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether fc:aa:14:db:cf:40 brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
link/ether dc:85:de:ee:96:af brd ff:ff:ff:ff:ff:ff
lspci -v
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)
Subsystem: Gigabyte Technology Co., Ltd Motherboard
Flags: bus master, fast devsel, latency 0, IRQ 43
I/O ports at d000 [size=256]
Memory at f7c00000 (64-bit, non-prefetchable) [size=4K]
Memory at f0000000 (64-bit, prefetchable) [size=16K]
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
Capabilities: [70] Express Endpoint, MSI 01
Capabilities: [b0] MSI-X: Enable- Count=4 Masked-
Capabilities: [d0] Vital Product Data
Capabilities: [100] Advanced Error Reporting
Capabilities: [140] Virtual Channel
Capabilities: [160] Device Serial Number 01-00-00-00-68-4c-e0-00
Capabilities: [170] Latency Tolerance Reporting
Kernel driver in use: r8168
journalctl
kernel: r8168 Gigabit Ethernet driver 8.040.00-NAPI loaded
kernel: r8168 0000:03:00.0: irq 43 for MSI/MSI-X
...
kernel: r8168: This product is covered by one or more of the following patents: US6,570,884, US6,115,776, and US6,327,625.
kernel: r8168 Copyright (C) 2015 Realtek NIC software team <nicfae@realtek.com>
This program comes with ABSOLUTELY NO WARRANTY; for details, please see <http://www.gnu.org/licenses/>.
This is free software, and you are welcome to redistribute it under certain conditions; see <http://www.gnu.org/licenses/>.
...
systemd-networkd[456]: wlan0 : link 3 added
systemd-networkd[456]: wlan0 : udev initialized link
systemd-networkd[456]: wlan0 : flags change: +UP +RUNNING +MULTICAST +BROADCAST
systemd-networkd[456]: wlan0 : flags change: -RUNNING
systemd-networkd[456]: Sent message type=method_call sender=n/a destination=org.freedesktop.DBus object=/org/freedesktop/DBus interface=org.freedesktop.DBus member=H
systemd-networkd[456]: sd-rtnl: discarding 20 bytes of incoming message
systemd-networkd[456]: wlan0 : link state is up-to-date
systemd-networkd[456]: wlan0 : found matching network '/etc/systemd/network/wlan0.network'
systemd-networkd[456]: wlan0 : enslaved
systemd-networkd[456]: wlan0 : setting addresses
systemd-networkd[456]: Got message type=method_return sender=org.freedesktop.DBus destination=:1.2 object=n/a interface=n/a member=n/a cookie=1 reply_cookie=1 error=
systemd-networkd[456]: Got message type=signal sender=org.freedesktop.DBus destination=:1.2 object=/org/freedesktop/DBus interface=org.freedesktop.DBus member=NameAc
systemd-networkd[456]: sd-rtnl: discarding 20 bytes of incoming message
systemd-networkd[456]: rtnl: received address for a nonexistent link, ignoring
systemd-networkd[456]: rtnl: received address for a nonexistent link, ignoring
systemd-networkd[456]: wlan0 : added address: 192.168.1.21/24
systemd-networkd[456]: wlan0 : addresses set
systemd-networkd[456]: wlan0 : link configured
systemctl status systemd-networkd.service (с момента загрузки)
systemd-networkd[456]: sd-rtnl: discarding 20 bytes of incoming message
systemd-networkd[456]: rtnl: received address for a nonexistent link, ignoring
systemd-networkd[456]: rtnl: received address for a nonexistent link, ignoring
systemd-networkd[456]: wlan0 : added address: 192.168.1.21/24
systemd-networkd[456]: wlan0 : addresses set
systemd-networkd[456]: wlan0 : link configured
systemd-networkd[456]: wlan0 : flags change: +LOWER_UP
systemd-networkd[456]: wlan0 : flags change: +RUNNING
systemd-networkd[456]: wlan0 : gained carrier
systemd-networkd[456]: wlan0 : added address: fe80::de85:deff:feee:96af/64
systemctl status systemd-networkd.service (после перезапуска networkd)
systemd-networkd[877]: wlan0 : link configured
systemd-networkd[877]: eth0 : flags change: +UP
systemd-networkd[877]: eth0 : added address: 192.168.1.10/24
systemd-networkd[877]: eth0 : addresses set
systemd-networkd[877]: eth0 : setting routes
systemd-networkd[877]: eth0 : routes set
systemd-networkd[877]: eth0 : link configured
systemd-networkd[877]: eth0 : flags change: +LOWER_UP +RUNNING
systemd-networkd[877]: eth0 : gained carrier
systemd-networkd[877]: eth0 : added address: fe80::feaa:14ff:fedb:cf40/64
Какую другую информацию я должен предоставить, чтобы помочь найти решение этой проблемы?
ОБНОВИТЬ
Добавление следующих строк в /etc/network/interfaces
и включение networking.service
решает проблему, и все появляется при загрузке, но я бы не стал использовать старую систему init.d. Я хочу использовать новый systemd-networkd, и я хотел бы знать, почему это происходит в этой среде.
auto eth0
iface eth0 inet static
address 192.168.1.10
netmask 255.255.255.0
gateway 192.168.1.1
РЕДАКТИРОВАТЬ
wpa_supplicant.service
отсутствует, потому что с тех пор я его отключил, и networking.service
служба включена, потому что это единственное, что в данный момент работает.
Сервис systemctl -t
UNIT LOAD ACTIVE SUB DESCRIPTION
acpid.service loaded active running ACPI event daemon
atd.service loaded active running Deferred execution scheduler
console-setup.service loaded active exited LSB: Set console font and keymap
cron.service loaded active running Regular background program processing daemon
dbus.service loaded active running D-Bus System Message Bus
exim4.service loaded active running LSB: exim Mail Transport Agent
getty@tty1.service loaded active running Getty on tty1
kbd.service loaded active exited LSB: Prepare console
keyboard-setup.service loaded active exited LSB: Set preliminary keymap
kmod-static-nodes.service loaded active exited Create list of required static device nodes for the current kernel
lm-sensors.service loaded active exited Initialize hardware monitoring sensors
networking.service loaded active exited LSB: Raise network interfaces.
nfs-common.service loaded active exited LSB: NFS support files common to client and server
rc-local.service loaded active exited /etc/rc.local Compatibility
rpcbind.service loaded active running LSB: RPC portmapper replacement
rsyslog.service loaded active running System Logging Service
ssh.service loaded active running OpenBSD Secure Shell server
systemd-backlight@backlight:acpi_video0.service loaded active exited Load/Save Screen Backlight Brightness of backlight:acpi_video0
systemd-journald.service loaded active running Journal Service
systemd-logind.service loaded active running Login Service
systemd-modules-load.service loaded active exited Load Kernel Modules
systemd-networkd.service loaded active running Network Service
systemd-random-seed.service loaded active exited Load/Save Random Seed
systemd-remount-fs.service loaded active exited Remount Root and Kernel File Systems
systemd-resolved.service loaded active running Network Name Resolution
systemd-rfkill@rfkill0.service loaded active exited Load/Save RF Kill Switch Status of rfkill0
systemd-setup-dgram-qlen.service loaded active exited Increase datagram queue length
systemd-sysctl.service loaded active exited Apply Kernel Variables
systemd-tmpfiles-setup-dev.service loaded active exited Create Static Device Nodes in /dev
systemd-tmpfiles-setup.service loaded active exited Create Volatile Files and Directories
systemd-udev-trigger.service loaded active exited udev Coldplug all Devices
systemd-udevd.service loaded active running udev Kernel Device Manager
systemd-update-utmp.service loaded active exited Update UTMP about System Boot/Shutdown
systemd-user-sessions.service loaded active exited Permit User Sessions
udev-finish.service loaded active exited Copy rules generated while the root was ro