![如何诊断 Ubuntu 服务器通过 wifi 丢失的大量数据包(而 Windows 可以全部获取!)](https://linux22.com/image/1061091/%E5%A6%82%E4%BD%95%E8%AF%8A%E6%96%AD%20Ubuntu%20%E6%9C%8D%E5%8A%A1%E5%99%A8%E9%80%9A%E8%BF%87%20wifi%20%E4%B8%A2%E5%A4%B1%E7%9A%84%E5%A4%A7%E9%87%8F%E6%95%B0%E6%8D%AE%E5%8C%85%EF%BC%88%E8%80%8C%20Windows%20%E5%8F%AF%E4%BB%A5%E5%85%A8%E9%83%A8%E8%8E%B7%E5%8F%96%EF%BC%81%EF%BC%89.png)
我在本地网络上有几台服务器,主要是 Windows 2008、2012 和一台 Ubuntu 服务器。
大约一个月以来,我在使用 Ubuntu 服务器时遇到了问题:如果我通过 ssh 连接,它会在几秒钟后挂起,如果我 ping 它,则会丢失大量数据包:
这个测试是通过 wifi 完成的,下面是从我的工作站 ping 网关:
--- 10.39.52.240 ping statistics ---
25 packets transmitted, 25 received, 0% packet loss, time 24036ms
rtt min/avg/max/mdev = 1.793/4.934/54.950/10.256 ms
这里有一个 Windows 服务器:
--- 10.39.52.9 ping statistics ---
25 packets transmitted, 25 received, 0% packet loss, time 24042ms
rtt min/avg/max/mdev = 1.397/2.386/5.093/1.030 ms
这是 Ubuntu 服务器,42% 的数据包丢失
--- 10.39.52.12 ping statistics ---
28 packets transmitted, 16 received, 42% packet loss, time 27073ms
rtt min/avg/max/mdev = 1.408/5.281/42.693/9.830 ms
正在 Ping从将 Ubuntu 服务器迁移至 Windows 服务器,电缆连接,可以:
--- 10.39.52.9 ping statistics ---
1255 packets transmitted, 1255 received, 0% packet loss, time 1255013ms
rtt min/avg/max/mdev = 0.169/0.347/1.227/0.151 ms
正在 Ping从将 Windows 服务器迁移至 Ubuntu 服务器,电缆连接,可以:
Ping statistics for 10.39.52.12:
Packets: Sent = 41, Received = 41, Lost = 0
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
因此我尝试使用以下方式从我的工作站 ping Ubuntu 服务器电缆连接,一切正常:
--- 10.39.52.12 ping statistics ---
25 packets transmitted, 25 received, 0% packet loss, time 23999ms
rtt min/avg/max/mdev = 0.201/0.306/0.532/0.058 ms
那么,为什么只能通过 WiFi 连接到 Ubuntu 服务器?为什么不 ping Windows?
我该如何诊断这个问题?