Have you ever wondered how to test the connection between computers on your network? Maybe you have a section of your network that seems to be underperforming. Is your NFS slow? Iperf3 can help you with all of this.
Iperf3 is an open source tool that allows you to analyze network traffic and test your network’s bandwidth. It relies on both a client and a server to test the connection between them. That’s not a problem, though, because Iperf3 is available on nearly every operating system, including mobile devices.
You’ll need to get Iperf3 before you can test it out. It’s freely available on the project’s website, so getting it won’t be a problem. This guide will cover Linux and Windows, but the process is similar on other platforms.
Head over to the Iperf3 website and download the latest version for Windows. It’ll come in a zip file, so you’ll need to extract it. You can extract it anywhere, but make sure that it’s convenient. You’ll need to access it from the command prompt.
Once you have it extracted, you need to access it from the command line. Click on the start menu and use the search function to open the command prompt.
When you have the prompt open, you’ll need to change directories into the place where you extracted the Iperf3 exe.
From there, you can run iperf3.exe. You can append the flags and pass information to it as you execute the command.
The rest of this guide will refer to the command as iperf3, but you’ll probably need to include the .exe part.
Installing Iperf3 on Linux is very easy. You only need to use your package manager. Different distributions call it either iperf or iperf3, so just make sure you pick the right one.
$ sudo apt install iperf3
Test Your Connection
The Iperf website has a list of public servers that you can use to test out Iperf and your connection. Start by using one of those to get a feel for the tool.
$ iperf3 -c iperf.scottlinux.com
The -c flag specifies that you want to run Iperf as a client, and you’re passing it the server that you want to connect to.
Run A Server
To test your connection to one of the computers on your own network, you need to run Iperf as a server. At its most basic, that’s super easy. Just use the -s flag.
$ iperf -s
C:\Path\To>iperf3.exe -c 192.168.1.110
If you want to keep the server running in the background, Iperf has a flag to run it as a daemon.
$ iperf3 -s -D
If you’re on Linux, you can actually run Iperf as a service on startup.
$ sudo systemctl enable iperf3
There are some other convenient things that you can do with Iperf to change how it behaves and make it more convenient for you.
First, if you’re running Iperf as a daemonized server, you probably want to log that server’s activity.
$ iperf3 -s -D --logfile /path/to/iperf.log
All of Iperf’s server output will be directed to your log.
You probably want to control how long of a test Iperf runs. It actually does make a difference. You can do that by adding the -t flag and telling Iperf how many seconds you want it to run for.
$ iperf3 -c 192.168.1.110 -t 60
In testing for this guide, a 60 second test showed higher bandwidth than the standard test. It’s definitely something to consider in testing your network.
Time is not the only way you can control the duration of your tests. You can specify the amount of bytes that your client sends. Be aware, though, that this is bytes. The numbers that you’ll need to specify will be large.
$ iperf3 -c 192.168.1.110 -n 1000000
Iperf is super easy to use. You have all of the basics now to begin testing the connections between different devices. If you need more help, Iperf’s help command is very well documented.
$ iperf3 -h
Always remember to conduct multiple tests and test as many points between devices as you can to narrow down specific problem areas in your network. It could be something as obvious and impactful as a switch, or it could just be a bad WiFi adapter. Iperf can help you narrow that down.