How to use Iperf to test the speed on TP-Link routers

Q&A of functional explanation or specification parameters
Updated 04-29-2024 02:54:11 AM 151061
This Article Applies to: 

Usually, people may want to use Speedtest® to measure the speed of the router when they encounter the problem that the device connected behind the router has a slower rate or that 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 the 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 it can measure the most accurate speed, reducing the network influence to the lowest.

Additionally, compared to Speedtest®, iPerf can conveniently conduct speed tests between two devices on the same local network as it allows for customizing the server.

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 downloading. For example, the operating system of the PC we used in this FAQ is Windows 11 64-bit, so we downloaded 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 as the following figure shows.

    Note: Using different versions of iPerf for server and client may result in unsuccessful speed tests.
  3. Copy these two files to the path C:\Windows\System32, and then the installation is complete.

Let's take a LAN-to-LAN speed test, for example.

Step 2 Setup the iPerf Server and Client to measure the speed of the router (LAN to LAN)

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 the server and PC B as the 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 a server.
  2. Perform the same operation on PC B to run CMD; in the CMD dialog box, input the command iperf3 -c 192.168.68.51, where the c means to set PC B as a client, and the IP address behind -c is the IP address of the server. After inputting this command, type the Enter key to start measuring the speed.

    Note: You can use iperf3 -c 192.168.0.1 -P <parallel> -t <time> instead, where <parallel> is the number of parallel client streams to run (default 1), <time> is the time in seconds to transmit for (default 10 secs). Take the picture above as an example. Sometimes, having a too-low parallel setting can result in slower speeds. In such cases, it's advisable to increase the parallel setting appropriately.

Step 3 How to perform LAN-to-WAN and WAN-to-LAN speed test

Set up the topology as shown below:

  1. In the diagram above, PC A is connected to the WAN port of the router. PC B is connected to the LAN port of the router.
    Note: Please disable the firewall on both computers before testing. The firewall may block test traffic.
  2. Set the IP address of PC A to 192.168.0.1 and the subnet mask to 255.255.255.0.

    Note: Due to PC B connecting to the Router directly, PC B need not configure the Static IP address manually, PC B will get the IP address from the Router automatically. If you disabled the DHCP Server function on the Router, please set the Static IP address for PC B also.
    Note: Sometimes you may encounter a situation where the IP of PC B is 192.168.0.X. In this case, you should set the address of PC A to 192.168.1.1 with a mask of 255.255.255.0. (Just make sure A and B are not in the same IP address range.)
  3. Set the static IP address for the WAN port of the Router as 192.168.0.2 with the mask of 255.255.255.0. Go to the web interface of the Router first. Configure the static IP address for the WAN port of Router, as shown in the figure:
  4. Once the IP address configuration is completed, the next step is to run the iPerf3 speed test. Similar to Step 2, first run iperf3 -s on the Server (PC A); then on the Client (PC B), run:
    • iperf3 -c 192.168.0.1 to test LAN-to-WAN speed, which represents the upload speed in our daily lives.
    • iperf3 -c 192.168.0.1 -R to test WAN-to-LAN speed, which represents download speed, where -R indicates traffic in a reverse direction.
      Note: You can also add -P <parallel> -t <time> after the above commands, leaving a space between each.

Looking for More

Is this faq useful?

Your feedback helps improve this site.

Recommended Products

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 >

From United States?

Get products, events and services for your region.