Ubuntu 22.04 在建立以太网连接时,手机、平板电脑和笔记本电脑等其他设备的 Wi-Fi 会断开

Ubuntu 22.04 在建立以太网连接时,手机、平板电脑和笔记本电脑等其他设备的 Wi-Fi 会断开

我在用有线(以太网)在 ZFS 根目录上安装的 Ubuntu 22.04 LTS 上连接。需要说明的是,我的网卡根本不支持无线连接。当我启动 Ubuntu 或尝试使用命令“sudo shutdown now”或使用集成界面(在我的情况下是 KDE Plasma)上的关机按钮关机时 - 其他设备(如平板电脑、手机、笔记本电脑)会立即断开与我的 Wi-Fi 网络的连接,并且无法重新连接,直到我的机器上建立以太网为止。

(如果我尝试,sudo shutdown --poweroff now其他设备的 Wi-Fi 不会掉线)

这真的很奇怪,因为我已经尝试了一切方法来解决这个问题,绝对的一切,我已经重新安装了系统五次,现在我在这里问这个问题。

首先我想解释一下,用于使用 ZFS 文件系统进行系统安装我已经关注官方说明openZFS 文档。一切都应该没问题吧?其实不是,我注意到在重新安装系统后,出于某种原因一切都很好,直到你运行命令 apt dist-upgrade之后就会出现这个问题...

好吧,如果在处理后出现问题apt dist-upgrade 然后问题就出现了,因为升级了一些软件包? 我试过列出并降级所有软件包在处理此命令后已升级,并且还是同样的问题。

我在故障排除时尝试过的解决方案:

一开始我以为这是 DHCP4 的问题,我尝试将我的网络服务从内部 DHCP 更改为 dhcpclient,结果仍然相同。然后我尝试设置静态 IP 而不是 DHCP 的动态 IP,结果仍然相同。

我也认为问题可能出在 NetworkManager 上,但即使转移到网络后问题仍然存在。

我也在 journalctl 中注意到了这条消息,我的网速是 100mbps 而不是 1gbps也许这就是问题所在?:

Generic FE-GE Realtek PHY r8169-0-200:00: Downshift occurred from negotiated speed 1Gbps to actual speed 100Mbps, check cabling!
8169 0000:02:00.0 enp2s0: Link is Up - 100Mbps/Full (downshifted) - flow control rx

我尝试通过关闭 rc.local 中的自动协商来修复此问题,但没有帮助。

当网络服务尝试建立我的以太网连接时,我还注意到 avahi-daemon 发出了这些奇怪的消息:

Jul 10 00:25:31 localhost avahi-daemon[1024]: Leaving mDNS multicast group on interface enp2s0.IPv6 with address fe80::c23f:d5ff:feaf:>
Jul 10 00:25:31 localhost avahi-daemon[1024]: Joining mDNS multicast group on interface enp2s0.IPv6 with address 2001:12:34:45:1:2:3:6.
Jul 10 00:25:31 localhost avahi-daemon[1024]: Registering new address record for 2001:12:34:45:1:2:3:6 on enp2s0.*.
Jul 10 00:25:31 localhost avahi-daemon[1024]: Withdrawing address record for fe80::c23f:d5ff:feaf:6ebd on enp2s0.

我尝试通过 * 来修复它关闭 avahi-daemon,因为我不想使用

在尝试修复此问题失败后,我想查看 journactl 在第二次启动(因为第一次启动是系统配置)和出现此问题的最新启动之间的差异。因此这里是:

第二次启动: https://pastebin.com/EpaByGpY

最新启动有问题,并启用 networkd 的调试日志记录): https://pastebin.com/jWkzEb2E

这真的很有趣,因为最新的启动日志中有消息:

