IPERF 网络性能测试
Iperf 是一个网络性能测试工具。Iperf可以测试最大TCP和UDP带宽性能。Iperf具有多种参数和UDP特性,可以根据需要调整。Iperf可以报告带宽,延迟抖动和数据包丢失。
Iperf 参数选项
#介绍参考链接:https://iperf.fr/iperf-doc.php
iperf服务器端选项
-s 以server模式启动 eg:*iperf –s* 。Server端为数据的接收端。
-D 以服务方式运行ipserf
-R 停止iperf服务,针对-D
-o <filename> 重定向输出报告或错误信息到指定文件。
-c <hostname/IP> 如果Iperf运行为服务器模式,则可利用-c参数指定一个客户端,本机将接受指定客户端的连接,但不支持UDP协议。
-P,--parallel # 设置Iperf服务模式下的最大连接数,默认值为0,表示不限制连接数量。
iperf客户端选项
-b,--bandwidth 指定客户端通过UDP协议发送信息的带宽,默认值为1Mbit/s
-c,--client <hostname/IP> 指定Iperf服务器的主机名和IP地址
-d,--dualtest 同时进行双向传输测试
-n,--num 指定传输的字节数
-r,--tradeoff 单独进行双向传输测试
-t,--time 指定Iperf测试时间,默认10秒
-L,--listenport 指定一个端口,服务器将利用这个端口与客户机连接
-P, --parallel 设置Iperf客户端至Iperf服务器的连接数,默认值为1
-S, --tos 设置发出包的类型,具体类型请参阅man文档
-F 指定需要传输的文件
-T 指定ttl值
通用参数
-f [kmKM] 分别表示以Kbits, Mbits, KBytes, MBytes显示报告,默认以Mbits为单位
-i sec 以秒为单位显示报告间隔
-l 缓冲区大小,默认是8KB
-m 显示tcp最大mtu
-o 将报告和错误信息输出到文件
-p 指定服务器端使用的端口或客户端所连接的端口
-u 使用udp协议
-w 指定TCP窗口大小,默认是8KB
-B 绑定一个主机地址或接口(当主机有多个地址或接口时使用该参数)
-C 兼容旧版本(当server端和client端版本不一样时使用)
-M 设定TCP数据包的最大mtu值
-N 设定TCP不延时
-V 传输ipv6数据包
软件安装
[root@xiesshavip001 ~]# yum install https://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-9.noarch.rpm -y
[root@xiesshavip001 ~]# yum install iperf -y # 注:yum安装的iperf是2版本,如果需要安装3版本,可以到官网下载源包安装
Iperf 网络测试
- iperf -s 命令启动server:
[root@xiesshavip002 ~]# iperf -s
------------------------------------------------------------
Server listening on TCP port 5001 # 默认端口为5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
- 向IP为192.168.130.20的主机发出TCP测试,,测试时间为20秒,并每2秒返回一次测试结果
[root@xiesshavip001 ~]# iperf -c 192.168.130.20 -i 2 -t 20
- 测试双向传输
[root@xiesshavip001 ~]# iperf -c 192.168.130.20 -i 2 -t 20 -d
- 指定传输字节数
[root@xiesshavip001 ~]# iperf -c 192.168.130.20 -i 2 -t 20 -d -n 10240
- 设置TCP传输窗口
[root@xiesshavip001 ~]# iperf -c 192.168.130.20 -i 2 -t 20 -d -n 10240 -w 300k
# 注:窗口大小不能超过默认的TCP window size: 416 KByte。并且服务端要与客户端的传输窗口大小一致
- 指定端口传输
[root@xiesshavip001 ~]# iperf -c 192.168.130.20 -i 2 -t 20 -d -p 12345
- 使用UDP测试
[root@xiesshavip001 ~]# iperf -c 192.168.130.20 -i 2 -t 20 -d -u
iperf --help
[root@xiesshavip001 ~]# iperf --help
Usage: iperf [-s|-c host] [options]
iperf [-h|--help] [-v|--version]
Client/Server:
-b, --bandwidth #[KMG | pps] bandwidth to send at in bits/sec or packets per second
-f, --format [kmKM] format to report: Kbits, Mbits, KBytes, MBytes
-i, --interval # seconds between periodic bandwidth reports
-l, --len #[KM] length of buffer to read or write (default 8 KB)
-m, --print_mss print TCP maximum segment size (MTU - TCP/IP header)
-o, --output <filename> output the report or error message to this specified file
-p, --port # server port to listen on/connect to
-u, --udp use UDP rather than TCP
-w, --window #[KM] TCP window size (socket buffer size)
-z, --realtime request realtime scheduler
-B, --bind <host> bind to <host>, an interface or multicast address
-C, --compatibility for use with older versions does not sent extra msgs
-M, --mss # set TCP maximum segment size (MTU - 40 bytes)
-N, --nodelay set TCP no delay, disabling Nagle's Algorithm
-V, --IPv6Version Set the domain to IPv6
Server specific:
-s, --server run in server mode
-U, --single_udp run in single threaded UDP mode
-D, --daemon run the server as a daemon
Client specific:
-c, --client <host> run in client mode, connecting to <host>
-d, --dualtest Do a bidirectional test simultaneously
-n, --num #[KM] number of bytes to transmit (instead of -t)
-r, --tradeoff Do a bidirectional test individually
-t, --time # time in seconds to transmit for (default 10 secs)
-B, --bind [<ip> | <ip:port>] bind src addr(s) from which to originate traffic
-F, --fileinput <name> input the data to be transmitted from a file
-I, --stdin input the data to be transmitted from stdin
-L, --listenport # port to receive bidirectional tests back on
-P, --parallel # number of parallel client threads to run
-T, --ttl # time-to-live, for multicast (default 1)
-Z, --linux-congestion <algo> set TCP congestion control algorithm (Linux only)
Miscellaneous:
-x, --reportexclude [CDMSV] exclude C(connection) D(data) M(multicast) S(settings) V(server) reports
-y, --reportstyle C report as a Comma-Separated Values
-h, --help print this message and quit
-v, --version print version information and quit
[KM] Indicates options that support a K or M suffix for kilo- or mega-
The TCP window size option can be set by the environment variable
TCP_WINDOW_SIZE. Most other options can be set by an environment variable
IPERF_<long option name>, such as IPERF_BANDWIDTH.
Source at <http://sourceforge.net/projects/iperf2/>
Report bugs to <iperf-users@lists.sourceforge.net>
[root@xiesshavip001 ~]#
IPERF 网络性能测试的更多相关文章
- iperf——网络性能测试工具
一.前言 工作中遇到需要测试Linux服务器网卡占用率的场景,查阅资料后,发现iperf是一款合适的网络测速工具. 下面讲解一下如何使用iperf做网络性能测试. 二.基础知识 先补充一些基础知识: ...
- 移植 iperf 网络性能测试工具到 Android-P
. . . . . 新开发板使用了 Android-P 的方案,WiFi 刚刚调通,为了测试 WiFi 稳定性,需要使用 iperf 工具.但 Android 并没有提供这个工具,只能自己移植一份了. ...
- 网络性能测试工具iperf详细使用图文教程
Iperf是一个网络性能测试工具.Iperf可以测试TCP和UDP带宽质量.Iperf可以测量最大TCP带宽,具有多种参数和UDP特性. Iperf可以报告带宽,延迟抖动和数据包丢失.利用Iper ...
- 网络性能测试工具iperf详细使用图文教程【转载】
原文:http://blog.163.com/hlz_2599/blog/static/142378474201341341339314/ 参考:http://man.linuxde.net/iper ...
- 网络性能测试工具Iperf/Jperf解读
Iperf 是一个网络性能测试工具.Iperf 可以测试TCP 和UDP 带宽质量.Iperf 可以测量最大TCP 带宽,具有多种参数和UDP 特性. Iperf 可以报告带宽,延时抖动和数据包丢失. ...
- 网络性能测试工具-Iperf
一.简单介绍 Iperf是一个网络性能测试工具,Iperf可以测试TCP和UDP带宽质量,Iperf可以测量最大TCP带宽,具有多种参数和UDP特性.Iperf可以报告带宽,延迟抖动和数据包丢失.利用 ...
- Iperf是一个网络性能测试工具
http://blog.163.com/hlz_2599/blog/static/142378474201341341339314/ Iperf是一个网络性能测试工具.Iperf可以测试TCP和UDP ...
- 网络性能测试工具iperf详细使用图文教程(转)
Iperf是一个网络性能测试工具.Iperf可以测试TCP和UDP带宽质量.Iperf可以测量最大TCP带宽,具有多种参数和UDP特性.Iperf可以报告带宽,延迟抖动和数据包丢失.利用Iperf这一 ...
- iperf点对点网络性能测试工具
什么是Iperf?Iperf 是一个网络性能测试工具.Iperf可以测试TCP和UDP带宽质量.Iperf可以测量最大TCP带宽,具有多种参数和UDP特性.Iperf可以报告带宽,延迟抖动和数据包丢失 ...
随机推荐
- OpenFace的一些了解
1.OpenFace内4个样例代码 配置学习了两个 其一: Ubantu 基本命令 Docker 安装方式.发布网站方式.查看验证安装结果命令 Openface 基本demo 实现方式.和基本原理 其 ...
- 数据库机器迁移对AlwaysON 集群影响测试
1主3从(共享文件见证) 模拟事故 AlwaysON集群 结论 主域控服务器重启 共享文件夹见证失败,SQL集群无影响 无影响 修改共享文件夹见证路径 第一次测试修改后:整个集群突然重启,查询 ...
- Socket接口
Socket接口 Socket: Socket是应用层与TCP/IP协议族通信的中间软件抽象层,它是一组接口.在设计模式中,Socket其实就是一个门面模式,它把复杂的TCP/IP协议族隐藏在Sock ...
- 小程序 login
app.json : 配置文件 => 文件路径 pages .配置窗口 window.底部导航 tabBar .请求超时时间 networkTimeout app.js : 请求路口文件 wx. ...
- windos server 2008 r2 ftp重启教程
1: 开始菜单输入IIS 2: SERVER> 网站> 站点 >重新启动. 3: 输入ftp://localhost , 输入用户名和密码.登录.
- Mac charles 抓取https请求,安装证书后还是显示unknown
https://blog.csdn.net/qq_23114525/article/details/81460840 1. 配置证书 2. 设置钥匙串信任 3. 设置手机代理 端口号需要对应设置的端口 ...
- MySQL 基础 DDL和DML
DDL 数据库定义语句 创建数据库 create table if exits 数据库.表名( field1 数据类型 约束类型 commit 字段注释, field2 数据类型 约束类型 commi ...
- np.newaxis学习【转载】
转自:https://blog.csdn.net/lanchunhui/article/details/49725065 1.相当于None >> type(np.newaxis) Non ...
- PLSQL的SQL%NOTFOUND的使用场景
SELECT * INTO v_ticketStorageRow FROM BDM_TICKET_STORAGE WHERE p_startTicketNo >= START_NO_ AND p ...
- Vbox下的linux和windows共享文件设置
参考链接: https://jingyan.baidu.com/article/2fb0ba40541a5900f2ec5f07.html