Ubuntu 16.04 上定期丢失网络连接

Ubuntu 16.04 上定期丢失网络连接

在我的主 Ubuntu 16.04 机器上,我有时会失去连接。当我尝试 ping Google DNS 时,我收到响应:“连接:网络无法访问”。

我可以通过重置网络接口、关闭有线网络然后使用默认 GUI 按钮打开来立即修复此问题。有人知道问题出在哪里吗?

这是 ifconfig 输出:

enp2s0    Link encap:Ethernet  HWaddr c8:9c:dc:d9:76:59  
      inet addr:10.0.0.1  Bcast:10.0.0.255  Mask:255.255.255.0
      inet6 addr: fe80::c46:e5e8:d89f:b5c6/64 Scope:Link
      inet6 addr: fdee:8069:28f3:0:5a3d:7482:bbd4:6520/64 Scope:Global
      inet6 addr: fdee:8069:28f3:0:685d:475b:a11a:b501/64 Scope:Global
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:344379 errors:0 dropped:0 overruns:0 frame:0
      TX packets:190782 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:404790948 (404.7 MB)  TX bytes:14956805 (14.9 MB)

lo        Link encap:Local Loopback  
      inet addr:127.0.0.1  Mask:255.0.0.0
      inet6 addr: ::1/128 Scope:Host
      UP LOOPBACK RUNNING  MTU:65536  Metric:1
      RX packets:24411 errors:0 dropped:0 overruns:0 frame:0
      TX packets:24411 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1 
      RX bytes:76904248 (76.9 MB)  TX bytes:76904248 (76.9 MB)

路线输出:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         myhome.mynet    0.0.0.0         UG    100    0        0 enp2s0
10.0.0.0        *               255.255.255.0   U     100    0        0 enp2s0
link-local      *               255.255.0.0     U     1000   0        0 enp2s0

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: 06
   serial: c8:9c:dc:d9:76:59
   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 1000bt-fd autonegotiation
   configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl_nic/rtl8168e-2.fw ip=10.0.0.1 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
   resources: irq:26 ioport:e000(size=256) memory:fe400000-fe400fff memory:d0000000-d0003fff

无线脚本输出如下

如果有任何其他有用的命令/文件我应该发布请告诉我。

答案1

正如我所想,您正在为以太网使用 r8169 驱动程序,这是一个有缺陷的驱动程序。它的症状之一是失去连接。修复很简单,安装r8168-dkms

terminal...

  • sudo apt-get update
  • sudo apt-get install dkms r8168-dkms
  • reboot

相关内容