IperfFunction introduction
TCP
Measuring network bandwidth
报告MSS/MTU值的大小和观测值
Supports TCP window values via socket buffering
Multiple threads are supported when P threads or Win32 threads are available. Client and server support multiple simultaneous connections
Note: Some company security policies may consider these tools to be hacking tools. If security personnel have doubts about this, network administrators may wish to check with them before making any plans before downloading or using these software.
How to use Iperf
Install Iperf
For the Windows version of Iperf, directly copy the decompressed iperf.exe and cygwin1.dll to the %systemroot% directory.
For the Linux version of Iperf, please use the following command to install it
gunzip -c iperf-
cdiperf-
./configure
make
make install
Using Iperf (taking the windows version as an example)
Enter the iperf command in the command prompt to run Iperf. Use the command Iperf –help to view the help of iperf.(You can refer to the Iperf command below).
Test single-threaded TCP
Run iperf on the server and enter the command iperf –s –p 12345 –i 1 –M to enable iperf on the local port 12345
Run iperf on the client, enter the command iperf –c server-ip –p server-port –i 1 –t 10 –w 20K, where the parameters are explained as follows:
-c: client mode, followed by server ip
-p: followed by the port that the server monitors
-i: Set the time interval for bandwidth reporting, in seconds
-t: Set the test duration, in seconds
-w: Set the tcp window size, generally you don’t need to set it, the default is enough
Test single-threaded UDP (default bandwidth)
Run iperf on the server, enter the command iperf –s -u –p 12345 –i 1 to enable iperf on the local port 12345 and run in udp mode
Run iperf on the client, enter the command iperf -c server-ip -p server-port -i 1 -t 10 -b, where the parameters are explained as follows:
-c: client mode, followed by server ip
-p: followed by the port that the server monitors
-i: Set the time interval for bandwidth reporting, in seconds
-t: Set the test duration, in seconds
-b: Set the sending bandwidth of udp, in bit/s
Iperf command
Options shared between client and server
-f, --format [bkmaBKMA] Format bandwidth number output. Supported formats are: 'b' = bits/sec 'B' = Bytes/sec 'k' = Kbits/sec 'K' = KBytes/sec 'm' = Mbits/sec 'M' = MBytes/sec 'g' = Gbits/sec 'G' = GBytes/sec 'a' = adaptive bits/sec 'A' = adaptive Bytes/sec
The adaptive format is one of kilo- or mega-. Fields except bandwidth are output as bytes, unless the output format is specified, the default parameter is a.
Note: When calculating bytes, Kilo = 1024, Mega = 1024^2, Giga = 1024^3. Usually, in a network, Kilo = 1000, Mega = 1000^2, and Giga = 1000^3, so Iperf also calculates bits accordingly. If this bothers you, use the -f b parameter and do the math yourself.
-i, --interval # Set the time interval between each report, in seconds. If set to a non-zero value, test reports will be output at this interval. The default value is zero.
-l, --len #[KM] Set the length of the read and write buffer. The default value for TCP mode is 8KB, and the default value for UDP mode is 1470 bytes.
-m, --print_mss Output TCP MSS value (supported by TCP_MAXSEG). The MSS value is generally 40 bytes smaller than the MTU value. usual situation
Server-side specific options
-s, --server perf server mode
-D (v1.2 or higher) Iperf runs as a background daemon on Unix platforms. Under Win32 platform, Iperf will run as a service.
-R (v1.2 or higher, Windows only) Uninstalls the Iperf service if it is running.
-o (v1.2 or higher, Windows only) Redirect output to the specified file
-c, --client host If Iperf is running in server mode and a host is specified with the -c parameter, Iperf will only accept connections from the specified host. This parameter does not work in UDP mode.
-P, --parallel # Number of connections to maintain before the server is shut down. The default is 0, which means connections are always accepted.
Client-specific options
-b, --bandwidth #[KM] Bandwidth used in UDP mode, unit bits/sec. This option is related to the -u option. The default value is 1 Mbit/sec.
-c, --client host Run Iperf client mode and connect to the specified Iperf server.
-r, --tradeoff reciprocating test mode. When the client-to-server test ends, the server connects back to the client through the port specified by the -l option (or by default, the port through which the client connects to the server). When the client connection is terminated, the reverse connection begins. If you need to test both directions simultaneously, try the -d parameter.
-t, --time # Set the total time of transmission. Iperf repeatedly sends data packets of a specified length within a specified time. The default is 10 seconds. See the -l and -n options.
-L, --listenport # Specify the port used by the server to connect to the client in reverse. By default, the port used by the client to connect to the server is used.
-P, --parallel Number of threads. Specify the number of threads used between the client and server. The default is 1 thread. This parameter needs to be used by both the client and the server.
Iperf update log:
1: Optimized performance
2: We are serious about solving bug problems
Huajun editor recommends:
Iperf is a network performance testing tool. Iperf can help users test TCP and UDP bandwidth quality. If a user suspects that their network is not running smoothly, they can run the software on each computer at the end of the network connection for a quick test. , might as well try itWebcam search tool,TrafficMonitor (computer network speed monitoring floating window),FPort,FreePortScanner,MRTGWait for the software, I hope you like it!





















Useful
Useful
Useful