1.保证两台主机在同一个LAN内,彼此可以ping通对方;
host1: 192.168.3.10
host2:192.168.3.1
2.host2一方做server:
在host2上启动server:iperf -s &
[root@rk3399:/opt]# iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[ 4] local 192.168.112.16 port 5001 connected with 192.168.112.254 port 43928
[ ID] Interval Transfer Bandwidth
[ 4] 0.0-10.0 sec 1.03 GBytes 885 Mbits/sec
[ 4] local 192.168.112.16 port 5001 connected with 192.168.112.254 port 43930
[ 4] 0.0-10.0 sec 1.09 GBytes 936 Mbits/sec
3. host1做client,连接host2进行测试:
iperf -c 192.168.3.1 -i 1
[root@rk3399:/opt]# iperf -c 192.168.112.60 -i 1
------------------------------------------------------------
Client connecting to 192.168.112.60, TCP port 5001
TCP window size: 45.0 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.112.16 port 56684 connected with 192.168.112.60 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0- 1.0 sec 88.4 MBytes 741 Mbits/sec
[ 3] 1.0- 2.0 sec 112 MBytes 941 Mbits/sec
[ 3] 2.0- 3.0 sec 112 MBytes 943 Mbits/sec
[ 3] 3.0- 4.0 sec 112 MBytes 941 Mbits/sec
[ 3] 4.0- 5.0 sec 112 MBytes 944 Mbits/sec
[ 3] 5.0- 6.0 sec 112 MBytes 941 Mbits/sec
[ 3] 6.0- 7.0 sec 112 MBytes 944 Mbits/sec
[ 3] 7.0- 8.0 sec 112 MBytes 944 Mbits/sec
[ 3] 8.0- 9.0 sec 112 MBytes 938 Mbits/sec
[ 3] 9.0-10.0 sec 112 MBytes 944 Mbits/sec
[ 3] 0.0-10.0 sec 1.07 GBytes 922 Mbits/sec
4.收+发双测试:这个很实用,可以同时测到双向的速度
iperf -c 192.168.3.1 -i 1 -d
信息加载中,请等待
微信客服(速回)
微信客服(慢回)