安装
在Ubuntu上安装
sudo apt install iperf
在centos上安装
yum install epel-release
yum install iperf
启动
注意要在服务端关闭防火墙iptables -F
这个软件需要在客户端和服务端都启动,才能进行连接测试。
在服务端启动
iperf -s
在客户端启动
iperf -c 10.168.85.178
测试结果
万兆网
scutech@infokist:~$ iperf -c 10.168.85.178 -i 1 ------------------------------------------------------------ Client connecting to 10.168.85.178, TCP port 5001 TCP window size: 85.0 KByte (default) ------------------------------------------------------------ [ 3] local 10.168.85.155 port 50438 connected with 10.168.85.178 port 5001 [ ID] Interval Transfer Bandwidth [ 3] 0.0- 1.0 sec 1.08 GBytes 9.25 Gbits/sec [ 3] 1.0- 2.0 sec 1.10 GBytes 9.42 Gbits/sec [ 3] 2.0- 3.0 sec 1.10 GBytes 9.41 Gbits/sec [ 3] 3.0- 4.0 sec 1.10 GBytes 9.42 Gbits/sec [ 3] 4.0- 5.0 sec 1.10 GBytes 9.42 Gbits/sec [ 3] 5.0- 6.0 sec 1.10 GBytes 9.41 Gbits/sec [ 3] 6.0- 7.0 sec 1.10 GBytes 9.41 Gbits/sec [ 3] 7.0- 8.0 sec 1.10 GBytes 9.41 Gbits/sec [ 3] 8.0- 9.0 sec 1.10 GBytes 9.42 Gbits/sec [ 3] 0.0-10.0 sec 10.9 GBytes 9.40 Gbits/sec
千兆网
scutech@infokist:~$ iperf -c 192.168.87.178 -i 1 ------------------------------------------------------------ Client connecting to 192.168.87.178, TCP port 5001 TCP window size: 85.0 KByte (default) ------------------------------------------------------------ [ 3] local 192.168.87.155 port 49080 connected with 192.168.87.178 port 5001 [ ID] Interval Transfer Bandwidth [ 3] 0.0- 1.0 sec 113 MBytes 949 Mbits/sec [ 3] 1.0- 2.0 sec 112 MBytes 942 Mbits/sec [ 3] 2.0- 3.0 sec 112 MBytes 942 Mbits/sec [ 3] 3.0- 4.0 sec 112 MBytes 943 Mbits/sec [ 3] 4.0- 5.0 sec 113 MBytes 946 Mbits/sec [ 3] 5.0- 6.0 sec 112 MBytes 940 Mbits/sec [ 3] 6.0- 7.0 sec 112 MBytes 938 Mbits/sec [ 3] 7.0- 8.0 sec 112 MBytes 942 Mbits/sec [ 3] 8.0- 9.0 sec 112 MBytes 943 Mbits/sec [ 3] 9.0-10.0 sec 112 MBytes 942 Mbits/sec [ 3] 0.0-10.0 sec 1.10 GBytes 942 Mbits/sec
服务端
[root@localhost ~]# iperf -s ------------------------------------------------------------ Server listening on TCP port 5001 TCP window size: 85.3 KByte (default) ------------------------------------------------------------ [ 4] local 10.168.85.178 port 5001 connected with 10.168.85.155 port 50436 [ ID] Interval Transfer Bandwidth [ 4] 0.0-10.0 sec 10.9 GBytes 9.38 Gbits/sec [ 4] local 10.168.85.178 port 5001 connected with 10.168.85.155 port 50438 [ 4] 0.0-10.0 sec 10.9 GBytes 9.40 Gbits/sec [ 4] local 192.168.87.178 port 5001 connected with 192.168.87.155 port 49080 [ 4] 0.0-10.0 sec 1.10 GBytes 942 Mbits/sec