网络连接断开,仅重启后才能工作

网络连接断开,仅重启后才能工作

问题

以太网连接断开了一段时间(未知/随机),只有重新启动机器才能解决这个问题,直到一段时间后再次中断。

我尝试监控资源中的网络图,一段时间以来它似乎相当稳定。

我尝试重新安装网络管理器,并通过systemctl命令重新启动网络服务。但是,除了重新启动机器外,没有任何方法可以解决/重新连接互联网。

系统

  • 版本:Ubuntu 22.04.3 LTS

网络设备信息

  *-generic                 
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:01:00.0
       logical name: enp1s0
       version: ff
       serial: 8c:04:ba:ff:da:1b
       size: 100Mbit/s
       capacity: 1Gbit/s
       width: 32 bits
       clock: 66MHz
       capabilities: bus_master vga_palette cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=6.2.0-32-generic duplex=full firmware=rtl8168h-2_0.0.2 02/26/15 ip=10.2.16.191 latency=255 link=yes maxlatency=255 mingnt=255 multicast=yes port=twisted pair speed=100Mbit/s
       resources: irq:16 ioport:3000(size=256) memory:d1104000-d1104fff memory:d1100000-d1103fff
  *-network DISABLED
       description: Wireless interface
       product: Wireless 3165
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: wlp2s0
       version: 79
       serial: 58:6c:25:cd:91:0a
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=iwlwifi driverversion=6.2.0-32-generic firmware=29.4063824552.0 7265D-29.ucode latency=0 link=no multicast=yes wireless=IEEE 802.11
       resources: irq:128 memory:d1000000-d1001fff
   

