iperf-使用总结.doc_第1页
iperf-使用总结.doc_第2页
iperf-使用总结.doc_第3页
iperf-使用总结.doc_第4页
iperf-使用总结.doc_第5页
免费预览已结束,剩余4页可下载查看

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

iperf 使用总结Iperf 是一个 TCP/IP 和 UDP/IP 的性能测量工具,能够提供网络吞吐率信息,以及震动、丢包率、最大段和最大传输单元大小等统计信息;从而能够帮助我们测试网络性能,定位网络瓶颈。参数说明-s 以server模式启动,eg:iperf -s-c 以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 2iperf是client端向server端发送数据server端显示的是接收速率,最好加i参数,进行速率跟踪client 显示的是发送速率server 显示接收速率-l MTU可以使用不同的包长,进行测试-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协议测试htb的时候最好用udp,udp通信开销小,测试的带宽更准确-w 指定TCP窗口大小,默认是8KB 或者tcp/udp buffer size如果窗口太小,有可能丢包-B 绑定一个主机地址或接口(当主机有多个地址或接口时使用该参数)-C 兼容旧版本(当server端和client端版本不一样时使用)-M 设定TCP数据包的最大mtu值-N 设定TCP不延时-V 传输ipv6数据包server专用参数-D 以服务方式运行ipserf,eg:iperf -s -D-R 停止iperf服务,针对-D,eg:iperf -s -Rclient端专用参数-d 同时进行双向传输测试-n 指定传输的字节数,eg:iperf -c 222.35.11.23 -n 100000-r 单独进行双向传输测试-b 指定发送带宽,默认是1Mbit/s在测试qos的时候,这是最有用的参数。-t 测试时间,默认10秒,eg:iperf -c 222.35.11.23 -t 5默认是10s-F 指定需要传输的文件-T 指定ttl值-l参数是制定包的长度,不应该超过1500,不加-u参数就是测试tcp。增加-P, -parallel#$IPERF_PARALLEL线程数。指定客户端与服务端之间使用的线程数。默认是1线程。需要客户端与服务器端同时使用此参数。在开了超线程以后,就可以达到“指定”较大TCP带宽的目的。进行TCP测试的时候,指定带宽比如300M,在测试UDP的时候可以这样实现:iperf-chostIP-pxxx-i2-u-b200M-nxxxx-txxxx但是测试TCP的话,不能简单的这样替换:iperf-chostIP-pxxx-i2-t-b200M -P 10 -nxxxx-txxxx1912 local 172.25.27.79 port 2840 connected with 172.27.1.118 port 5001 ID Interval Transfer Bandwidth1912 0.0- 2.0 sec 488 KBytes 2.00 Mbits/sec1912 2.0- 4.0 sec 488 KBytes 2.00 Mbits/sec1912 4.0- 6.0 sec 487 KBytes 1.99 Mbits/sec1912 0.0- 6.3 sec 1.50 MBytes 2.00 Mbits/sec有人会问,为什么transer 和bandwidth速度不一样,那是因为B和b的关系.C:iperf -c 172.27.1.118 -t 60 -o c:test.txt -b 10M -w 60K -i 2 -uWARNING: option -b implies udp testing-Client connecting to 172.27.1.118, UDP port 5001Sending 1470 byte datagramsUDP buffer size: 60.00 KByte-1912 local 172.25.27.79 port 3246 connected with 172.27.1.118 port 5001 ID Interval Transfer Bandwidth1912 0.0- 2.0 sec 2.37 MBytes 9.93 Mbits/sec1912 2.0- 4.0 sec 2.30 MBytes 9.63 Mbits/sec1912 0.0- 4.5 sec 5.30 MBytes 9.80 Mbits/sec1912 Server Report: jitter lost/total 1912 0.0- 4.6 sec 5.21 MBytes 9.49 Mbits/sec 0.051 ms 60/ 3778 (1.6%)1912 Sent 3778 datagramstest result display the jitter lost/total.Sometimes it can not display,please add the parameter -w 60K to increase the TCP/UDP buffer单独进行双向测试,先upload在downloadC:iperf -c 172.27.1.118 -t 60 -o c:test.txt -b 10M -w 60K -i 2 -u -rWARNING: option -b implies udp testing-Server listening on UDP port 5001Receiving 1470 byte datagramsUDP buffer size: 60.0 KByte-Client connecting to 172.27.1.118, UDP port 5001Sending 1470 byte datagramsUDP buffer size: 60.0 KByte-1868 local 172.25.27.79 port 3402 connected with 172.27.1.118 port 5001 ID Interval Transfer Bandwidth1868 0.0- 2.0 sec 2.38 MBytes 9.97 Mbits/sec1868 2.0- 4.0 sec 2.38 MBytes 9.97 Mbits/sec1868 4.0- 6.0 sec 2.33 MBytes 9.75 Mbits/sec1868 0.0- 6.4 sec 7.57 MBytes 9.89 Mbits/sec1868 Server Report:1868 0.0- 6.4 sec 7.57 MBytes 9.88 Mbits/sec 0.004 ms 0/ 5397 (0%)1868 Sent 5397 datagrams1912 local 172.25.27.79 port 5001 connected with 172.27.1.118 port 2710 ID Interval Transfer Bandwidth Jitter Lost/Total Datagra1912 0.0- 2.0 sec 2.40 MBytes 10.1 Mbits/sec 0.003 ms 1397506371/ 17132e+007%)1912 2.0- 4.0 sec 2.38 MBytes 10.0 Mbits/sec 0.002 ms 0/ 1701 (0%)1912 4.0- 6.0 sec 2.40 MBytes 10.1 Mbits/sec 0.798 ms 0/ 1714 (0%)-d 同时进行双向传输测试C:iperf -c 172.27.1.118 -t 60 -o c:test.txt -b 10M -w 6K -i 2 -u -dWARNING: option -b implies udp testing-Server listening on UDP port 5001Receiving 1470 byte datagramsUDP buffer size: 6.00 KByte-Client connecting to 172.27.1.118, UDP port 5001Sending 1470 byte datagramsUDP buffer size: 6.00 KByte-1876 local 172.25.27.79 port 3357 connected with 172.27.1.118 port 50011912 local 172.25.27.79 port 5001 connected with 172.27.1.118 port 2706 ID Interval Transfer Bandwidth1876 0.0- 2.0 sec 2.36 MBytes 9.91 Mbits/sec1912 0.0- 2.0 sec 1.22 MBytes 5.12 Mbits/sec 0.025 ms 848/ 1719 (49%)1876 2.0- 4.0 sec 2.38 MBytes 9.97 Mbits/sec1912 2.0- 4.0 sec 1.09 MBytes 4.57 Mbits/sec 0.191 ms 945/ 1722 (55%)1876 4.0- 6.0 sec 2.36 MBytes 9.90 Mbits/sec1912 4.0- 6.0 sec 1.14 MBytes 4.79 Mbits/sec 0.297 ms 878/ 1693 (52%)1876 0.0- 6.1 sec 7.20 MBytes 9.94 Mbits/sec1876 Server Report:1876 0.0- 6.1 sec 6.68 MBytes 9.18 Mbits/sec 0.135 ms 370/ 5138 (7.2%)1876 Sent 5138 datagrams指定文件来传C:iperf -c 172.27.1.118 -u -F D:win170xp.gho -i 2-Client connecting to 172.27.1.118, UDP port 5001Sending 1470 byte datagramsUDP buffer size: 8.00 KByte (default)-1908 local 172.25.27.79 port 3781 connected with 172.27.1.118 port 5001 ID Interval Transfer Bandwidth1908 0.0- 2.0 sec 256 KBytes 1.

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论