最近,我在 ubuntu 上开始出现严重的数据包丢失(高达 50-60%)。(即使在 ping 本地地址时,例如我的路由器)。数据包丢失会间歇性地开始,持续约 20 秒,然后停止。也没有关于dmesg
此的消息/var/log/syslog
。
我以为是路由器的问题,但使用无线连接在我的笔记本电脑上 ping 谷歌时没有数据包丢失。
所以我认为是电缆问题,我将电缆连接到我的笔记本电脑(ubuntu 17),也出现了数据包丢失。所以我开始认为是电缆的问题。
但后来我从我的电脑启动了 Windows(使用同一根电缆),并意识到从 Windows 执行 ping 操作没有任何数据包丢失。
我已经尝试重新启动并重新启动网络服务但没有帮助。
ping -OD google.com
发生数据包丢失时的示例输出:
[1511445212.704065] 64 bytes from cache.google.com (80.253.19.184): icmp_seq=320 ttl=60 time=1.55 ms
[1511445213.705529] 64 bytes from cache.google.com (80.253.19.184): icmp_seq=321 ttl=60 time=1.40 ms
[1511445215.705067] no answer yet for icmp_seq=322
[1511445216.705062] no answer yet for icmp_seq=323
[1511445217.705074] no answer yet for icmp_seq=324
[1511445218.705068] no answer yet for icmp_seq=325
[1511445219.705084] no answer yet for icmp_seq=326
[1511445220.705077] no answer yet for icmp_seq=327
[1511445221.705068] no answer yet for icmp_seq=328
[1511445222.705069] no answer yet for icmp_seq=329
[1511445223.705079] no answer yet for icmp_seq=330
[1511445224.705070] no answer yet for icmp_seq=331
[1511445225.705089] no answer yet for icmp_seq=332
[1511445226.705063] no answer yet for icmp_seq=333
[1511445227.705074] no answer yet for icmp_seq=334
[1511445228.705093] no answer yet for icmp_seq=335
[1511445229.705087] no answer yet for icmp_seq=336
[1511445230.705075] no answer yet for icmp_seq=337
[1511445231.705078] no answer yet for icmp_seq=338
[1511445232.705069] no answer yet for icmp_seq=339
[1511445233.705066] no answer yet for icmp_seq=340
[1511445234.705066] no answer yet for icmp_seq=341
[1511445235.705068] no answer yet for icmp_seq=342
[1511445236.705075] no answer yet for icmp_seq=343
[1511445237.705069] no answer yet for icmp_seq=344
[1511445238.705067] no answer yet for icmp_seq=345
[1511445239.705068] no answer yet for icmp_seq=346
[1511445240.705088] no answer yet for icmp_seq=347
[1511445241.705077] no answer yet for icmp_seq=348
[1511445242.705088] no answer yet for icmp_seq=349
[1511445243.705088] no answer yet for icmp_seq=350
[1511445244.705087] no answer yet for icmp_seq=351
[1511445244.706562] 64 bytes from cache.google.com (80.253.19.184): icmp_seq=352 ttl=60 time=1.40 ms
[1511445245.708165] 64 bytes from cache.google.com (80.253.19.184): icmp_seq=353 ttl=60 time=1.49 ms
ifconfig
输出:
enp5s0 Link encap:Ethernet HWaddr 90:2b:34:37:8e:ac
inet addr:192.168.10.134 Bcast:192.168.10.255 Mask:255.255.255.0
inet6 addr: fe80::922b:34ff:fe37:8eac/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:181121 errors:0 dropped:0 overruns:0 frame:0
TX packets:122080 errors:0 dropped:0 overruns:0 carrier:1
collisions:0 txqueuelen:1000
RX bytes:161672155 (161.6 MB) TX bytes:9620508 (9.6 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:1734 errors:0 dropped:0 overruns:0 frame:0
TX packets:1734 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:177093 (177.0 KB) TX bytes:177093 (177.0 KB)
ethtool -i enp5s0
输出:
driver: atl1c
version: 1.0.1.1-NAPI
firmware-version:
expansion-rom-version:
bus-info: 0000:05:00.0
supports-statistics: no
supports-test: no
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: no
编辑:像这样的命令sudo service networking restart
,sudo ifdown -a && sudo ifup -a
恢复连接,但不久之后它再次中断。
此外,当连接断开时,我仍然可以接收数据(观看 YouTube 视频、在聊天中接收消息、看到其他玩家在游戏中移动、听到其他人在 discord 中交谈,但我无法发送任何数据、无法加载任何页面(GET 请求未发送),没人听到我的声音)
编辑 2:Ubuntu 17.04 和 live USB ubuntu 17.04 上也发生了同样的情况。
答案1
买一根新电缆解决了这个问题——那根电缆在一处弯得很厉害。但我仍然不确定为什么 Windows 没有出现任何数据包丢失。