安装

#wget http://downloads.es.net/pub/iperf/iperf-3.0.6.tar.gz
#tar zxvf iperf-3.0.6.tar.gz
# cd iperf-3.0.6
# ./configure
# make
# make install

------------------------------------------------------------
# iperf3 -s -i 2
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 109.105.30.161, port 51698
[  5] local 109.105.30.157 port 5201 connected to 109.105.30.161 port 51700
[ ID] Interval           Transfer     Bandwidth
[  5]   0.00-2.00   sec  66.2 MBytes   278 Mbits/sec                  
[  5]   2.00-4.00   sec  62.5 MBytes   262 Mbits/sec                  
[  5]   4.00-6.00   sec  73.0 MBytes   306 Mbits/sec                  
[  5]   6.00-8.00   sec  61.8 MBytes   259 Mbits/sec                  
[  5]   8.00-10.00  sec  61.2 MBytes   257 Mbits/sec                  
[  5]  10.00-10.17  sec   926 KBytes  45.5 Mbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  5]   0.00-10.17  sec   326 MBytes   269 Mbits/sec   92             sender
[  5]   0.00-10.17  sec   326 MBytes   269 Mbits/sec                  receiver
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------


# iperf3 -c 109.105.30.157 -i 2
Connecting to host 109.105.30.157, port 5201
[  4] local 109.105.30.161 port 51700 connected to 109.105.30.157 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-2.00   sec  67.8 MBytes   284 Mbits/sec   20    178 KBytes       
[  4]   2.00-4.00   sec  62.3 MBytes   261 Mbits/sec   52    222 KBytes       
[  4]   4.00-6.02   sec  73.6 MBytes   306 Mbits/sec   19    255 KBytes       
[  4]   6.02-8.00   sec  61.4 MBytes   259 Mbits/sec    0    314 KBytes       
[  4]   8.00-10.13  sec  60.7 MBytes   240 Mbits/sec    1    308 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.13  sec   326 MBytes   270 Mbits/sec   92             sender
[  4]   0.00-10.13  sec   326 MBytes   270 Mbits/sec                  receiver