我有一台运行 ubuntu 16.04 的 Linux 服务器,最近我买了一个 USB wifi 适配器,这样我的服务器就可以使用 wifi 了。但是网络不稳定,经常掉线,ping 值很高。
我通过同一个网络与路由器距离不到10英尺的机器ping一下,结果如下:
LM-CHD:~ xuanyue$ ping 192.168.100.164
PING 192.168.100.164 (192.168.100.164): 56 data bytes
64 bytes from 192.168.100.164: icmp_seq=0 ttl=64 time=194.532 ms
64 bytes from 192.168.100.164: icmp_seq=1 ttl=64 time=273.482 ms
Request timeout for icmp_seq 2
64 bytes from 192.168.100.164: icmp_seq=3 ttl=64 time=269.793 ms
Request timeout for icmp_seq 4
Request timeout for icmp_seq 5
64 bytes from 192.168.100.164: icmp_seq=6 ttl=64 time=173.481 ms
64 bytes from 192.168.100.164: icmp_seq=7 ttl=64 time=557.815 ms
64 bytes from 192.168.100.164: icmp_seq=8 ttl=64 time=92.184 ms
Request timeout for icmp_seq 9
64 bytes from 192.168.100.164: icmp_seq=10 ttl=64 time=163.623 ms
^C
--- 192.168.100.164 ping statistics ---
11 packets transmitted, 7 packets received, 36.4% packet loss
此 wifi 适配器使用 Realtek8822B芯片。根据买家的评论,目前还没有官方驱动程序支持该芯片,所以我怀疑驱动程序导致网络变慢。但我如何确认驱动程序是根本原因而不是其他原因?
lsusb,最后一个
jinxuanw@jinxuanw-server:~$ lsusb
Bus 002 Device 002: ID 8087:8000 Intel Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 005: ID 0bda:b812 Realtek Semiconductor Corp.
从服务器到同一网络中的 MacBook 的跟踪路由:
jinxuanw@jinxuanw-server:~$ sudo traceroute -I 192.168.100.107
traceroute to 192.168.100.107 (192.168.100.107), 30 hops max, 60 byte packets
1 192.168.100.107 (192.168.100.107) 7.596 ms 7.550 ms 7.537 ms
ping 8.8.8.8:
jinxuanw@jinxuanw-server:~$ ping -c3 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=252 time=635 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=252 time=212 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=252 time=174 ms
我的 MacBook 在同一个网络中:
LM-CHD:~ xuanyue$ ping -c3 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: icmp_seq=0 ttl=252 time=232.117 ms
64 bytes from 8.8.8.8: icmp_seq=1 ttl=252 time=25.959 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=252 time=24.984 ms
uname 输出:4.13.0-37-generic