网络性能测试之iperf的安装使用
Iperf 是一个网络性能测试工具。Iperf可以测试TCP和UDP带宽质量。Iperf可以测量最大TCP带宽,具有多种参数和UDP特性。Iperf可以报告带宽,延迟抖动和数据包丢失。
Iperf使用方法与参数说明
参数说明
-s 以server模式启动,eg:iperf -s
-c host以client模式启动,host是server端地址,eg:iperf -c 222.35.11.23
通用参数
-f [k|m|K|M] 分别表示以Kbits, Mbits, KBytes, MBytes显示报告,默认以Mbits为单位,eg:iperf -c 222.35.11.23 -f K
-i sec 以秒为单位显示报告间隔,eg:iperf -c 222.35.11.23 -i 2
-l 缓冲区大小,默认是8KB,eg:iperf -c 222.35.11.23 -l 16
-m 显示tcp最大mtu值
-o 将报告和错误信息输出到文件eg:iperf -c 222.35.11.23 -o c:\iperflog.txt
-p 指定服务器端使用的端口或客户端所连接的端口eg:iperf -s -p 9999;iperf -c 222.35.11.23 -p 9999
-u 使用udp协议
-w 指定TCP窗口大小,默认是8KB
-B 绑定一个主机地址或接口(当主机有多个地址或接口时使用该参数)
-C 兼容旧版本(当server端和client端版本不一样时使用)
-M 设定TCP数据包的最大mtu值
-N 设定TCP不延时
-V 传输ipv6数据包
server专用参数
-D 以服务方式运行ipserf,eg:iperf -s -D
-R 停止iperf服务,针对-D,eg:iperf -s -R
client端专用参数
-d 同时进行双向传输测试
-n 指定传输的字节数,eg:iperf -c 222.35.11.23 -n 100000
-r 单独进行双向传输测试
-t 测试时间,默认10秒,eg:iperf -c 222.35.11.23 -t 5
-F 指定需要传输的文件
-T 指定ttl值
001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
021
022
023
024
025
026
027
028
029
030
031
032
033
034
035
036
037
038
039
040
041
042
043
044
045
046
047
048
049
050
051
052
053
054
055
056
057
058
059
060
061
062
063
064
065
066
067
068
069
070
071
072
073
074
075
076
077
078
079
080
081
082
083
084
085
086
087
088
089
090
091
092
093
094
095
096
097
098
099
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
|
[root@server1 opt] # tar -xzvf iperf-2.0.4.tar.gz
[root@server1 opt] # cd iperf-2.0.4
[root@server1 iperf-2.0.4] # ./configure
[root@server1 iperf-2.0.4] # make && make install
同样分为服务端和客户端 按照以上方法分别安装于两台linux服务器 在其中一台启动iperf [root@server1 iperf-2.0.4] #iperf -s -D
Running Iperf Server as a daemon The Iperf daemon process ID : 12091 从另外一台连接过来 [root@server2 iperf-2.0.4] # iperf -c 10.10.10.130 -i 1
------------------------------------------------------------ Client connecting to 10.10.10.130, TCP port 5001 TCP window size: 40.2 KByte (default) ------------------------------------------------------------ [ 3] local 10.10.10.131 port 33745 connected with 10.10.10.130 port 5001
[ ID] Interval Transfer Bandwidth [ 3] 0.0- 1.0 sec 21.8 MBytes 183 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 1.0- 2.0 sec 22.1 MBytes 185 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 2.0- 3.0 sec 18.3 MBytes 154 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 3.0- 4.0 sec 21.7 MBytes 182 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 4.0- 5.0 sec 21.1 MBytes 177 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 5.0- 6.0 sec 21.1 MBytes 177 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 6.0- 7.0 sec 21.1 MBytes 177 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 7.0- 8.0 sec 20.9 MBytes 176 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 8.0- 9.0 sec 21.8 MBytes 183 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 9.0-10.0 sec 21.5 MBytes 181 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 0.0-10.0 sec 212 MBytes 177 Mbits /sec
[root@server2 iperf-2.0.4] # iperf -c 10.10.10.130 -M -i 1
iperf: ignoring extra argument -- 1 ------------------------------------------------------------ Client connecting to 10.10.10.130, TCP port 5001 TCP window size: 16.0 KByte (default) ------------------------------------------------------------ [ 3] local 10.10.10.131 port 33746 connected with 10.10.10.130 port 5001
[ ID] Interval Transfer Bandwidth [ 3] 0.0-10.0 sec 319 MBytes 267 Mbits /sec
[root@server2 iperf-2.0.4] # iperf -c 10.10.10.130 -f M -i 1
------------------------------------------------------------ Client connecting to 10.10.10.130, TCP port 5001 TCP window size: 0.03 MByte (default) ------------------------------------------------------------ [ 3] local 10.10.10.131 port 33747 connected with 10.10.10.130 port 5001
[ ID] Interval Transfer Bandwidth [ 3] 0.0- 1.0 sec 23.6 MBytes 23.6 MBytes /sec
[ ID] Interval Transfer Bandwidth [ 3] 1.0- 2.0 sec 21.9 MBytes 21.9 MBytes /sec
[ ID] Interval Transfer Bandwidth [ 3] 2.0- 3.0 sec 22.8 MBytes 22.8 MBytes /sec
[ ID] Interval Transfer Bandwidth [ 3] 3.0- 4.0 sec 22.7 MBytes 22.7 MBytes /sec
[ ID] Interval Transfer Bandwidth [ 3] 4.0- 5.0 sec 22.4 MBytes 22.4 MBytes /sec
[ ID] Interval Transfer Bandwidth [ 3] 5.0- 6.0 sec 22.9 MBytes 22.9 MBytes /sec
[ ID] Interval Transfer Bandwidth [ 3] 6.0- 7.0 sec 22.2 MBytes 22.2 MBytes /sec
[ ID] Interval Transfer Bandwidth [ 3] 7.0- 8.0 sec 22.4 MBytes 22.4 MBytes /sec
[ ID] Interval Transfer Bandwidth [ 3] 8.0- 9.0 sec 22.7 MBytes 22.7 MBytes /sec
[ ID] Interval Transfer Bandwidth [ 3] 9.0-10.0 sec 22.5 MBytes 22.5 MBytes /sec
[ ID] Interval Transfer Bandwidth [ 3] 0.0-10.0 sec 226 MBytes 22.6 MBytes /sec
[root@server2 iperf-2.0.4] # iperf -c 10.10.10.130 -f M -u -i 1
------------------------------------------------------------ Client connecting to 10.10.10.130, UDP port 5001 Sending 1470 byte datagrams UDP buffer size: 0.10 MByte (default) ------------------------------------------------------------ [ 3] local 10.10.10.131 port 36631 connected with 10.10.10.130 port 5001
write2 failed: Connection refused [ ID] Interval Transfer Bandwidth read failed: Connection refused
[ 3] WARNING: did not receive ack of last datagram after 1 tries. [ 3] 0.0- 0.1 sec 0.00 MBytes 0.01 MBytes /sec
[ 3] Sent 1 datagrams [root@server2 iperf-2.0.4] # iperf -c 10.10.10.130 -f M u -i 1
iperf: ignoring extra argument -- u ------------------------------------------------------------ Client connecting to 10.10.10.130, TCP port 5001 TCP window size: 0.03 MByte (default) ------------------------------------------------------------ [ 3] local 10.10.10.131 port 56851 connected with 10.10.10.130 port 5001
[ ID] Interval Transfer Bandwidth [ 3] 0.0- 1.0 sec 24.0 MBytes 24.0 MBytes /sec
[ ID] Interval Transfer Bandwidth [ 3] 1.0- 2.0 sec 22.2 MBytes 22.2 MBytes /sec
[ ID] Interval Transfer Bandwidth [ 3] 2.0- 3.0 sec 22.8 MBytes 22.8 MBytes /sec
[ ID] Interval Transfer Bandwidth [ 3] 3.0- 4.0 sec 22.4 MBytes 22.4 MBytes /sec
[ ID] Interval Transfer Bandwidth [ 3] 4.0- 5.0 sec 22.2 MBytes 22.2 MBytes /sec
[ ID] Interval Transfer Bandwidth [ 3] 5.0- 6.0 sec 22.9 MBytes 22.9 MBytes /sec
[ ID] Interval Transfer Bandwidth [ 3] 6.0- 7.0 sec 22.3 MBytes 22.3 MBytes /sec
[ ID] Interval Transfer Bandwidth [ 3] 7.0- 8.0 sec 22.8 MBytes 22.8 MBytes /sec
[ ID] Interval Transfer Bandwidth [ 3] 8.0- 9.0 sec 22.8 MBytes 22.8 MBytes /sec
[ ID] Interval Transfer Bandwidth [ 3] 9.0-10.0 sec 22.6 MBytes 22.6 MBytes /sec
[ ID] Interval Transfer Bandwidth [ 3] 0.0-10.0 sec 227 MBytes 22.7 MBytes /sec
[root@server2 iperf-2.0.4] #
[root@server2 iperf-2.0.4] # iperf -c 10.10.10.130 -i 1 -w 2048
------------------------------------------------------------ Client connecting to 10.10.10.130, TCP port 5001 TCP window size: 4.00 KByte (WARNING: requested 2.00 KByte) ------------------------------------------------------------ [ 3] local 10.10.10.131 port 56582 connected with 10.10.10.130 port 5001
[ ID] Interval Transfer Bandwidth [ 3] 0.0- 1.0 sec 2.09 MBytes 17.6 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 1.0- 2.0 sec 2.05 MBytes 17.2 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 2.0- 3.0 sec 2.02 MBytes 16.9 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 3.0- 4.0 sec 2.12 MBytes 17.8 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 4.0- 5.0 sec 2.07 MBytes 17.4 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 5.0- 6.0 sec 1.82 MBytes 15.3 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 6.0- 7.0 sec 1.93 MBytes 16.2 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 7.0- 8.0 sec 2.06 MBytes 17.3 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 8.0- 9.0 sec 2.12 MBytes 17.8 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 9.0-10.0 sec 2.12 MBytes 17.8 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 0.0-10.0 sec 20.4 MBytes 17.1 Mbits /sec
[root@server2 iperf-2.0.4] # iperf -c 10.10.10.130 -i 1 -w 20480
------------------------------------------------------------ Client connecting to 10.10.10.130, TCP port 5001 TCP window size: 40.0 KByte (WARNING: requested 20.0 KByte) ------------------------------------------------------------ [ 3] local 10.10.10.131 port 56583 connected with 10.10.10.130 port 5001
[ ID] Interval Transfer Bandwidth [ 3] 0.0- 1.0 sec 8.56 MBytes 71.8 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 1.0- 2.0 sec 7.51 MBytes 63.0 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 2.0- 3.0 sec 7.24 MBytes 60.8 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 3.0- 4.0 sec 6.79 MBytes 57.0 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 4.0- 5.0 sec 7.85 MBytes 65.9 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 5.0- 6.0 sec 6.16 MBytes 51.7 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 6.0- 7.0 sec 8.26 MBytes 69.3 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 7.0- 8.0 sec 8.36 MBytes 70.1 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 8.0- 9.0 sec 8.59 MBytes 72.0 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 9.0-10.0 sec 8.14 MBytes 68.3 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 0.0-10.0 sec 77.5 MBytes 65.0 Mbits /sec
[root@server2 iperf-2.0.4] # iperf -c 10.10.10.130 -i 1 -w 204800
------------------------------------------------------------ Client connecting to 10.10.10.130, TCP port 5001 TCP window size: 256 KByte (WARNING: requested 200 KByte) ------------------------------------------------------------ [ 3] local 10.10.10.131 port 56584 connected with 10.10.10.130 port 5001
[ ID] Interval Transfer Bandwidth [ 3] 0.0- 1.0 sec 23.2 MBytes 194 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 1.0- 2.0 sec 22.0 MBytes 185 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 2.0- 3.0 sec 22.2 MBytes 187 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 3.0- 4.0 sec 22.5 MBytes 189 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 4.0- 5.0 sec 22.3 MBytes 187 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 5.0- 6.0 sec 22.6 MBytes 190 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 6.0- 7.0 sec 22.1 MBytes 185 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 7.0- 8.0 sec 22.3 MBytes 187 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 8.0- 9.0 sec 22.6 MBytes 190 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 9.0-10.0 sec 22.4 MBytes 188 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 0.0-10.0 sec 224 MBytes 188 Mbits /sec
[root@server2 iperf-2.0.4] # iperf -c 10.10.10.130 -i 1 -w 2048000
------------------------------------------------------------ Client connecting to 10.10.10.130, TCP port 5001 TCP window size: 256 KByte (WARNING: requested 1.95 MByte) ------------------------------------------------------------ [ 3] local 10.10.10.131 port 56585 connected with 10.10.10.130 port 5001
[ ID] Interval Transfer Bandwidth [ 3] 0.0- 1.0 sec 24.5 MBytes 205 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 1.0- 2.0 sec 21.9 MBytes 184 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 2.0- 3.0 sec 22.8 MBytes 191 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 3.0- 4.0 sec 22.4 MBytes 188 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 4.0- 5.0 sec 22.8 MBytes 191 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 5.0- 6.0 sec 22.6 MBytes 190 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 6.0- 7.0 sec 22.1 MBytes 185 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 7.0- 8.0 sec 22.8 MBytes 191 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 8.0- 9.0 sec 22.4 MBytes 188 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 9.0-10.0 sec 22.6 MBytes 190 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 0.0-10.0 sec 227 MBytes 190 Mbits /sec
[root@server2 iperf-2.0.4] # iperf -c 10.10.10.130 -i 1 -w 20480000
------------------------------------------------------------ Client connecting to 10.10.10.130, TCP port 5001 TCP window size: 256 KByte (WARNING: requested 19.5 MByte) ------------------------------------------------------------ [ 3] local 10.10.10.131 port 56586 connected with 10.10.10.130 port 5001
[ ID] Interval Transfer Bandwidth [ 3] 0.0- 1.0 sec 22.8 MBytes 191 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 1.0- 2.0 sec 22.4 MBytes 188 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 2.0- 3.0 sec 22.9 MBytes 192 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 3.0- 4.0 sec 22.5 MBytes 188 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 4.0- 5.0 sec 22.5 MBytes 189 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 5.0- 6.0 sec 22.5 MBytes 189 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 6.0- 7.0 sec 22.4 MBytes 188 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 7.0- 8.0 sec 22.7 MBytes 190 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 8.0- 9.0 sec 22.3 MBytes 187 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 9.0-10.0 sec 22.4 MBytes 188 Mbits /sec
[ ID] Interval Transfer Bandwidth [ 3] 0.0-10.0 sec 225 MBytes 189 Mbits /sec
[root@server2 iperf-2.0.4] #
|
相关推荐
iperf是一款广泛使用的...总结,iperf是一个强大的网络性能测试工具,无论是在Windows还是Linux环境中,都可以轻松安装并使用。通过调整不同的参数,可以全面了解网络的性能特性,对网络优化和故障排查具有重要的作用。
Iperf是一个网络性能测试工具,可以测试TCP和UDP带宽质量,能够测量最大TCP带宽,具有多种参数和UDP特性。Iperf可以报告带宽,延迟抖动和数据包丢失。 Iperf的主要特点: * 测试TCP和UDP带宽质量 * 报告带宽,延迟...
总的来说,Iperf 2.05作为一款网络性能测试工具,凭借其跨平台性、易用性和全面的性能评估能力,成为网络管理员和开发者不可或缺的工具之一。通过理解和熟练运用Iperf,我们可以更好地理解和优化网络环境,提升系统...
iperf3 是一个款常见的网络带宽测试工具,能够进行网络吞吐量的测试,也能客观的测试出网络的转发速率,做为一款网络性能测试工具。Iperf可以测试最大TCP和UDP带宽性能,具有多种参数和UDP特性,可以根据需要调整,...
iperf是一款广泛使用的开源网络性能测试工具,尤其在Linux环境下,它被用来评估网络的带宽、延迟和其他关键性能指标。这款工具支持TCP和UDP协议,可以进行双向(bidirectional)传输测试,同时提供丰富的参数调整,...
iperf 是一款强大的网络性能测试工具,主要用于评估和测量网络的带宽、延迟以及数据传输速率等关键性能指标。在Windows、Linux以及其他多种操作系统上都可使用,它提供了命令行界面,使得网络管理员和开发人员能够...
在没有安装iperf的情况下,将这个文件拷贝到目标机器上即可进行网络性能测试。 总结来说,iperf是一款强大的网络性能测试工具,通过其丰富的功能和灵活的参数设置,用户可以全面了解网络的性能状态,从而进行有效的...
总之,iperf是一款强大的网络性能测试工具,无论你是网络管理员还是开发者,都应该掌握其使用技巧,以便更好地理解和优化网络性能。通过阅读`iperf安装与使用.txt`文档,你可以深入了解iperf的全部功能,并根据需要...
iperf3是一款强大的网络性能测试工具,主要用于评估和分析网络的传输速度、带宽利用率以及网络连接的稳定性。它能够帮助网络管理员、开发者或者普通用户了解网络的实际性能,以便进行故障排查、网络优化或者系统调优...
Iperf是一个网络性能测试工具,Iperf可以测试最大TCP和UDP带宽性能,Iperf具有多种参数和UDP特性,可以根据需要调整,Iperf可以报告带宽,延迟抖动和数据包丢失. 源自国外,利用BAT将软件简化了一下,无技术含量,只是为了拿...
iperf 是一款强大的网络性能测试工具,尤其在无线WiFi网络测试方面表现突出。它通过发送TCP或UDP数据包来衡量网络连接的速度、带宽、延迟和丢包率,从而帮助用户评估WiFi网络的性能和稳定性。本文将详细介绍iperf的...
iperf3是一款强大的网络性能测试工具,它可以帮助我们测量TCP和UDP的带宽、延迟抖动以及数据包丢失率。下面将详细介绍如何在没有互联网的情况下,在Ubuntu 20.04上安装iperf3。 首先,你需要在有网络的环境中下载...
`iperf` 是一个广泛使用的网络性能测试工具,主要用于测量网络带宽、延迟以及数据传输的稳定性。在 Android 平台上,`iperf` 通常被开发成 APP 形式,以便用户能够方便地在移动设备上进行网络性能测试。以下将详细...
iperf是一款广泛使用的开源网络性能测试工具,它可以帮助网络管理员和开发者评估网络的带宽、延迟和数据包丢失等关键性能指标。这个工具支持TCP和UDP两种传输协议,可以进行单向或双向的数据流测试,适用于多种操作...
iperf3是一款强大的网络性能测试工具,适用于多种操作系统,包括Windows和Android。它主要用于测量和评估网络连接的速度、带宽和吞吐量,是网络管理员、开发者和普通用户诊断网络性能问题的重要工具。 在Windows...
iperf 是一个强大的网络性能测试工具,主要用于评估和测量网络的带宽、延迟以及数据传输效率。它在Linux操作系统中广泛使用,同时也适用于其他平台,如Windows和macOS。iperf提供了一个用户友好的命令行界面,使得...