Jul 13 01:41:40 elias-ubuntu systemd-networkd[1339]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1/link/_32 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=25 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Jul 13 01:41:40 elias-ubuntu systemd-networkd[1339]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=26 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Jul 13 01:41:40 elias-ubuntu systemd-networkd[1339]: enp2s0: Forgetting route: dst: 192.168.1.0/24, src: n/a, gw: n/a, prefsrc: 192.168.1.217, scope: link, table: main(254), proto: kernel, type: unicast, nexthop: 0, priority: 0
Jul 13 01:41:40 elias-ubuntu systemd-networkd[1339]: enp2s0: Forgetting route: dst: 192.168.1.255/32, src: n/a, gw: n/a, prefsrc: 192.168.1.217, scope: link, table: local(255), proto: kernel, type: broadcast, nexthop: 0, priority: 0
Jul 13 01:41:40 elias-ubuntu systemd-networkd[1339]: enp2s0: Forgetting route: dst: 192.168.1.217/32, src: n/a, gw: n/a, prefsrc: 192.168.1.217, scope: host, table: local(255), proto: kernel, type: local, nexthop: 0, priority: 0
Jul 13 01:41:40 elias-ubuntu systemd-timesyncd[998]: No network connectivity, watching for changes.
Jul 13 01:41:41 elias-ubuntu PackageKit[1930]: get-updates transaction /733_aadebadb from uid 1000 finished with success after 519ms
Jul 13 01:41:42 elias-ubuntu dbus-daemon[1551]: [session uid=1000 pid=1551] Activating service name='org.kde.KSplash' requested by ':1.24' (uid=1000 pid=1820 comm="/usr/bin/plasmashell ")
Jul 13 01:41:43 elias-ubuntu dbus-daemon[1551]: [session uid=1000 pid=1551] Successfully activated service 'org.freedesktop.Notifications'
Jul 13 01:41:51 elias-ubuntu systemd[1541]: Started Konsole - Terminal.
Jul 13 01:42:15 elias-ubuntu systemd-networkd[1339]: enp2s0: Flags change: +LOWER_UP +RUNNING
Jul 13 01:42:15 elias-ubuntu kernel: r8169 0000:02:00.0 enp2s0: Link is Up - 100Mbps/Full - flow control off
Jul 13 01:42:15 elias-ubuntu systemd-networkd[1339]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1/link/_32 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=27 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Jul 13 01:42:15 elias-ubuntu systemd-networkd[1339]: enp2s0: LLDP: Started LLDP client
Jul 13 01:42:15 elias-ubuntu systemd-networkd[1339]: enp2s0: Started LLDP.
Jul 13 01:42:15 elias-ubuntu systemd-networkd[1339]: enp2s0: Gained carrier
Jul 13 01:42:15 elias-ubuntu systemd-networkd[1339]: enp2s0: Requesting address: 192.168.1.217/24 (valid forever, preferred forever), flags: n/a
Jul 13 01:42:15 elias-ubuntu systemd-networkd[1339]: enp2s0: Setting addresses
Jul 13 01:42:15 elias-ubuntu systemd-networkd[1339]: enp2s0: State changed: configured -> configuring
Jul 13 01:42:15 elias-ubuntu systemd-networkd[1339]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1/link/_32 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=28 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Jul 13 01:42:15 elias-ubuntu systemd-networkd[1339]: enp2s0: link_check_ready(): static addresses are not configured.
Jul 13 01:42:15 elias-ubuntu systemd-networkd[1339]: enp2s0: link_check_ready(): static addresses are not configured.
Jul 13 01:42:15 elias-ubuntu systemd-networkd[1339]: enp2s0: link_check_ready(): static addresses are not configured.
Jul 13 01:42:15 elias-ubuntu systemd-networkd[1339]: enp2s0: link_check_ready(): static addresses are not configured.
Jul 13 01:42:15 elias-ubuntu systemd-networkd[1339]: enp2s0: link_check_ready(): static addresses are not configured.
Jul 13 01:42:15 elias-ubuntu systemd-networkd[1339]: enp2s0: link_check_ready(): static addresses are not configured.
Jul 13 01:42:15 elias-ubuntu systemd-networkd[1339]: enp2s0: Requesting route: dst: n/a, src: n/a, gw: 192.168.1.1, prefsrc: n/a, scope: global, table: main(254), proto: static, type: unicast, nexthop: 0, priority: 0
Jul 13 01:42:15 elias-ubuntu systemd-networkd[1339]: enp2s0: Requesting routes
Jul 13 01:42:15 elias-ubuntu systemd-networkd[1339]: enp2s0: link_check_ready(): static addresses are not configured.
Jul 13 01:42:15 elias-ubuntu systemd-networkd[1339]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=29 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Jul 13 01:42:15 elias-ubuntu systemd-networkd[1339]: enp2s0: Configuring address: 192.168.1.217/24 (valid forever, preferred forever), flags: n/a
Jul 13 01:42:15 elias-ubuntu systemd-networkd[1339]: enp2s0: Remembering updated address: 192.168.1.217/24 (valid forever, preferred forever), flags: permanent
Jul 13 01:42:15 elias-ubuntu systemd-networkd[1339]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1/link/_32 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=30 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Jul 13 01:42:15 elias-ubuntu systemd-networkd[1339]: enp2s0: link_check_ready(): static addresses are not configured.
Jul 13 01:42:15 elias-ubuntu systemd-networkd[1339]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=31 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Jul 13 01:42:15 elias-ubuntu systemd-networkd[1339]: enp2s0: Remembering foreign route: dst: 192.168.1.217/32, src: n/a, gw: n/a, prefsrc: 192.168.1.217, scope: host, table: local(255), proto: kernel, type: local, nexthop: 0, priority: 0
Jul 13 01:42:15 elias-ubuntu systemd-networkd[1339]: enp2s0: Remembering foreign route: dst: 192.168.1.255/32, src: n/a, gw: n/a, prefsrc: 192.168.1.217, scope: link, table: local(255), proto: kernel, type: broadcast, nexthop: 0, priority: 0
Jul 13 01:42:15 elias-ubuntu systemd-networkd[1339]: enp2s0: Remembering foreign route: dst: 192.168.1.0/24, src: n/a, gw: n/a, prefsrc: 192.168.1.217, scope: link, table: main(254), proto: kernel, type: unicast, nexthop: 0, priority: 0
Jul 13 01:42:15 elias-ubuntu systemd-networkd[1339]: enp2s0: Configuring route: dst: n/a, src: n/a, gw: 192.168.1.1, prefsrc: n/a, scope: global, table: main(254), proto: static, type: unicast, nexthop: 0, priority: 0
Jul 13 01:42:15 elias-ubuntu systemd-networkd[1339]: enp2s0: Addresses set
Jul 13 01:42:15 elias-ubuntu systemd-networkd[1339]: enp2s0: link_check_ready(): static routes are not configured.
Jul 13 01:42:15 elias-ubuntu systemd-networkd[1339]: enp2s0: Received remembered route: dst: n/a, src: n/a, gw: 192.168.1.1, prefsrc: n/a, scope: global, table: main(254), proto: static, type: unicast, nexthop: 0, priority: 0
Jul 13 01:42:15 elias-ubuntu systemd-networkd[1339]: enp2s0: Routes set
Jul 13 01:42:15 elias-ubuntu systemd-networkd[1339]: enp2s0: State changed: configuring -> configured
Jul 13 01:42:15 elias-ubuntu systemd-networkd[1339]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1/link/_32 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=32 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Jul 13 01:42:15 elias-ubuntu systemd-timesyncd[998]: Network configuration changed, trying to establish connection.
Jul 13 01:42:15 elias-ubuntu PackageKit[1930]: get-updates transaction /734_eeeabecd from uid 1000 finished with success after 502ms
Jul 13 01:42:18 elias-ubuntu systemd-networkd[1339]: rtnl: received non-static neighbor, ignoring.
Jul 13 01:42:25 elias-ubuntu systemd-timesyncd[998]: Timed out waiting for reply from 185.125.190.56:123 (ntp.ubuntu.com).
Jul 13 01:42:28 elias-ubuntu systemd-networkd[1339]: rtnl: received non-static neighbor, ignoring.
Jul 13 01:42:33 elias-ubuntu systemd-networkd[1339]: rtnl: received non-static neighbor, ignoring.
Jul 13 01:42:33 elias-ubuntu kernel: r8169 0000:02:00.0 enp2s0: Link is Down
Jul 13 01:42:33 elias-ubuntu systemd-networkd[1339]: rtnl: received non-static neighbor, ignoring.
Jul 13 01:42:33 elias-ubuntu systemd-networkd[1339]: rtnl: received non-static neighbor, ignoring.
Jul 13 01:42:33 elias-ubuntu systemd-networkd[1339]: enp2s0: Flags change: -LOWER_UP -RUNNING
Jul 13 01:42:33 elias-ubuntu systemd-networkd[1339]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1/link/_32 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=33 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Jul 13 01:42:33 elias-ubuntu systemd-networkd[1339]: enp2s0: Lost carrier
Jul 13 01:42:33 elias-ubuntu systemd-networkd[1339]: enp2s0: LLDP: Stopping LLDP client
Jul 13 01:42:33 elias-ubuntu systemd-networkd[1339]: enp2s0: Removing route: dst: n/a, src: n/a, gw: 192.168.1.1, prefsrc: n/a, scope: global, table: main(254), proto: static, type: unicast, nexthop: 0, priority: 0
Jul 13 01:42:33 elias-ubuntu systemd-networkd[1339]: enp2s0: Removing address: 192.168.1.217/24 (valid forever, preferred forever), flags: permanent
Jul 13 01:42:33 elias-ubuntu systemd-networkd[1339]: enp2s0: State is configured, dropping foreign config
Jul 13 01:42:33 elias-ubuntu systemd-networkd[1339]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=34 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Jul 13 01:42:33 elias-ubuntu systemd-networkd[1339]: enp2s0: Forgetting route: dst: n/a, src: n/a, gw: 192.168.1.1, prefsrc: n/a, scope: global, table: main(254), proto: static, type: unicast, nexthop: 0, priority: 0
Jul 13 01:42:33 elias-ubuntu systemd-networkd[1339]: enp2s0: Forgetting address: 192.168.1.217/24 (valid forever, preferred forever), flags: permanent
Jul 13 01:42:33 elias-ubuntu systemd-networkd[1339]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1/link/_32 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=35 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Jul 13 01:42:33 elias-ubuntu systemd-networkd[1339]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=36 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Jul 13 01:42:33 elias-ubuntu systemd-networkd[1339]: enp2s0: Forgetting route: dst: 192.168.1.0/24, src: n/a, gw: n/a, prefsrc: 192.168.1.217, scope: link, table: main(254), proto: kernel, type: unicast, nexthop: 0, priority: 0
Jul 13 01:42:33 elias-ubuntu systemd-networkd[1339]: enp2s0: Forgetting route: dst: 192.168.1.255/32, src: n/a, gw: n/a, prefsrc: 192.168.1.217, scope: link, table: local(255), proto: kernel, type: broadcast, nexthop: 0, priority: 0
Jul 13 01:42:33 elias-ubuntu systemd-networkd[1339]: enp2s0: Forgetting route: dst: 192.168.1.217/32, src: n/a, gw: n/a, prefsrc: 192.168.1.217, scope: host, table: local(255), proto: kernel, type: local, nexthop: 0, priority: 0
Jul 13 01:42:33 elias-ubuntu systemd-timesyncd[998]: No network connectivity, watching for changes.
Jul 13 01:42:34 elias-ubuntu PackageKit[1930]: get-updates transaction /735_ddbbaddc from uid 1000 finished with success after 508ms
Jul 13 01:42:34 elias-ubuntu systemd[1541]: Starting Save current user state periodically...
Jul 13 01:42:34 elias-ubuntu systemd[1]: Starting ZSYS daemon service...
Jul 13 01:42:43 elias-ubuntu org.kde.KSplash[2012]: org.kde.knotifications: WaitForName: Service was not registered within timeout
Jul 13 01:42:43 elias-ubuntu dbus-daemon[1551]: [session uid=1000 pid=1551] Activated service 'org.kde.KSplash' failed: Process org.kde.KSplash exited with status 1
Jul 13 01:42:43 elias-ubuntu systemd[1]: Started ZSYS daemon service.
Jul 13 01:42:43 elias-ubuntu zsysctl[2055]: Successfully saved as "autozsys_9tocyd"
Jul 13 01:42:43 elias-ubuntu systemd[1541]: Finished Save current user state periodically.
Jul 13 01:42:43 elias-ubuntu kernel: r8169 0000:02:00.0 enp2s0: Link is Up - 100Mbps/Full - flow control off
Jul 13 01:42:43 elias-ubuntu systemd-networkd[1339]: enp2s0: Flags change: +LOWER_UP +RUNNING
Jul 13 01:42:43 elias-ubuntu systemd-networkd[1339]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1/link/_32 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=37 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Jul 13 01:42:43 elias-ubuntu systemd-networkd[1339]: enp2s0: LLDP: Started LLDP client
Jul 13 01:42:43 elias-ubuntu systemd-networkd[1339]: enp2s0: Started LLDP.
Jul 13 01:42:43 elias-ubuntu systemd-networkd[1339]: enp2s0: Gained carrier
Jul 13 01:42:43 elias-ubuntu systemd-networkd[1339]: enp2s0: Requesting address: 192.168.1.217/24 (valid forever, preferred forever), flags: n/a
Jul 13 01:42:43 elias-ubuntu systemd-networkd[1339]: enp2s0: Setting addresses
Jul 13 01:42:43 elias-ubuntu systemd-networkd[1339]: enp2s0: State changed: configured -> configuring
Jul 13 01:42:43 elias-ubuntu systemd-networkd[1339]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1/link/_32 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=38 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Jul 13 01:42:43 elias-ubuntu systemd-networkd[1339]: enp2s0: link_check_ready(): static addresses are not configured.
Jul 13 01:42:43 elias-ubuntu systemd-networkd[1339]: enp2s0: link_check_ready(): static addresses are not configured.
Jul 13 01:42:43 elias-ubuntu systemd-networkd[1339]: enp2s0: link_check_ready(): static addresses are not configured.
Jul 13 01:42:43 elias-ubuntu systemd-networkd[1339]: enp2s0: link_check_ready(): static addresses are not configured.
Jul 13 01:42:43 elias-ubuntu systemd-networkd[1339]: enp2s0: link_check_ready(): static addresses are not configured.
Jul 13 01:42:43 elias-ubuntu systemd-networkd[1339]: enp2s0: link_check_ready(): static addresses are not configured.
Jul 13 01:42:43 elias-ubuntu systemd-networkd[1339]: enp2s0: Requesting route: dst: n/a, src: n/a, gw: 192.168.1.1, prefsrc: n/a, scope: global, table: main(254), proto: static, type: unicast, nexthop: 0, priority: 0
Jul 13 01:42:43 elias-ubuntu systemd-networkd[1339]: enp2s0: Requesting routes
Jul 13 01:42:43 elias-ubuntu systemd-networkd[1339]: enp2s0: link_check_ready(): static addresses are not configured.
Jul 13 01:42:43 elias-ubuntu systemd-networkd[1339]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=39 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Jul 13 01:42:43 elias-ubuntu systemd-networkd[1339]: enp2s0: Configuring address: 192.168.1.217/24 (valid forever, preferred forever), flags: n/a
Jul 13 01:42:43 elias-ubuntu systemd-networkd[1339]: enp2s0: Remembering updated address: 192.168.1.217/24 (valid forever, preferred forever), flags: permanent
Jul 13 01:42:43 elias-ubuntu systemd-networkd[1339]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1/link/_32 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=40 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Jul 13 01:42:43 elias-ubuntu systemd-networkd[1339]: enp2s0: link_check_ready(): static addresses are not configured.
Jul 13 01:42:43 elias-ubuntu systemd-networkd[1339]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=41 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Jul 13 01:42:43 elias-ubuntu systemd-networkd[1339]: enp2s0: Remembering foreign route: dst: 192.168.1.217/32, src: n/a, gw: n/a, prefsrc: 192.168.1.217, scope: host, table: local(255), proto: kernel, type: local, nexthop: 0, priority: 0
Jul 13 01:42:43 elias-ubuntu systemd-networkd[1339]: enp2s0: Remembering foreign route: dst: 192.168.1.255/32, src: n/a, gw: n/a, prefsrc: 192.168.1.217, scope: link, table: local(255), proto: kernel, type: broadcast, nexthop: 0, priority: 0
Jul 13 01:42:43 elias-ubuntu systemd-networkd[1339]: enp2s0: Remembering foreign route: dst: 192.168.1.0/24, src: n/a, gw: n/a, prefsrc: 192.168.1.217, scope: link, table: main(254), proto: kernel, type: unicast, nexthop: 0, priority: 0
Jul 13 01:42:43 elias-ubuntu systemd-networkd[1339]: enp2s0: Configuring route: dst: n/a, src: n/a, gw: 192.168.1.1, prefsrc: n/a, scope: global, table: main(254), proto: static, type: unicast, nexthop: 0, priority: 0
Jul 13 01:42:43 elias-ubuntu systemd-networkd[1339]: enp2s0: Addresses set
Jul 13 01:42:43 elias-ubuntu systemd-networkd[1339]: enp2s0: link_check_ready(): static routes are not configured.
Jul 13 01:42:43 elias-ubuntu systemd-networkd[1339]: enp2s0: Received remembered route: dst: n/a, src: n/a, gw: 192.168.1.1, prefsrc: n/a, scope: global, table: main(254), proto: static, type: unicast, nexthop: 0, priority: 0
Jul 13 01:42:43 elias-ubuntu systemd-networkd[1339]: enp2s0: Routes set
Jul 13 01:42:43 elias-ubuntu systemd-networkd[1339]: enp2s0: State changed: configuring -> configured
Jul 13 01:42:43 elias-ubuntu systemd-networkd[1339]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1/link/_32 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=42 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Jul 13 01:42:43 elias-ubuntu systemd-timesyncd[998]: Network configuration changed, trying to establish connection.
Jul 13 01:42:44 elias-ubuntu PackageKit[1930]: get-updates transaction /736_deebeede from uid 1000 finished with success after 501ms
Jul 13 01:42:45 elias-ubuntu systemd-networkd[1339]: rtnl: received non-static neighbor, ignoring.
Jul 13 01:42:45 elias-ubuntu systemd-networkd[1339]: rtnl: received non-static neighbor, ignoring.
Jul 13 01:42:53 elias-ubuntu systemd-timesyncd[998]: Timed out waiting for reply from 185.125.190.58:123 (ntp.ubuntu.com).
Jul 13 01:42:54 elias-ubuntu systemd-timesyncd[998]: Initial synchronization to time server 91.189.91.157:123 (ntp.ubuntu.com).

