Help Center > > FAQs> During Migration> How Can I Test the Network with iPerf?

How Can I Test the Network with iPerf?

Updated at: Jun 12, 2020 GMT+08:00

Prerequisites

  • Ensure that the networks between the source servers and the target ECSs are connected, and the security group rules configured for the target ECSs enable the ports used for the iPerf test. For details about how to configure security group rules, see How Can I Configure the Security Group Rules for Target ECSs?
  • This test must be performed before the migration. Otherwise, the test data is inaccurate. This test almost has no impact on services running on the source server.

Procedure

  1. Download iPerf of the required version based on the OS type of the source server.
  2. Decompress the iPerf software package in a directory on the source server and target ECS (or other ECSs in the same region as that of the target ECS). For example, the iPerf software package for Windows OSs is as follows:

  3. Start iPerf in server mode by running a command on the command line interface (CLI) on the target ECS. Use a Windows OS as an example.

    1. Run the following command to switch to the iperf directory:

      cd /d path

      In the preceding command, path indicates the path on the target ECS for storing the decompressed iPerf tool.

    2. Run the following command to run iPerf on SMS:

      iperf3 -p port -s

      In the preceding command, port indicates the SMS listening port for the iPerf tool. It is recommended that port 8900 be used for Windows OSs and port 22 for Linux OSs. Ports 8900 and 22 are data transmission ports used by the target ECS. You can also use other ports during the test, but ensure that the TCP or UDP port can be opened for the security group rule configured for the target ECS.

      For details about parameters, run the iperf -h command.

      Assume that port 8900 is used for a Windows OS. If Server listening on 8900 is displayed in the command output, iPerf in server mode is running properly.

  4. Start iPerf in client mode on CLI on the source server to test the TCP bandwidth, UDP jitter, packet loss rate, and bandwidth. Use a Windows OS as an example.

    1. Run the following command to switch to the iperf directory:

      cd /d path

      In the preceding command, path indicates the path on the source server for storing the decompressed iPerf tool.

    2. Run the following command to run iPerf to test the TCP bandwidth:

      iperf3 -c target_IP -p port -t time

      In the preceding command, -c indicates that iPerf is running on the source server (client).

      • target_IP indicates the IP address of the target ECS, which is the server that runs iPerf in server mode.
      • port: indicates the port number for connecting to the target ECS, that is, the iPerf listening port in 3.b.
      • time: indicates the total test time. The default unit is second.

      Assume that port 8900 is used for a Windows OS. After the iPerf client is successfully connected to the iPerf server, the bandwidth is tested. After the test is complete, check the result.

    3. Run the following command to start iPerf to test the UDP jitter, packet loss rate, and bandwidth.

      iperf3 -c target_IP -p port -u -t time

      -u indicates the UDP jitter, packet loss rate, and bandwidth.

      • target_IP: indicates the IP address of the target ECS, which is the server that runs iPerf in server mode.
      • port: indicates the port number for connecting to the target ECS, that is, the iPerf listening port in 3.b.
      • time: indicates the total test time. The default unit is second.

      Assume that port 8900 is used for a Windows OS. After the iPerf client is connected to the iPerf server, UDP jitter, lost/total datagrame, and bandwidth are tested. After the test is complete, check the result.

    4. To test the network delay, run the following ping command:

      ping target_iP

      target_IP: indicates the IP address of the target ECS, which is the server that runs iPerf in server mode.

      Configure the security group rule for the VPC to which the target ECSs belong to allow Internet Control Message Protocol (ICMP) packets to pass through.

  5. Run the following command to obtain more online help of the iPerf tool. Alternatively, you can obtain the help information about iPerf on its official website.

    iperf3 -h

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel