Help Center/ Server Migration Service/ User Guide(ME-Abu Dhabi Region)/ FAQs/ Migration Duration/ How Do I Test the Network Between the Source and Target Servers Using iPerf?
Updated on 2024-03-15 GMT+08:00

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 services running on the source server need to be those with little impact on the network, or the test results will be inaccurate.

Procedure

  1. Download iPerf based on the source server OS.
  2. Extract the iPerf installation package into directories on the source and target servers (or another server in the same region as the target server). On a Windows server, the iPerf installation package looks like follows.

  3. On the target server, run iPerf in server mode using the CLI. The following uses Windows as an example.

    1. Switch to the directory with the iPerf executable:

      cd /d path

      In this command, path is where you extracted iPerf on the target server in 2.

    2. Run iPerf in server mode:

      iperf3 -p port -s

      In this command, port is the port the iperf server listens on. 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.

      Assuming that port 8900 is used for Windows, if Server listening on 8900 is displayed in the command output, the iPerf server is running.

  4. 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.

    1. Switch to the directory with the iPerf executable:

      cd /d path

      In this command, path is where you extracted iPerf on the source server in 2.

    2. 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 used 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 to connect to the iPerf server and the bandwidth test to complete, and then check the results.

    3. 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 used 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.

    4. Run the following ping command to measure the network delay:

      ping target_iP

      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.

  5. View all testing options. Alternatively, you can obtain the help information about iPerf on its official website.

    iperf3 -h