有线连接偶尔会断开 - Ubuntu 16.04

有线连接偶尔会断开 - Ubuntu 16.04

我的有线连接偶尔会掉线。在同一台笔记本电脑上使用 Windows 时,不会掉线。

不确定要做什么,或者要在这里发布哪些日志\配置,因此如果需要更多信息,请询问,我会更新帖子。

ifconfig:

enp5s0 Link encap:Ethernet  HWaddr 74:d0:2b:b8:04:c4  
      inet addr:192.168.1.26  Bcast:192.168.1.255  Mask:255.255.255.0
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:39105 errors:0 dropped:0 overruns:0 frame:0
      TX packets:30631 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:29969787 (29.9 MB)  TX bytes:6485444 (6.4 MB)

lo    Link encap:Local Loopback  
      inet addr:127.0.0.1  Mask:255.0.0.0
      UP LOOPBACK RUNNING  MTU:65536  Metric:1
      RX packets:5876 errors:0 dropped:0 overruns:0 frame:0
      TX packets:5876 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1 
      RX bytes:579858 (579.8 KB)  TX bytes:579858 (579.8 KB)

wlp4s0 Link encap:Ethernet  HWaddr 24:0a:64:63:84:77  
      inet addr:192.168.1.30  Bcast:192.168.1.255  Mask:255.255.255.0
      inet6 addr: fe80::49fa:f591:4f59:15fd/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:8256 errors:0 dropped:0 overruns:0 frame:0
      TX packets:599 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:2653633 (2.6 MB)  TX bytes:110394 (110.3 KB)

以下是/var/log/syslog发生某次坠机前后的情况:

