仅在 Ubuntu 机器上偶尔出现网络掉线

仅在 Ubuntu 机器上偶尔出现网络掉线

我的所有 Ubuntu 机器都出现了问题。互联网连接会偶尔中断几分钟,这种情况每 5-10 分钟就会发生一次。它会自行重新连接,或者我可以重新启动我的 Google Nest Wifi 网状网络,互联网也会通过这种方式重新连接。同时,我的手机和其他设备上都有互联网。我查看了一下,sudo watch netstat -tulnep发现我正在使用的 Nordvpnopenvpn在该列中的数字非常高Send-Q。通常当该数字非常高时,我的互联网就会停止工作。当该数字降至 0 后,互联网又可以正常工作了。我不知道是什么原因造成的,也不知道该如何修复它。如果能得到任何帮助,我将不胜感激,谢谢。

我的 ISP 是 Verizon Fios,我在 Wifi 和有线连接上都遇到了这个问题。无论我从网状网络还是 Verizon 路由器连接到 Wifi 都没有区别。笔记本电脑和台式机都运行20.04.1-Ubuntu内核版本5.13.0-28-generic,并且飞行模式已关闭。

这是我连接到 VPN 之前的 ifconfig:

br-ccc1c02cedb8: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.18.0.1  netmask 255.255.0.0  broadcast 172.18.255.255
        inet6 fe80::42:7dff:fe70:cf39  prefixlen 64  scopeid 0x20<link>
        ether 02:42:7d:70:cf:39  txqueuelen 0  (Ethernet)
        RX packets 734  bytes 779426 (779.4 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 897  bytes 142075 (142.0 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp110s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.182  netmask 255.255.255.0  broadcast 192.168.1.255
        ether 80:fa:5b:63:b3:72  txqueuelen 1000  (Ethernet)
        RX packets 1256347  bytes 1736731001 (1.7 GB)
        RX errors 727  dropped 0  overruns 727  frame 0
        TX packets 324663  bytes 52749976 (52.7 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 18  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 54424  bytes 8231085 (8.2 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 54424  bytes 8231085 (8.2 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

连接到vpn后,运行ifconfig:

br-ccc1c02cedb8: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.18.0.1  netmask 255.255.0.0  broadcast 172.18.255.255
        ether 02:42:7d:70:cf:39  txqueuelen 0  (Ethernet)
        RX packets 734  bytes 779426 (779.4 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 897  bytes 142075 (142.0 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp110s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.182  netmask 255.255.255.0  broadcast 192.168.1.255
        ether 80:fa:5b:63:b3:72  txqueuelen 1000  (Ethernet)
        RX packets 1258324  bytes 1738613517 (1.7 GB)
        RX errors 738  dropped 0  overruns 738  frame 0
        TX packets 325864  bytes 53002270 (53.0 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 18  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 55408  bytes 8332617 (8.3 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 55408  bytes 8332617 (8.3 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1500
        inet 10.8.0.23  netmask 255.255.0.0  destination 10.8.0.23
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 500  (UNSPEC)
        RX packets 190  bytes 62389 (62.3 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 279  bytes 41366 (41.3 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

与此同时,解决这个问题我能做的唯一事情就是重新启动路由器。

sudo journalctl -b 0 -u NetworkManager按照建议执行后@waltinator,我得到了这个输出:

-- Logs begin at Tue 2021-11-23 16:13:14 EST, end at Mon 2022-02-07 13:44:38 EST. --
Feb 07 09:24:17 Sky-X4C systemd[1]: Starting Network Manager...
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.4101] NetworkManager (version 1.22.10) is starting... (for the first time)
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.4102] Read config: /etc/NetworkManager/NetworkManager.conf (lib: 10-dns-resolved.conf, 20-connectivity-ubuntu.conf, no-mac-addr-change.conf) (ru>
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.4241] bus-manager: acquired D-Bus service "org.freedesktop.NetworkManager"
Feb 07 09:24:17 Sky-X4C systemd[1]: Started Network Manager.
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.4381] manager[0x564b4c7c1030]: monitoring kernel firmware directory '/lib/firmware'.
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.4382] monitoring ifupdown state file '/run/network/ifstate'.
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.5558] hostname: hostname: using hostnamed
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.5558] hostname: hostname changed from (none) to "Sky-X4C"
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.5561] dns-mgr[0x564b4c7ae290]: init: dns=systemd-resolved rc-manager=symlink, plugin=systemd-resolved
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.5569] rfkill0: found Wi-Fi radio killswitch (at /sys/devices/pci0000:00/0000:00:1d.4/0000:71:00.0/ieee80211/phy0/rfkill0) (driver iwlwifi)
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.5576] manager[0x564b4c7c1030]: rfkill: Wi-Fi hardware radio set enabled
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.5577] manager[0x564b4c7c1030]: rfkill: WWAN hardware radio set enabled
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.5612] Loaded device plugin: NMWifiFactory (/usr/lib/x86_64-linux-gnu/NetworkManager/1.22.10/libnm-device-plugin-wifi.so)
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.5639] Loaded device plugin: NMTeamFactory (/usr/lib/x86_64-linux-gnu/NetworkManager/1.22.10/libnm-device-plugin-team.so)
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.5655] Loaded device plugin: NMWwanFactory (/usr/lib/x86_64-linux-gnu/NetworkManager/1.22.10/libnm-device-plugin-wwan.so)
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.5668] Loaded device plugin: NMBluezManager (/usr/lib/x86_64-linux-gnu/NetworkManager/1.22.10/libnm-device-plugin-bluetooth.so)
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.5674] Loaded device plugin: NMAtmManager (/usr/lib/x86_64-linux-gnu/NetworkManager/1.22.10/libnm-device-plugin-adsl.so)
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.5676] manager: rfkill: Wi-Fi enabled by radio killswitch; enabled by state file
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.5677] manager: rfkill: WWAN enabled by radio killswitch; enabled by state file
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.5678] manager: Networking is enabled by state file
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.5678] dhcp-init: Using DHCP client 'internal'
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.5694] settings: Loaded settings plugin: ifupdown ("/usr/lib/x86_64-linux-gnu/NetworkManager/1.22.10/libnm-settings-plugin-ifupdown.so")
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.5694] settings: Loaded settings plugin: keyfile (internal)
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.5694] ifupdown: management mode: unmanaged
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <warn>  [1644243857.5696] ifupdown: interfaces file /etc/network/interfaces doesn't exist
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.5813] device (lo): carrier: link connected
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.5815] manager: (lo): new Generic device (/org/freedesktop/NetworkManager/Devices/1)
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.5822] manager: (enp110s0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/2)
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.5837] settings: (enp110s0): created default wired connection 'Wired connection 1'
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.5855] device (enp110s0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.5999] device (wlp113s0): driver supports Access Point (AP) mode
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.6003] manager: (wlp113s0): new 802.11 Wi-Fi device (/org/freedesktop/NetworkManager/Devices/3)
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.6012] device (wlp113s0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <warn>  [1644243857.8021] Error: failed to open /run/network/ifstate
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.8075] modem-manager: ModemManager available
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.8078] supplicant: wpa_supplicant running
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.8078] device (wlp113s0): supplicant interface state: init -> starting
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.8827] sup-iface[0x564b4c7d5920,wlp113s0]: supports 5 scan SSIDs
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.8830] device (wlp113s0): supplicant interface state: starting -> ready
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.8831] Wi-Fi P2P device controlled by interface wlp113s0 created
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.8833] manager: (p2p-dev-wlp113s0): new 802.11 Wi-Fi P2P device (/org/freedesktop/NetworkManager/Devices/4)
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.8835] device (p2p-dev-wlp113s0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.8840] device (p2p-dev-wlp113s0): state change: unavailable -> disconnected (reason 'none', sys-iface-state: 'managed')
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <info>  [1644243857.8842] device (wlp113s0): state change: unavailable -> disconnected (reason 'supplicant-available', sys-iface-state: 'managed')
Feb 07 09:24:17 Sky-X4C NetworkManager[1436]: <warn>  [1644243857.8859] sup-iface: failed to cancel p2p connect: P2P cancel failed
Feb 07 09:24:20 Sky-X4C NetworkManager[1436]: <info>  [1644243860.8056] policy: auto-activating connection 'My Router' (b91f71e2-d4f5-4854-8a55-c7f5ecc659da)
Feb 07 09:24:20 Sky-X4C NetworkManager[1436]: <info>  [1644243860.8059] device (wlp113s0): Activation: starting connection 'My Router' (b91f71e2-d4f5-4854-8a55-c7f5ecc659da)
Feb 07 09:24:20 Sky-X4C NetworkManager[1436]: <info>  [1644243860.8060] device (wlp113s0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Feb 07 09:24:20 Sky-X4C NetworkManager[1436]: <info>  [1644243860.8062] manager: NetworkManager state is now CONNECTING
Feb 07 09:24:20 Sky-X4C NetworkManager[1436]: <info>  [1644243860.8064] device (wlp113s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Feb 07 09:24:20 Sky-X4C NetworkManager[1436]: <info>  [1644243860.8066] device (wlp113s0): Activation: (wifi) access point 'My Router' has security, but secrets are required.
Feb 07 09:24:20 Sky-X4C NetworkManager[1436]: <info>  [1644243860.8066] device (wlp113s0): state change: config -> need-auth (reason 'none', sys-iface-state: 'managed')

相关内容