The iperf2 example is recommended for high speed network testing in various iperf releases.
For most people, when buying a new network device, they want to know how much the network of the device will reach, whether it will live up to expectations,
Most network rate testing tools recommend using iperf2 instead of the newer iperf3. One of the main reasons is that iperf2 is easier to use and easier to use than iperf3. It also supports the use of multiple threads when performing a single application test, adding the -P n option to run the command input, plus the number of threads that need to be used.
For example, 2 to 10 threads can be used for 25G network connections, and 10 to 30 threads can be used for 100G network connections, adjusting the number of threads according to the needs of the test.
You can go directly to the iperf site and download different formats depending on the system you are using.
https://iperf.fr/iperf-download.php


Go to the site to download according to the operating system used, Windows, Ubuntu, Debian, Fedora, CentOS, FreeBSD and other common systems can be purchased to download, and even Android mobile phone version, Apple mobile phone version, as well as source code.
If automatic installation is used, such as yum, apt installation, the iperf3 installation will be performed in most cases.
iperf tool benchmarking, based on C-S mode (client-server, Client to Server). First, the server starts the service, and then the client initiates the demand to establish a link to perform traffic initiation, and can also perform two-way traffic testing.
All tests need to be connected to the hardware and set the corresponding IP address to run the traffic test.
First, one-way traffic test example:
- Start the service on the server side:
#iperf2 -s -D
- Execute the client running program:
iperf2 -c < server IP> -P n
(n: how many threads are needed)
Run the server first to open, and then run the client before the server can receive.
Two, two-way traffic test example:
- Start the service on the server side:
iperf2 -s -p m
(lowercase here, indicating that a port number is specified to perform the service, p is the port option, m is the port number, generally greater than 5201.)
- Execute the client running program:
#
iperf -c < IP address of the server > -p < port number, corresponding to the number of enabled ports on the server > -P < number of threads > –d
It is also necessary to run the server first, and then run the client before the server can receive it.
Rate benchmark test, as far as possible to eliminate external interference, the best way is to directly use the server to server connection, not through the intermediate switch.