这真的很奇怪。不仅仅是因为我已经禁用了 LLDP 客户端,而且由于某种原因它仍然启用,还因为 networkd 出于某种原因 3 次忘记了路由和 IP 地址,然后重试记住它们,为什么 networkd 会这样做?NetworkManager 也会发生这种情况。

我还注意到在 etc/systemd/network/ 中没有 .network 文件,也许这就是问题所在?我应该自己创建.network 文件吗?systemd-network-generator.service 不应该生成 .network 文件吗?

然后我发现了这篇文章:https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2024327 askubuntu.com 上有这个:Ubuntu 22.04LTS 中的 wifi 问题 以及其他有关 Wi-Fi 问题的帖子,其中唯一的解决方案就是安装另一个版本的内核:如何将我的内核更新到最新版本? 22.04,wifi经常断线几秒钟 所以我认为问题出在我的内核上,我尝试了不同版本的主线内核,这是列表:

  • 5.18(遇到同样的问题)
  • 5.17.5(遇到同样的问题)
  • 5.16(遇到相同问题)
  • 5.15.20(遇到同样的问题)
  • 5.15.0-76(已安装,遇到相同问题)

如果我尝试从 Ubuntu 22.04 LiveCD 启动Wi-Fi 连接没有问题,Wi-Fi 不会在开机时关闭,一切正常。

