This is a brief post demoing how to benchmark LAN throughput using iPerf3 between a Linux machine and a PC running Windows.
What’s iPerf3?
iPerf3 is a cross-platform tool for active measurements of the maximum achievable bandwidth on IP networks.
My setup
For this scenario I’ll be testing the network throughput between my router, an Asus RT-BE88U, and my PC.
Both have 2.5Gbps LAN ports and are connected via a 25m CAT5e cable.
iPerf3 is already preinstalled on my router, and for my PC I’ve downloaded the latest version of iPerf3 – iperf3.17.1_64_updatedcygwin.
Benchmark LAN throughput
Router to PC
Note that you may have to allow connections to TCP port 5201 in your PC’s firewall.
1 2 3 4 | New-NetFirewallRule -DisplayName 'iPerf3' -Description ` 'iPerf3 inbound allow on tcp 5201' -Direction Inbound ` -Program 'F:\iperf3.17.1_64_updatedcygwin\iperf3.exe' ` -LocalPort 5201 -Protocol TCP -Action Allow |
I’m lazy and this is a one-time thing so I just pause the firewall for the duration of the test.
On the PC side I have to start iPerf3 in server mode so that it can accept connections from the client.
1 | .\iperf3.exe -s |
And, on my router connected via SSH, I run iPerf3 in client mode while specifying my PC’s IP.
1 | iperf3 -c 192.168.1.100 |
Client output – router
Server output – PC
On both sides you can see that the the total data transferred during the test was 2.74GB and the average bitrate is 2.35Gb/s.
PC to router
Reversing the direction of the above test can be done in two ways:
- Using the -R option in the client command which tells iPerf3 to reverse the test and have the server send data to the client
- Running iPerf3 as the server on the router and as the client on the PC
In this case, I’ll just go with option 2 and switch the roles of the machines involved in the test.
Client output – PC
Server output – router
The output is pretty much the same considering the direction of the traffic has changed.
Conclusion
If you need a way to benchmark LAN throughput between two machines that aren’t both running Windows, then iPerf3 is a viable option.
Otherwise, if both machines run on Windows, then Microsoft’s NTTTCP would be a better option.
There’s also a Linux version of NTTTCP, but, looking through the list of opened issues, I’d stick to iPerf3 for cross-platform tests.
If you’re looking for more posts related to Asus routers you can check out my post about decoding Asus router backup files or the one about fixing an SSL certificate import error.