NetworkManager 日志

    Sep 18 00:37:19 username NetworkManager[875]: <info>  [1694977639.7378] manager: NetworkManager state is now CONNECTED_SITE
    Sep 18 00:37:21 username NetworkManager[875]: <info>  [1694977641.7650] manager: NetworkManager state is now CONNECTED_GLOBAL
    Sep 18 00:42:42 username NetworkManager[875]: <info>  [1694977962.1814] manager: NetworkManager state is now CONNECTED_SITE
    Sep 18 00:42:42 username NetworkManager[875]: <info>  [1694977962.7644] manager: NetworkManager state is now CONNECTED_GLOBAL
    Sep 18 01:03:03 username NetworkManager[875]: <info>  [1694979183.1873] manager: NetworkManager state is now CONNECTED_SITE
    Sep 18 01:03:03 username NetworkManager[875]: <info>  [1694979183.9583] manager: NetworkManager state is now CONNECTED_GLOBAL
    Sep 18 02:03:12 username NetworkManager[875]: <info>  [1694982792.4099] manager: NetworkManager state is now CONNECTED_SITE
    Sep 18 02:03:13 username NetworkManager[875]: <info>  [1694982793.6696] manager: NetworkManager state is now CONNECTED_GLOBAL
    Sep 18 02:38:22 username NetworkManager[875]: <info>  [1694984902.6179] manager: NetworkManager state is now CONNECTED_SITE
    Sep 18 02:38:23 username NetworkManager[875]: <info>  [1694984903.3588] manager: NetworkManager state is now CONNECTED_GLOBAL
    Sep 18 05:08:31 username NetworkManager[875]: <info>  [1694993911.8339] manager: NetworkManager state is now CONNECTED_SITE
    Sep 18 05:08:39 username NetworkManager[875]: <info>  [1694993919.4743] manager: NetworkManager state is now CONNECTED_GLOBAL
    Sep 18 06:03:59 username NetworkManager[875]: <info>  [1694997239.1831] manager: NetworkManager state is now CONNECTED_SITE
    Sep 18 06:03:59 username NetworkManager[875]: <info>  [1694997239.4811] manager: NetworkManager state is now CONNECTED_GLOBAL
    Sep 18 09:19:19 username NetworkManager[875]: <info>  [1695008959.1817] manager: NetworkManager state is now CONNECTED_SITE
    Sep 18 09:19:19 username NetworkManager[875]: <info>  [1695008959.4735] manager: NetworkManager state is now CONNECTED_GLOBAL
    Sep 18 11:09:28 username NetworkManager[875]: <info>  [1695015568.3779] manager: NetworkManager state is now CONNECTED_SITE
    Sep 18 11:09:38 username NetworkManager[875]: <info>  [1695015578.2686] manager: NetworkManager state is now CONNECTED_GLOBAL
    Sep 18 11:19:44 username NetworkManager[875]: <info>  [1695016184.6021] manager: NetworkManager state is now CONNECTED_SITE
    Sep 18 11:19:51 username NetworkManager[875]: <info>  [1695016191.9013] manager: NetworkManager state is now CONNECTED_GLOBAL
    Sep 18 12:15:12 username NetworkManager[875]: <info>  [1695019512.1791] manager: NetworkManager state is now CONNECTED_SITE
    Sep 18 12:15:12 username NetworkManager[875]: <info>  [1695019512.6801] manager: NetworkManager state is now CONNECTED_GLOBAL
    Sep 18 13:50:32 username NetworkManager[875]: <info>  [1695025232.1795] manager: NetworkManager state is now CONNECTED_SITE
    Sep 18 13:50:33 username NetworkManager[875]: <info>  [1695025233.6975] manager: NetworkManager state is now CONNECTED_GLOBAL
    Sep 18 14:00:39 username NetworkManager[875]: <info>  [1695025839.6100] manager: NetworkManager state is now CONNECTED_SITE
    Sep 18 14:00:47 username NetworkManager[875]: <info>  [1695025847.2554] manager: NetworkManager state is now CONNECTED_GLOBAL
    Sep 18 14:51:07 username NetworkManager[875]: <info>  [1695028867.1783] manager: NetworkManager state is now CONNECTED_SITE
    Sep 18 14:51:07 username NetworkManager[875]: <info>  [1695028867.8964] manager: NetworkManager state is now CONNECTED_GLOBAL
    Sep 18 16:01:27 username NetworkManager[875]: <info>  [1695033087.1799] manager: NetworkManager state is now CONNECTED_SITE
    Sep 18 16:01:27 username NetworkManager[875]: <info>  [1695033087.6749] manager: NetworkManager state is now CONNECTED_GLOBAL
    Sep 18 16:06:36 username NetworkManager[875]: <info>  [1695033396.3779] manager: NetworkManager state is now CONNECTED_SITE
    Sep 18 16:06:40 username NetworkManager[875]: <info>  [1695033400.4501] manager: NetworkManager state is now CONNECTED_GLOBAL
    Sep 18 16:31:47 username NetworkManager[875]: <info>  [1695034907.9940] manager: NetworkManager state is now CONNECTED_SITE
    Sep 18 16:32:22 username NetworkManager[875]: <info>  [1695034942.4423] manager: NetworkManager state is now CONNECTED_GLOBAL
    Sep 18 19:12:25 username NetworkManager[875]: <info>  [1695044545.1460] manager: NetworkManager state is now CONNECTED_SITE
    Sep 18 19:12:36 username NetworkManager[875]: <info>  [1695044556.6742] manager: NetworkManager state is now CONNECTED_GLOBAL
    Sep 18 21:52:56 username NetworkManager[875]: <info>  [1695054176.1784] manager: NetworkManager state is now CONNECTED_SITE
    Sep 18 21:52:57 username NetworkManager[875]: <info>  [1695054177.2390] manager: NetworkManager state is now CONNECTED_GLOBAL
    Sep 18 23:29:47 username NetworkManager[875]: <info>  [1695059987.6791] dhcp4 (enp1s0): state changed new lease, address=10.2.16.191
    Sep 19 01:28:17 username NetworkManager[875]: <info>  [1695067097.1794] manager: NetworkManager state is now CONNECTED_SITE
    Sep 19 01:28:17 username NetworkManager[875]: <info>  [1695067097.6673] manager: NetworkManager state is now CONNECTED_GLOBAL
    Sep 19 02:13:26 username NetworkManager[875]: <info>  [1695069806.3939] manager: NetworkManager state is now CONNECTED_SITE
    Sep 19 02:13:36 username NetworkManager[875]: <info>  [1695069816.5554] manager: NetworkManager state is now CONNECTED_GLOBAL
    Sep 19 03:03:53 username NetworkManager[875]: <info>  [1695072833.1777] manager: NetworkManager state is now CONNECTED_SITE
    Sep 19 03:03:54 username NetworkManager[875]: <info>  [1695072834.7768] manager: NetworkManager state is now CONNECTED_GLOBAL
    Sep 19 08:14:14 username NetworkManager[875]: <info>  [1695091454.1794] manager: NetworkManager state is now CONNECTED_SITE
    Sep 19 08:14:14 username NetworkManager[875]: <info>  [1695091454.7082] manager: NetworkManager state is now CONNECTED_GLOBAL
    Sep 19 09:19:34 username NetworkManager[875]: <info>  [1695095374.1783] manager: NetworkManager state is now CONNECTED_SITE
    Sep 19 09:19:34 username NetworkManager[875]: <info>  [1695095374.7137] manager: NetworkManager state is now CONNECTED_GLOBAL
    Sep 19 11:44:43 username NetworkManager[875]: <info>  [1695104083.3860] manager: NetworkManager state is now CONNECTED_SITE
    Sep 19 11:44:44 username NetworkManager[875]: <info>  [1695104084.5011] manager: NetworkManager state is now CONNECTED_GLOBAL
    Sep 19 12:44:53 username NetworkManager[875]: <info>  [1695107693.5301] manager: NetworkManager state is now CONNECTED_SITE
    Sep 19 12:44:56 username NetworkManager[875]: <info>  [1695107696.7331] manager: NetworkManager state is now CONNECTED_GLOBAL
    Sep 19 16:00:05 username NetworkManager[875]: <info>  [1695119405.8181] manager: NetworkManager state is now CONNECTED_SITE
    Sep 19 17:52:29 username NetworkManager[875]: <info>  [1695126149.8728] agent-manager: agent[05207d0d06cbaab5,:1.90/org.gnome.Shell.NetworkAgent/1000]: agent registered
    Sep 19 17:54:11 username NetworkManager[875]: <info>  [1695126251.6000] config: signal: SET_VALUES,values,values-intern,connectivity (/etc/NetworkManager/NetworkManager.conf (lib: 10-dns-resolved.conf, 20-connectivity-ubuntu.conf, no-mac-addr-change.conf) (run: 10-globally-managed-devices.conf) (etc: default-wifi-powersave-on.conf))
    Sep 19 17:54:11 username NetworkManager[875]: <info>  [1695126251.6002] manager: NetworkManager state is now CONNECTED_GLOBAL
    Sep 19 17:54:11 username NetworkManager[875]: <info>  [1695126251.6011] audit: op="networking-control" arg="connectivity-check-enabled:off" pid=49313 uid=1000 result="success"
    ---------------------------
    After sudo systemctl restart NetworkManager.service
    
    Sep 19 18:35:42 varun-cvit NetworkManager[51547]: <info>  [1695128742.1363] agent-manager: agent[21e35eae2d9b0b1b,:1.90/org.gnome.Shell.NetworkAgent/>
    Sep 19 18:36:27 varun-cvit NetworkManager[51547]: <info>  [1695128787.1901] device (enp1s0): state change: ip-config -> ip-check (reason 'none', sys->
    Sep 19 18:36:27 varun-cvit NetworkManager[51547]: <info>  [1695128787.2107] device (enp1s0): state change: ip-check -> secondaries (reason 'none', sy>
    Sep 19 18:36:27 varun-cvit NetworkManager[51547]: <info>  [1695128787.2108] device (enp1s0): state change: secondaries -> activated (reason 'none', s>
    Sep 19 18:36:27 varun-cvit NetworkManager[51547]: <info>  [1695128787.2110] manager: NetworkManager state is now CONNECTED_LOCAL
    Sep 19 18:36:27 varun-cvit NetworkManager[51547]: <info>  [1695128787.2111] device (enp1s0): Activation: successful, device activated.
    Sep 19 18:36:27 varun-cvit NetworkManager[51547]: <info>  [1695128787.2115] manager: startup complete

如果这不是报告我的问题的最有效方式,请见谅 [请指导我如何操作]。我现在为这个问题苦苦挣扎了好一阵子,非常感谢任何帮助。如果我遗漏了任何相关信息,请告诉我。

-> 问题不仅出在互联网上,还出在网络总体上。我无法通过 SSH 进入同一网络中的其他机器。另外,我使用的网络位于 CAS(中央身份验证系统)后面,但我在同一网络上使用其他设备,它们根本不会断开连接。

谢谢!

答案1

对我来说,安装 TLP UI 工具并禁用 USB 设置下的 USB_autosuspend 是有效的

https://linuxconfig.org/introduction-to-tlpui-a-gtk-frontend-for-tlp

我看到小贴士https://www.reddit.com/r/Ubuntu/comments/upeqc1/network_keeps_on_disconnecting_on_2204/关于最后一条评论,但没有弄清楚它与网络问题有何关系。

相关内容