424 Dec 29 18:02:09 adiel-N550JV systemd[1]: Starting Network Manager Script Dispatcher Service...
425 Dec 29 18:02:09 adiel-N550JV dbus[1011]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
426 Dec 29 18:02:09 adiel-N550JV systemd[1]: Started Network Manager Script Dispatcher Service.
427 Dec 29 18:02:09 adiel-N550JV nm-dispatcher: req:1 'dhcp4-change' [wlp4s0]: new request (1 scripts)
428 Dec 29 18:02:09 adiel-N550JV nm-dispatcher: req:1 'dhcp4-change' [wlp4s0]: start running ordered scripts...
429 Dec 29 18:02:51 adiel-N550JV wpa_supplicant[1151]: wlp4s0: CTRL-EVENT-SCAN-STARTED
430 Dec 29 18:04:51 adiel-N550JV wpa_supplicant[1151]: wlp4s0: CTRL-EVENT-SCAN-STARTED
431 Dec 29 18:05:45 adiel-N550JV dhclient[7340]: DHCPREQUEST of 192.168.1.14 on enp5s0 to 192.168.1.1 port 67 (xid=0x77a2b8cc)
432 Dec 29 18:05:48 adiel-N550JV dhclient[7340]: DHCPREQUEST of 192.168.1.14 on enp5s0 to 192.168.1.1 port 67 (xid=0x77a2b8cc)
433 Dec 29 18:05:48 adiel-N550JV dhclient[7340]: DHCPNAK from 192.168.1.1 (xid=0xccb8a277)
434 Dec 29 18:05:48 adiel-N550JV NetworkManager[1025]: <info>  [1483027548.1489] dhcp4 (enp5s0): state changed bound -> expire
435 Dec 29 18:05:48 adiel-N550JV NetworkManager[1025]: <info>  [1483027548.1652] dhcp4 (enp5s0): canceled DHCP transaction, DHCP client pid 7340
436 Dec 29 18:05:48 adiel-N550JV NetworkManager[1025]: <info>  [1483027548.1653] dhcp4 (enp5s0): state changed expire -> done
437 Dec 29 18:05:48 adiel-N550JV NetworkManager[1025]: <info>  [1483027548.1654] device (enp5s0): state change: activated -> failed (reason 'ip-config-expired') [100 120 6]
438 Dec 29 18:05:48 adiel-N550JV NetworkManager[1025]: <info>  [1483027548.1656] manager: NetworkManager state is now CONNECTED_LOCAL
439 Dec 29 18:05:48 adiel-N550JV whoopsie[970]: [18:05:48] offline
440 Dec 29 18:05:48 adiel-N550JV NetworkManager[1025]: <warn>  [1483027548.1794] device (enp5s0): Activation: failed for connection 'Wired connection 1'
441 Dec 29 18:05:48 adiel-N550JV dbus[1011]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service'
442 Dec 29 18:05:48 adiel-N550JV NetworkManager[1025]: <info>  [1483027548.1805] device (enp5s0): state change: failed -> disconnected (reason 'none') [120 30 0]
443 Dec 29 18:05:48 adiel-N550JV avahi-daemon[927]: Withdrawing address record for 192.168.1.14 on enp5s0.
444 Dec 29 18:05:48 adiel-N550JV avahi-daemon[927]: Leaving mDNS multicast group on interface enp5s0.IPv4 with address 192.168.1.14.
445 Dec 29 18:05:48 adiel-N550JV avahi-daemon[927]: Interface enp5s0.IPv4 no longer relevant for mDNS.
446 Dec 29 18:05:48 adiel-N550JV NetworkManager[1025]: <info>  [1483027548.1820] manager: NetworkManager state is now CONNECTED_GLOBAL
447 Dec 29 18:05:48 adiel-N550JV NetworkManager[1025]: <info>  [1483027548.1821] policy: set 'Bidani' (wlp4s0) as default for IPv4 routing and DNS
448 Dec 29 18:05:48 adiel-N550JV dnsmasq[1451]: setting upstream servers from DBus
449 Dec 29 18:05:48 adiel-N550JV NetworkManager[1025]: <info>  [1483027548.1822] dns-mgr: Writing DNS information to /sbin/resolvconf
450 Dec 29 18:05:48 adiel-N550JV dnsmasq[1451]: using nameserver 213.57.22.5#53
451 Dec 29 18:05:48 adiel-N550JV NetworkManager[1025]: <info>  [1483027548.1877] policy: auto-activating connection 'Wired connection 1'
452 Dec 29 18:05:48 adiel-N550JV dnsmasq[1451]: using nameserver 213.57.2.5#53
453 Dec 29 18:05:48 adiel-N550JV NetworkManager[1025]: <info>  [1483027548.1883] device (enp5s0): Activation: starting connection 'Wired connection 1' (397c5b6c-907f-312d-95ee-c95be2163114)
454 Dec 29 18:05:48 adiel-N550JV NetworkManager[1025]: <info>  [1483027548.1884] device (enp5s0): state change: disconnected -> prepare (reason 'none') [30 40 0]
455 Dec 29 18:05:48 adiel-N550JV NetworkManager[1025]: <info>  [1483027548.1887] device (enp5s0): state change: prepare -> config (reason 'none') [40 50 0]
456 Dec 29 18:05:48 adiel-N550JV NetworkManager[1025]: <info>  [1483027548.1890] device (enp5s0): state change: config -> ip-config (reason 'none') [50 70 0]
457 Dec 29 18:05:48 adiel-N550JV NetworkManager[1025]: <info>  [1483027548.1892] dhcp4 (enp5s0): activation: beginning transaction (timeout in 45 seconds)
458 Dec 29 18:05:48 adiel-N550JV NetworkManager[1025]: <info>  [1483027548.1901] dhcp4 (enp5s0): dhclient started with pid 9082

更新:

sudo lshw -C network输出:

*-network               
   description: Wireless interface
   product: AR9485 Wireless Network Adapter
   vendor: Qualcomm Atheros
   physical id: 0
   bus info: pci@0000:04:00.0
   logical name: wlp4s0
   version: 01
   serial: 24:0a:64:63:84:77
   width: 64 bits
   clock: 33MHz
   capabilities: pm msi pciexpress bus_master cap_list rom ethernet physical wireless
   configuration: broadcast=yes driver=ath9k driverversion=4.4.0-57-generic firmware=N/A ip=192.168.1.26 latency=0 link=yes multicast=yes wireless=IEEE 802.11bgn
   resources: irq:18 memory:f7900000-f797ffff memory:f7980000-f798ffff
*-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:05:00.0
   logical name: enp5s0
   version: 0c
   serial: 74:d0:2b:b8:04:c4
   size: 1Gbit/s
   capacity: 1Gbit/s
   width: 64 bits
   clock: 33MHz
   capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
   configuration: autonegotiation=on broadcast=yes driver=r8168 driverversion=8.041.00-NAPI duplex=full ip=192.168.1.13 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
   resources: irq:32 ioport:d000(size=256) memory:f7800000-f7800fff memory:f2100000-f2103fff

答案1

sudo lshw -C network使用该应用程序查看一下terminal

确认您的 enp5s0 以太网设备使用的驱动程序是r8169。此驱动程序是导致网络中断的原因。

如果是的r8169话:

terminal...

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

相关内容