我已经按照以下设置,但仍然遭受低吞吐量和高延迟的困扰,但我不知道为什么会这样:
服务器 (192.168.2.2) <--> AP (192.168.2.1) <--> 笔记本电脑 (192.168.2.12) 服务器运行的是 Debian。以下是笔记本电脑的数据:
iwconfig
eth0 no wireless extensions.
lo no wireless extensions.
wlan0 IEEE 802.11bgn ESSID:"abc"
Mode:Managed Frequency:2.412 GHz Access Point: 44:44:67:E3:C9:25
Bit Rate=54 Mb/s Tx-Power=20 dBm
Retry long limit:7 RTS thr=2347 B Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=66/70 Signal level=-44 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:48 Missed beacon:0
这里有一些来自服务器 iwconfig lo no 无线扩展的数据。
eth0 no wireless extensions.
sit0 no wireless extensions.
ip6tnl0 no wireless extensions.
wlan0 IEEE 802.11bgn ESSID:"abc" Nickname:"<WIFI@REALTEK>"
Mode:Managed Frequency:2.412 GHz Access Point: 44:44:67:E3:C9:25
Bit Rate:72.2 Mb/s Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Encryption key:****-****-****-****-****-****-****-**** Security mode:open
Power Management:off
Link Quality=84/100 Signal level=46/100 Noise level=0/100
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
tun0 no wireless extensions.
我正在使用 iperf 测量连接速度,以下是来自服务器的数据:
iperf -s -p 80
------------------------------------------------------------
Server listening on TCP port 80
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[ 4] local 192.168.2.2 port 80 connected with 192.168.2.12 port 55385
[ ID] Interval Transfer Bandwidth
[ 4] 0.0-12.5 sec 384 KBytes 252 Kbits/sec
而且 ping 值也相当高,通常在 100-200 毫秒之间。
不确定是否有帮助,但这里是来自服务器的 iptables 规则:
iptables -S
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
- - - - - - - - - - - 编辑 - - - - - - - -
现在我通过电缆(eth0,ip:192.168.2.13)将笔记本电脑连接到 AP 并尝试相同操作,结果如下:
ping 192.168.2.2
PING 192.168.2.2 (192.168.2.2) 56(84) bytes of data.
64 bytes from 192.168.2.2: icmp_seq=1 ttl=64 time=2.19 ms
64 bytes from 192.168.2.2: icmp_seq=2 ttl=64 time=105 ms
64 bytes from 192.168.2.2: icmp_seq=3 ttl=64 time=62.1 ms
64 bytes from 192.168.2.2: icmp_seq=4 ttl=64 time=84.4 ms
64 bytes from 192.168.2.2: icmp_seq=5 ttl=64 time=110 ms
64 bytes from 192.168.2.2: icmp_seq=6 ttl=64 time=47.5 ms
64 bytes from 192.168.2.2: icmp_seq=7 ttl=64 time=2.42 ms
64 bytes from 192.168.2.2: icmp_seq=8 ttl=64 time=72.0 ms
64 bytes from 192.168.2.2: icmp_seq=9 ttl=64 time=95.0 ms
iperf -c 192.168.2.2 -p 80
------------------------------------------------------------
Client connecting to 192.168.2.2, TCP port 80
TCP window size: 22.9 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.2.13 port 51441 connected with 192.168.2.2 port 80
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.1 sec 6.12 MBytes 5.07 Mbits/sec
什么可能导致这种速度减慢?