如果我尝试从 Ubuntu 22.04 LiveCD 全新安装会有Wi-Fi 连接没有问题,所以也许你们会想——这是解决方案,只需重新安装系统从默认安装程序但没有遵循 openzfs 的文档,使用默认安装程序与通过默认安装程序安装系统相同。

我还注意到Ubuntu 22.04 LiveCD 使用内核版本 5.19,所以现在我正在考虑安装内核 5.19,我听说内核 5.19 发布,包含新的重大网络调整那么也许我的问题有解决办法吗?最痛苦的是我可能会升级我的 zfs 文件系统版本以及我该如何做到这一点,这是另一个问题,因为没有关于此的文档或教程。 (我的 zfs 版本是 2.1.5,不支持内核 5.19 及更高版本)

我对此感到厌倦,实际上我已经尝试了一切,任何答案都将不胜感激。

我的 netplan 配置 /etc/netplan/01-netcfg.yaml:

network:
  version: 2
  renderer: networkd
  ethernets:
    enp2s0:
      dhcp4: no
      dhcp6: no
      accept-ra: false
      addresses: [192.168.1.217/24]
      gateway4: 192.168.1.1
      #routes:
      #  - to: default
      #    via: 192.168.1.1
      nameservers:
        addresses: [127.0.0.53,8.8.8.8,8.8.8.4]

