Ubuntu 上网络掉线

Ubuntu 上网络掉线

如何诊断 Ubuntu 16.04 下互联网断线问题?

我有一台戴尔 5520 笔记本电脑,它的互联网(有线和无线)似乎毫无原因地随机停止工作。我不认为是我的路由器出了问题,因为我的网络上没有其他设备出现这个问题。此外,只需关闭和打开我的 wifi,或拔下然后重新插入以太网电缆即可立即解决问题,因此这似乎是 DHCP 或网络驱动程序的一些本地错误。

你可以想象,这是相当令人沮丧的,并且破坏了许多需要互联网访问的自动化系统。

我该如何诊断这个问题?运行cat /var/log/syslog |grep -i network结果显示:

Nov 30 08:15:47 localhost dhclient[3646]: receive_packet failed on enxd481d72559eb: Network is down
Nov 30 08:15:47 localhost NetworkManager[29467]: <info>  [1512047747.9144] device (enxd481d72559eb): state change: activated -> unmanaged (reason 'removed') [100 10 36]
Nov 30 08:15:47 localhost NetworkManager[29467]: <info>  [1512047747.9360] dhcp4 (enxd481d72559eb): canceled DHCP transaction, DHCP client pid 3646
Nov 30 08:15:47 localhost NetworkManager[29467]: <info>  [1512047747.9360] dhcp4 (enxd481d72559eb): state changed bound -> done
Nov 30 08:15:47 localhost NetworkManager[29467]: <info>  [1512047747.9367] dns-mgr: Writing DNS information to /sbin/resolvconf
Nov 30 08:15:47 localhost NetworkManager[29467]: <info>  [1512047747.9567] manager: NetworkManager state is now CONNECTED_LOCAL
Nov 30 08:15:48 localhost systemd[1]: Starting Network Manager Script Dispatcher Service...
Nov 30 08:15:48 localhost systemd[1]: Started Network Manager Script Dispatcher Service.
Nov 30 08:15:48 localhost NetworkManager[29467]: <error> [1512047748.7027] platform-linux: do-change-link[23]: failure changing link: failure 19 (No such device)
Nov 30 08:15:48 localhost NetworkManager[29467]: <warn>  [1512047748.7030] device (enxd481d72559eb): failed to disable userspace IPv6LL address handling
Nov 30 08:15:48 localhost NetworkManager[29467]: <info>  [1512047748.7033] devices removed (path: /sys/devices/pci0000:00/0000:00:1d.6/0000:05:00.0/0000:06:02.0/0000:3d:00.0/usb4/4-1/4-1:1.0/net/enxd481d72559eb, iface: enxd481d72559eb)
Nov 30 08:16:03 localhost NetworkManager[29467]: <warn>  [1512047763.7603] device (eth0): failed to find device 24 'eth0' with udev
Nov 30 08:16:03 localhost NetworkManager[29467]: <info>  [1512047763.7620] manager: (eth0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/8)

显然,这表明发生了某种网络问题,但我不确定是什么问题。我该如何弄清楚这里发生了什么?

答案1

由于对网络进行 grepping,系统日志中的一些相关行丢失了,但看起来您的 USB 以太网设备正在消失并再次出现:

devices removed (path: /sys/devices/pci0000:00/0000:00:1d.6/0000:05:00.0/0000:06:02.0/0000:3d:00.0/usb4/4-1/4-1:1.0/net/enxd481d72559eb, iface: enxd481d72559eb)
...
(eth0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/8)

这不是网络问题,而是 USB 硬件问题。是否涉及 USB 集线器?其他 USB 设备耗电量过多?USB 电缆损坏?诸如此类。

答案2

我的硬盘坏了,我不得不重新安装到新硬盘上。由于戴尔没有发布其专有 Ubuntu 版本的映像,我重新安装了原版 Ubuntu 16.04,一切正常。因此,戴尔的定制 Ubuntu 发行版似乎存在错误和/或驱动程序有问题,甚至无法通过运行常规 apt-get 更新来修复。

相关内容