更新1

更新1

我正在运行 Arch Linux。在 dmesg 中我有以下消息:

[    3.225860] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    8.405807] e1000e: eth0 NIC Link is Down
[   39.495793] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   44.679494] e1000e: eth0 NIC Link is Down
[  110.525785] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[  115.709482] e1000e: eth0 NIC Link is Down
[  344.245735] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

我确实在此链接上使用 IPv6(它连接到电缆调制解调器),并且我确实需要此链接准备就绪。请注意,“未准备好”并不是一个短暂的问题。在我手动调出它之前,它根本没有准备好。

雷击后我不得不更换主板。执行此操作后,eth0(主板上的)不会自动出现,但 Intel PCI 卡(以太网服务器适配器 I340-T4)上的 4 个端口会自动出现。该主板具有 Intel 以太网 (I219-V)。 (请参阅下面的 lspci 输出。)

我尝试了以下操作但没有成功:

netctl reenable eth0-profile

该链接仍然无法自动出现。ip a显示此链接已关闭。netctl status显示失败:

netctl status eth0-profile
● netctl@eth0\x2dprofile.service - WAN
Loaded: loaded (/etc/systemd/system/netctl@eth0\x2dprofile.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2017-06-28 02:14:27 EDT; 11min ago
    Docs: man:netctl.profile(5)
Process: 329 ExecStart=/usr/lib/network/network start %I (code=exited, status=1/FAILURE)
Main PID: 329 (code=exited, status=1/FAILURE)

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

手动运行下一个命令会不是给予成功:

netctl start eth0-profile

该系统有绝不有一个启用的 systemd 单元[电子邮件受保护](甚至是通用的全接口 dhcpcd 服务)。如果这能解决问题,我并不反对添加一个,但以前没有它就可以工作,我想回到之前的状态。 (我有 btrfs 快照,但我不想回滚。我想了解发生了什么并进行更正,以便我从中学到一些东西。)

要解决我的链接问题,我必须运行以下命令。

sudo ip link set eth0 up
sudo dhcpcd -n eth0
sudo systemctl restart dnsmasq

一旦我运行这些命令,一切都很好。由于某种原因,它只是没有自动启动。运行这些命令时,我注意到这ip link set eth0 up需要很长时间。有时我必须运行多次。

更新1

/etc/netctl/eth0-配置文件:

Description='WAN'
Interface=eth0
Connection=ethernetvpn
IP='dhcp'

lspci-v

00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (2) I219-V (rev 31)
        Subsystem: ASUSTeK Computer Inc. Device 8672
        Flags: bus master, fast devsel, latency 0, IRQ 143
        Memory at f7400000 (32-bit, non-prefetchable) [size=128K]
        Capabilities: [c8] Power Management version 3
        Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Capabilities: [e0] PCI Advanced Features
        Kernel driver in use: e1000e
        Kernel modules: e1000e

01:00.0 Ethernet controller: Intel Corporation 82580 Gigabit Network Connection (rev 01)
        Subsystem: Intel Corporation Ethernet Server Adapter I340-T4
        Flags: bus master, fast devsel, latency 0, IRQ 16
        Memory at f7180000 (32-bit, non-prefetchable) [size=512K]
        Memory at f720c000 (32-bit, non-prefetchable) [size=16K]
        Capabilities: [40] Power Management version 3
        Capabilities: [50] MSI: Enable- Count=1/1 Maskable+ 64bit+
        Capabilities: [70] MSI-X: Enable+ Count=10 Masked-
        Capabilities: [a0] Express Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [140] Device Serial Number 00-1b-2c-3d-4e-5f-6a-7b
        Capabilities: [1a0] Transaction Processing Hints
        Capabilities: [1c0] Latency Tolerance Reporting
        Kernel driver in use: igb
        Kernel modules: igb

01:00.1 Ethernet controller: Intel Corporation 82580 Gigabit Network Connection (rev 01)
        Subsystem: Intel Corporation Ethernet Server Adapter I340-T4
        Flags: bus master, fast devsel, latency 0, IRQ 17
        Memory at f7100000 (32-bit, non-prefetchable) [size=512K]
        Memory at f7208000 (32-bit, non-prefetchable) [size=16K]
        Capabilities: [40] Power Management version 3
        Capabilities: [50] MSI: Enable- Count=1/1 Maskable+ 64bit+
        Capabilities: [70] MSI-X: Enable+ Count=10 Masked-
        Capabilities: [a0] Express Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [140] Device Serial Number 00-1b-2c-3d-4e-5f-6a-7b
        Capabilities: [1a0] Transaction Processing Hints
        Kernel driver in use: igb
        Kernel modules: igb

01:00.2 Ethernet controller: Intel Corporation 82580 Gigabit Network Connection (rev 01)
        Subsystem: Intel Corporation Ethernet Server Adapter I340-T4
        Flags: bus master, fast devsel, latency 0, IRQ 18
        Memory at f7080000 (32-bit, non-prefetchable) [size=512K]
        Memory at f7204000 (32-bit, non-prefetchable) [size=16K]
        Capabilities: [40] Power Management version 3
        Capabilities: [50] MSI: Enable- Count=1/1 Maskable+ 64bit+
        Capabilities: [70] MSI-X: Enable+ Count=10 Masked-
        Capabilities: [a0] Express Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [140] Device Serial Number 00-1b-2c-3d-4e-5f-6a-7b
        Capabilities: [1a0] Transaction Processing Hints
        Kernel driver in use: igb
        Kernel modules: igb

01:00.3 Ethernet controller: Intel Corporation 82580 Gigabit Network Connection (rev 01)
        Subsystem: Intel Corporation Ethernet Server Adapter I340-T4
        Flags: bus master, fast devsel, latency 0, IRQ 19
        Memory at f7000000 (32-bit, non-prefetchable) [size=512K]
        Memory at f7200000 (32-bit, non-prefetchable) [size=16K]
        Capabilities: [40] Power Management version 3
        Capabilities: [50] MSI: Enable- Count=1/1 Maskable+ 64bit+
        Capabilities: [70] MSI-X: Enable+ Count=10 Masked-
        Capabilities: [a0] Express Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [140] Device Serial Number 00-1b-2c-3d-4e-5f-6a-7b
        Capabilities: [1a0] Transaction Processing Hints
        Kernel driver in use: igb
        Kernel modules: igb

更新2

我还没有找到解决办法。将这两行添加到 /etc/netctl/eth0-profile 中似乎暂时解决了这个问题,但问题又回来了。

TimeoutUp=300
TimeoutCarrier=300

我发现了一些新信息。最近一次启动后,日志显示以下问题:

Sep 12 03:38:26 arch2 network[358]: Duplicate Address Detection is taking too long on interface 'eth0'
Sep 12 03:38:27 arch2 network[358]: Failed to bring the network up for profile 'eth0-profile'
Sep 12 03:38:27 arch2 dhcpcd[588]: script_runreason: /usr/lib/dhcpcd/dhcpcd-run-hooks: Terminated

我可以这样启动网络:

# netctl restart eth0-profile

之后,一切正常。但是,我想找到并解决根本问题。

这是 systemctl status“netctl@eth0\x2dprofile.service”的输出

● netctl@eth0\x2dprofile.service - ETH0
Loaded: loaded (/etc/systemd/system/netctl@eth0\x2dprofile.service; enabled; vendor preset: disabled)
Active: active (exited) since Tue 2017-09-12 03:47:54 EDT; 36s ago
    Docs: man:netctl.profile(5)
Process: 870 ExecStart=/usr/lib/netctl/network start eth0-profile (code=exited, status=0/SUCCESS)
Main PID: 870 (code=exited, status=0/SUCCESS)
Status: "online"
    Tasks: 2 (limit: 4915)
CGroup: /system.slice/system-netctl.slice/netctl@eth0\x2dprofile.service
        ├─ 963 dhcpcd -4 -q -t 30 -L eth0
        └─1070 dhcpcd -6 -q -t 30 eth0

Sep 12 03:47:59 arch2 dhcpcd[1050]: eth0: soliciting an IPv6 router
Sep 12 03:47:59 arch2 dhcpcd[1050]: eth0: Router Advertisement from ff00::bbda:ffff:fe44:2dee
Sep 12 03:47:59 arch2 dhcpcd[1050]: eth0: adding address 2001:333:300:1c6:dd09:189b:cf5b:bbbb/64
Sep 12 03:47:59 arch2 dhcpcd[1050]: eth0: adding route to 2601:343:380:1f6::/64
Sep 12 03:47:59 arch2 dhcpcd[1050]: eth0: adding default route via ff00::bbda:ffff:fe44:2dee
Sep 12 03:47:59 arch2 dhcpcd[1050]: forked to background, child pid 1070
Sep 12 03:47:59 arch2 dhcpcd[1070]: eth0: confirming prior DHCPv6 lease
Sep 12 03:47:59 arch2 network[870]: Started network profile 'eth0-profile'
Sep 12 03:48:09 arch2 dhcpcd[1070]: eth0: failed to confirm prior address
Sep 12 03:48:09 arch2 dhcpcd[1070]: eth0: soliciting a DHCPv6 lease

答案1

我的解决方案相当简单。我将这两行添加到 /etc/netctl/eth0-profile 中:

TimeoutUp=300
TimeoutCarrier=300

答案2

我的解决方案是将以下行添加到此接口的 netctl 配置文件(在 /etc/netctl 中):

SkipDAD=yes

系统启动速度比以往任何时候都快,并且错误均已解决。

这是一个通过一根以太网电缆直接连接到电缆调制解调器的盒子。这就是整个网络,永远不会有其他系统连接。所以 DAD 没有任何有用的目的,据我所知。但它造成了真正的问题。跳过 DAD 对我来说很有意义,尽管我确信有人会说这是错误的解决方案。这是我在过去 3 个月中找到的最佳解决方案,它使系统的启动效果比以往任何时候都好。

相关内容