yealink study notes 20,200,327

Use of iperf

Command Line Options description
Client and server sharing options
-f, --format [bkmaBKMA] Bandwidth output format number. Supported formats are:
'B' = bits / sec 'B' = Bytes / sec
'K' = Kbits of / sec 'K' = KBytes / sec
'm' = Mbits / sec 'M' = MBytes / sec
'G' Gbits = / sec 'G' = GBytes of / sec
'A' = adaptive bits / sec 'A' = adaptive Bytes / sec
adaptive format is one of kilo- and mega- both. In addition to the bandwidth of the output byte fields, unless specified output format, default parameters are a.
Note: When calculating the byte byte, Kilo = 1024, Mega = 1024 ^ 2, Giga = 1024 ^ 3. Typically, in the network, Kilo = 1000, Mega = 1000 ^ 2, and Giga = 1000 ^ 3, therefore, also Click Iperf calculated bit (bits). If these troubled you, then please use -fb parameters, and then personally calculate.

-i, --interval #

Provided each time between reporting interval, in seconds. If set to a nonzero value, the output will follow this test report interval. The default value is zero.

-l, --len # [KM]

Setting the length of the write buffer. TCP mode by default 8KB, UDP mode defaults to 1470 bytes.

-m, --print_mss

TCP MSS output value (supported by TCP_MAXSEG). MSS value is generally smaller than the MTU value of 40 bytes. Usually

-p, --port #

Set the port, consistent with the server listening port. The default port is 5001, the same as ttcp.

-u, --udp

Use of UDP rather than TCP mode. See the -b option.

-w, --window #[KM]

Setting the socket buffer to the specified size. For TCP mode, this is set to TCP window size. For UDP mode, set to accept this UDP packet buffer size, limiting the maximum acceptable packet.

-B, --bind host

Bind to more than one address in the host. For the client, this sets up the stack interface. For the server side, this parameter stack interfaces. This parameter is only used for the host with multiple network interfaces. Iperf in the UDP mode, and this parameter is used to bind to join a multicast group. Use the range 224.0.0.0 to 239.255.255.255 multicast address. Reference -T parameters.

-C, --compatibility

When using the low version Iperf, you can use the compatibility mode. It does not require both ends, to use compatibility mode, but it is strongly recommended both ends, to use compatibility mode. In some cases, the use of certain data stream can cause version 1.7 server crashes or cause unintended connection attempts.

-M, --mss #[KM}

The maximum value of a piece of information by TCP_MAXSEG option to try to set up TCP. Size MSS value is typically TCP / IP header by subtracting 40 bytes. In Ethernet, MSS is 1460 bytes (MTU1500 bytes). Many operating systems do not support this option.

-N, --nodelay

Set TCP no delay option to disable Nagle's algorithm. Normally this option for interactive programs, such as telnet, is disabled.

-V (from v1.6 or higher)

Binding an IPv6 address.
Server: $ iperf -s -V
client: $ iperf -c <Server IPv6 Address > -V
NOTE: In version 1.6.3 or later, specify the IPv6 address without using -B parameter binding, before 1.6 the version you need. In most operating systems, it will respond to the client IPv4 address IPv4-mapped.

Dedicated server option

-s, --server

Iperf服务器模式

-D (v1.2或更高版本)

Unix平台下Iperf作为后台守护进程运行。在Win32平台下,Iperf将作为服务运行。

-R(v1.2或更高版本,仅用于Windows)

卸载Iperf服务(如果它在运行)。

-o(v1.2或更高版本,仅用于Windows)

重定向输出到指定文件

-c, --client host

如果Iperf运行在服务器模式,并且用-c参数指定一个主机,那么Iperf将只接受指定主机的连接。此参数不能工作于UDP模式。

-P, --parallel #

服务器关闭之前保持的连接数。默认是0,这意味着永远接受连接。

客户端专用选项

-b, --bandwidth #[KM]

UDP模式使用的带宽,单位bits/sec。此选项与-u选项相关。默认值是1 Mbit/sec。

-c, --client host

运行Iperf的客户端模式,连接到指定的Iperf服务器端。

-d, --dualtest

运行双测试模式。这将使服务器端反向连接到客户端,使用-L 参数中指定的端口(或默认使用客户端连接到服务器端的端口)。这些在操作的同时就立即完成了。如果你想要一个交互的测试,请尝试-r参数。

-n, --num #[KM]

传送的缓冲器数量。通常情况,Iperf按照10秒钟发送数据。-n参数跨越此限制,按照指定次数发送指定长度的数据,而不论该操作耗费多少时间。参考-l与-t选项。

-r, --tradeoff

往复测试模式。当客户端到服务器端的测试结束时,服务器端通过-l选项指定的端口(或默认为客户端连接到服务器端的端口),反向连接至客户端。当客户端连接终止时,反向连接随即开始。如果需要同时进行双向测试,请尝试-d参数。

-t, --time #

设置传输的总时间。Iperf在指定的时间内,重复的发送指定长度的数据包。默认是10秒钟。参考-l与-n选项。

-L, --listenport #

指定服务端反向连接到客户端时使用的端口。默认使用客户端连接至服务端的端口。

-P, --parallel #

线程数。指定客户端与服务端之间使用的线程数。默认是1线程。需要客户端与服务器端同时使用此参数。

-S, --tos #

出栈数据包的服务类型。许多路由器忽略TOS字段。你可以指定这个值,使用以"0x"开始的16进制数,或以"0"开始的8进制数或10进制数。
例如,16进制'0x10' = 8进制'020' = 十进制'16'。TOS值1349就是:
IPTOS_LOWDELAY minimize delay 0x10
IPTOS_THROUGHPUT maximize throughput 0x08
IPTOS_RELIABILITY maximize reliability 0x04
IPTOS_LOWCOST minimize cost 0x02

-T, --ttl #

出栈多播数据包的TTL值。这本质上就是数据通过路由器的跳数。默认是1,链接本地。

-F (from v1.2 or higher)

使用特定的数据流测量带宽,例如指定的文件。
$ iperf -c <server address> -F <file-name>

-I (from v1.2 or higher)

与-F一样,由标准输入输出文件输入数据。

杂项

-h, --help

显示命令行参考并退出 。

-v, --version

显示版本信息和编译信息并退出。

 

发布了10 篇原创文章 · 获赞 0 · 访问量 220

Guess you like

Origin blog.csdn.net/qq_37554547/article/details/105138200