How to use Iperf to test the speed of TP-Link switches

Configuration Guide
Updated 07-23-2024 03:25:35 AM FAQ view icon49013

Usually, people may want to use Speedtest® to measure the speed of the switch when they encounter the problem that device which connected behind the switch has a slower rate or its speed is much slower than the ISP bandwidth.

But the result of Speedtest® may be affected by the ISP and network delay, so we recommend you use Iperf tool to test. This tool is a little software, and it is convenient to operate. Besides when using Iperf, the host can connect to the server directly, eliminating the effects of the ISP and network congestion, and can measure the most accurate speed, reducing the network influence to the lowest.

This FAQ will tell you how to use Iperf to measure the speed of your switch. Before speed measurement, you need to prepare two computers and your switch.

Step 1: Install Iperf on computers

  1. Before having a test, you may need to install Iperf on both computers, and you can refer to the Iperf official website to download it: https://Iperf.fr/Iperf-download.php
  2. The latest version of Iperf is Iperf3, so we used in this FAQ is Iperf3. Please choose the right software version for your computer when download. For example, the system of PC we used in this FAQ is windows64, so we download Iperf3-3.1.3-win64. After downloading, you will get a zip file, extract the zip file; there will be two files --- cygwin1.dll and Iperf3.exe like the following figure showing.

  1. Copy these two files to the path C:\Windows\System32, and then the installation is complete.

Step 2: Configure static IP for PC_A and PC_B.

Set up the topology as shown below:

  1. Connect two computers directly to the switch by CAT5 or above cable. The switch we used in this FAQ is Gigabit switch. For example, the switch is TL_SG108 v4, PC_A connected to the port1 of the switch and PC_B connected to the port2 of the switch.
  2. Set the static IP address of PC_A and PC_B. Set the IP address of PC_A as 192.168.0.12 and PC_B as 192.168.0.13; both the Subnet mask as 255.255.255.0 and Default gateway as 192.168.0.1.

Detailed steps for the static IP setting, please go to FAQ 553.

https://www.tp-link.com/article/?faqid=553

Step 3: Set Iperf server and client to measure the speed of switch.

When using Iperf to test the speed, we need to set one PC as a server and another PC as a client, in this FAQ we set PC_A as server and PC_B as a client.

  1. On PC_A, press windows key + R; put cmd in the Open bar and click OK; in the cmd dialog box, input the command "Iperf3 -s" and press enter to set PC_A as Iperf server.

  1. The same operation on PC_B to run cmd.exe; in the cmd dialog box, input the command "Iperf3 -c 192.168.0.12", the “-c” means to set PC_B as Iperf client, and the IP address behind “-c” is the IP address of the server. After inputting this command, then click Enter to start measuring the speed.

  1. As for showing in the above figure, we can see the speed result is 921 Mbps which is around 1Gbps. The switch we used in this FAQ is Gigabit switch, the link speed between PC and switch is 1Gbps, so this speed result is 921 Mbps.

Note: If your switch is 10/100Mbps switch or the link speed between PC and switch is 100Mbps, the speed result will be around 100Mbps.

Is this faq useful?

Your feedback helps improve this site.

Community

TP-Link Community

Still need help? Search for answers, ask questions, and get help from TP-Link experts and other users around the world.

Visit the Community >