在 Fedora-38 上,路由表 (ip r) 不断变空。我可以通过重新启动 NetworkManager (systemctl restart NetworkManager) 来解决这个问题,只需几分钟。需要永久修复它。有什么建议吗?
观察到的其他怪异现象... 有时,我可以找到 (nmcli dev wifi) 同一 2.4GHz WiFi 网络的两个 BSSID。这是什么原因造成的?
$ nmcli con show
NAME UUID TYPE DEVICE
3c58ac2.4 e45b3590-2220-4dbd-8d0e-1ee7b0fdfd30 wifi wlp5s0
enp9s0 db7b61ca-c55d-39a0-bd3d-1b6bb4d3319e ethernet enp9s0
enp8s0 44801890-09c3-31eb-a8aa-9f21d0b17aa9 ethernet enp8s0
lo 066efe99-1082-4b10-b7f7-8edb641530dd loopback lo
3c58ac5 50615f69-30fd-411a-b3bd-39e0858e30a6 wifi --
$ nmcli dev status
DEVICE TYPE STATE CONNECTION
lo loopback connected (externally) lo
wlp5s0 wifi connecting (getting IP configuration) 3c58ac2.4
enp8s0 ethernet connecting (getting IP configuration) enp9s0
enp9s0 ethernet connecting (getting IP configuration) enp8s0
p2p-dev-wlp5s0 wifi-p2p disconnected
您看不到的是所有三个接口(wlp5s0、enp8s0、enp9s0)都显示为棕色(大概是因为它们都在“获取 IP 配置”。有时当它们都为棕色时,就可以访问互联网,决定因素似乎是内核具有非空路由表(ip r)。
NetworkManager 不断发送通知,称由于 IP 配置不可用,接口已被停用。
网络接口已在系统设置连接中(完全?)配置,并为每个接口指定了路由器和一对 Google DNS 服务器。
更新:1) LAN 接口现在确实处于绿色状态(并且不再显示“获取 IP 配置”,但 WiFi 接口却没有随之变化。2) 路由表仍然会自动重置(原因不明)。有时重新启动 NetworkManager 不足以恢复路由表,我必须重新启动接口(我在重置 NetworkManager 之前这样做)。
我错过了什么?
以下是一些日志文件摘录...
$ systemctl status NetworkManager
Jul 15 23:30:28 Level10 NetworkManager[1854614]: <info> [1689489028.6690] device (wlp5s0): supplicant interface state: inactive -> scanning
Jul 15 23:30:28 Level10 NetworkManager[1854614]: <info> [1689489028.6690] device (p2p-dev-wlp5s0): supplicant management interface state: inactive -> scanning
Jul 15 23:30:53 Level10 NetworkManager[1854614]: <warn> [1689489053.9743] device (wlp5s0): Activation: (wifi) association took too long, failing activation
Jul 15 23:30:53 Level10 NetworkManager[1854614]: <info> [1689489053.9744] device (wlp5s0): state change: config -> failed (reason 'ssid-not-found', sys-iface-state: 'managed')
Jul 15 23:30:53 Level10 NetworkManager[1854614]: <info> [1689489053.9748] manager: NetworkManager state is now CONNECTED_LOCAL
Jul 15 23:30:53 Level10 NetworkManager[1854614]: <info> [1689489053.9927] device (wlp5s0): set-hw-addr: set MAC address to 46:C8:DC:B1:46:65 (scanning)
Jul 15 23:30:53 Level10 NetworkManager[1854614]: <warn> [1689489053.9969] device (wlp5s0): Activation: failed for connection '3c58ac5'
Jul 15 23:30:53 Level10 NetworkManager[1854614]: <info> [1689489053.9970] device (wlp5s0): supplicant interface state: scanning -> disconnected
Jul 15 23:30:53 Level10 NetworkManager[1854614]: <info> [1689489053.9970] device (p2p-dev-wlp5s0): supplicant management interface state: scanning -> disconnected
Jul 15 23:30:53 Level10 NetworkManager[1854614]: <info> [1689489053.9973] device (wlp5s0): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
$ journalctl -b -u NetworkManager -n 40
Jul 15 23:35:31 Level10 NetworkManager[1854614]: <warn> [1689489331.3181] device (wlp5s0): Activation: failed for connection '3c58ac2.4'
Jul 15 23:35:31 Level10 NetworkManager[1854614]: <info> [1689489331.3188] device (wlp5s0): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
Jul 15 23:35:31 Level10 NetworkManager[1854614]: <info> [1689489331.3358] dhcp4 (wlp5s0): canceled DHCP transaction
Jul 15 23:35:31 Level10 NetworkManager[1854614]: <info> [1689489331.3359] dhcp4 (wlp5s0): activation: beginning transaction (timeout in 45 seconds)
Jul 15 23:35:31 Level10 NetworkManager[1854614]: <info> [1689489331.3359] dhcp4 (wlp5s0): state changed no lease
Jul 15 23:35:31 Level10 NetworkManager[1854614]: <info> [1689489331.3739] device (wlp5s0): supplicant interface state: completed -> disconnected
Jul 15 23:35:31 Level10 NetworkManager[1854614]: <info> [1689489331.3739] device (p2p-dev-wlp5s0): supplicant management interface state: completed -> disconnected****