How Do I Test the Network Between the Source and Target Servers Using iPerf?
Prerequisites
Ensure that the network between the source and target server is connected, and the port used for the iPerf test is allowed by a security group rule configured for the target server. For how to configure a security group rule, see How Do I Configure Security Group Rules for Target Servers?
This test must be performed before the migration, and the services running on the source server have little impact on the network, or the test results will be inaccurate.
Procedure
- Download iPerf based on the OS of the source server.
- Decompress the iPerf software package in a directory on the source server and target server (or another server in the same region as the target server). On a Windows server, the iPerf installation package looks like this:

- On the target server, run iPerf in server mode using the CLI. The following uses Windows as an example.
- Run the following command to switch to the directory with the iPerf executable:
In the preceding command, path indicates where on the target server you decompressed iPerf to.
- Run the following command to run iPerf in server mode:
In the preceding command, port indicates the port on which the iperf server listens. It is recommended that port 8900 be used for Windows and port 22 for Linux since the two ports are configured as data transmission ports. You can also use another port for testing, but ensure that the TCP or UDP port is allowed in security group rules configured for the target server.
For details about more parameters, run the iperf -h command.
Assume that port 8900 is used for Windows. If Server listening on 8900 is displayed in the command output, the iPerf server is running.

- Run the following command to switch to the directory with the iPerf executable:
- On the source server, run iPerf in client mode using the CLI. Test the TCP bandwidth, UDP jitter, packet loss rate, and bandwidth. The following uses Windows as an example.
- Run the following command to switch to the directory with the iPerf executable:
In the preceding command, path indicates where on the source server you decompressed iPerf to.
- Run the following command to test the TCP bandwidth using iPerf:
iperf3 -c target_IP -p port -t time
In the preceding command, -c is used to run iPerf in client mode.
- target_IP is the IP address of the target server (iPerf server).
- port is the port for connecting to the target server, that is, the iPerf listening port 8900 in 3.b.
- time is the total test time. The default unit is second.
Wait for the iPerf client is connected to the iPerf server and the bandwidth test is complete, and check the result.

- Run the following command to test the UDP jitter, packet loss rate, and bandwidth.
iperf3 -c target_IP -p port -u -t time
-u is used to measure the UDP jitter, packet loss rate, and bandwidth.
- target_IP is the IP address of the target server (iPerf server).
- port is the port for connecting to the target server, that is, the iPerf listening port 8900 in 3.b.
- time is the total test time. The default unit is second.
Wait for the iPerf client is connected to the iPerf server and the test is complete, and check the result.

- Run the following ping command to measure the network delay:
target_IP is the IP address of the target server (iPerf server).
Ensure the ICMP packets are allowed to pass through by the security group rules of the VPC to which the target server belongs.
- Run the following command to switch to the directory with the iPerf executable:
- Run the following command to view all testing options. Alternatively, you can obtain the help information about iPerf on its official website.
iperf3 -h
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.