OPENWRT使用iperf3测试内网带宽的方法
OPENWRT使用iperf3测试内网带宽的方法,首先OPENWRT需要安装netspeedtest组件
netspeedtest组件依赖iperf3组件,直接在OPENWRT-软件包-搜索“netspeedtest”安装即可
所以,客户端也需要安装iperf3
比如Mac系统下安装iperf3
brew install iperf3
在客户端使用以下命令测试内网带宽,
iperf3 -c 10.0.0.1
返回如下数据,
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Connecting to host 10.0.0.1, port 5201
[ 5] local 10.0.0.119 port 50895 connected to 10.0.0.1 port 5201
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 18.0 MBytes 151 Mbits/sec
[ 5] 1.00-2.00 sec 10.7 MBytes 89.7 Mbits/sec
[ 5] 2.00-3.00 sec 9.69 MBytes 81.3 Mbits/sec
[ 5] 3.00-4.00 sec 6.15 MBytes 51.6 Mbits/sec
[ 5] 4.00-5.00 sec 8.29 MBytes 69.5 Mbits/sec
[ 5] 5.00-6.00 sec 9.30 MBytes 78.1 Mbits/sec
[ 5] 6.00-7.00 sec 10.5 MBytes 88.0 Mbits/sec
[ 5] 7.00-8.00 sec 11.2 MBytes 94.0 Mbits/sec
[ 5] 8.00-9.00 sec 9.31 MBytes 78.0 Mbits/sec
[ 5] 9.00-10.00 sec 8.74 MBytes 73.3 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate
[ 5] 0.00-10.00 sec 102 MBytes 85.4 Mbits/sec sender
[ 5] 0.00-10.01 sec 102 MBytes 85.2 Mbits/sec receiver
建议多测试几次,因为使用的是软路由,某无线路由器做为AP,感觉数据不理想
尤其是第一次测试时,带宽数据非常差,下面是第一次测试的数据
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
iperf3 -c 10.0.0.1
Connecting to host 10.0.0.1, port 5201
[ 5] local 10.0.0.119 port 50882 connected to 10.0.0.1 port 5201
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 11.1 MBytes 92.8 Mbits/sec
[ 5] 1.00-2.00 sec 9.59 MBytes 80.3 Mbits/sec
[ 5] 2.00-3.00 sec 10.3 MBytes 86.5 Mbits/sec
[ 5] 3.00-4.00 sec 5.78 MBytes 48.5 Mbits/sec
[ 5] 4.00-5.00 sec 4.55 MBytes 38.2 Mbits/sec
[ 5] 5.00-6.00 sec 3.05 MBytes 25.6 Mbits/sec
[ 5] 6.00-7.01 sec 797 KBytes 6.49 Mbits/sec
[ 5] 7.01-8.00 sec 1.35 MBytes 11.4 Mbits/sec
[ 5] 8.00-9.00 sec 816 KBytes 6.69 Mbits/sec
[ 5] 9.00-10.01 sec 266 KBytes 2.17 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate
[ 5] 0.00-10.01 sec 47.5 MBytes 39.9 Mbits/sec sender
[ 5] 0.00-10.05 sec 47.4 MBytes 39.6 Mbits/sec receiver
iperf Done.