我的 IP 地址显示:(不要考虑 fbi0,这个界面来自我安装的 wondershaper 服务,需要说明的是,我在安装 wondershaper 服务之前就遇到了这个问题)

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc htb state UP group default qlen 1000
    link/ether c0:3f:d5:af:6e:bd brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.217/24 brd 192.168.1.255 scope global enp2s0
       valid_lft forever preferred_lft forever
    inet6 fe80::c23f:d5ff:feaf:6ebd/64 scope link 
       valid_lft forever preferred_lft forever
3: ifb0: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc htb state UNKNOWN group default qlen 32
    link/ether 76:be:2b:97:8d:96 brd ff:ff:ff:ff:ff:ff

我的ip路由显示:

default via 192.168.1.1 dev enp2s0 proto static 
192.168.1.0/24 dev enp2s0 proto kernel scope link src 192.168.1.217 

sudo lshw -C 网络

  *-network                 
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: enp2s0
       version: 0c
       serial: c0:3f:d5:af:6e:bd
       size: 100Mbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=off broadcast=yes driver=r8169 driverversion=5.15.20-051520-generic duplex=full firmware=rtl8168g-2_0.0.1 02/06/13 ip=192.168.1.217 latency=0 link=yes multicast=yes port=twisted pair speed=100Mbit/s
       resources: irq:19 ioport:e000(size=256) memory:f7c00000-f7c00fff memory:f0000000-f0003fff

没有输出: 请参阅lspci-knn| grep Net-A3 以及: rfkill 列表

因此输出为lspci -knn|grep Eth -A3

02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 0c)
        Subsystem: Elitegroup Computer Systems RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [1019:8116]
        Kernel driver in use: r8169
        Kernel modules: r8169

任何回答都会很感激。如果你们需要其他有用的信息,请在评论中告诉我,我稍后会编辑我的问题。

答案1

您的网络配置看上去相当糟糕。

我们看到您的其他网络设备需要你的 Ubuntu 电脑为了获得互联网连接(尽管没有理由这样做)。您应该检查这些设备的配置。(我建议使用笔记本电脑,因为从那里收集信息可能更容易)

查看他们被分配了哪些 IP 地址、他们的网关、他们的 DNS 服务器以及跟踪路由显示的内容......

我怀疑您的计算机充当了 dhcp 服务器,可能将自己伪装成网关,并将流量重定向到路由器。这可以解释为什么计算机停机时其他设备会失去互联网连接。

至于直到才出现的错误apt dist-upgrade,那一定是在更新某个 dhcp 包,而该包要么最终以错误的方式进行自我配置,要么只是重新加载以以这种方式应用现有配置。

相关内容