Bonus: Compile iPerf2 from source
Last updated
Was this helpful?
Last updated
Was this helpful?
There are a few misconceptions around iPerf. Such as iPerf3 is better than iPerf2 because 3 is better than 2 or that iPerf2 is not being developed anymore because iPerf3 superseeds iPerf2. But these are not true.
iPerf3 is fine as long as you keep the test to a single TCP stream. However, iPerf2 has now been updated to include most of the things iPerf3 added and iPerf2 offers the best performance with the latest versions. iPerf2 is also multi-threaded while iPerf3 is single-threaded.
If you want to see more of the differences check out the official iPerf2 comparsion:
Ok, let's get compiling.
The preinstalled version of iperf2 from the package archives is a fwe years old now.
Let's update it from source!
First we need to install some dependencies
Go to https://sourceforge.net/projects/iperf2/, click on the Files
tab, and download the .tar.gz
file for your desired version. We're going to go with 2.1.9 for this lab.
Next uncompress the .tar.gz
and change directory
Now we need to configure for our device.
After succesfull configure, we can make
. This may take a few minutes.
If successful, we should find it in the src/
directory. Let's check the version.
Yay! You've compiled iperf from source. You're a Linux wizard now.
Let's replace the old version. First remove it with apt
.
Now we can make install
to install the new version.
Verify it is installed.
If you see something like No such file or directory
in the output, you may need to restart the terminal.
Let's test it! Open two panes in the same terminal or two temrinal sessions.
In one pane or session run iperf
in server mode.
With the other pane or session run iperf
in client mode.
What do you think we're testing in this scenario?
What is the difference between localhost and 127.0.0.1?