Linux for Network Engineers: iPerf3 Bidirectional Test

By February 26, 2020Linux

We have talked about the differences between iPerf2 and iPerf3 in terms of their reverse options. I recently noticed that the latest iPerf3 version 3.7 released on 06/21/2019 has an additional option to handle reverse testing, and I wanted to talk about it.


It takes a while for a new version of any software to find its way into standard repositories. So, if you need to play with this new option, you’d have to compile from the source. Here is how to do it on Debian-based Linux:

If you don’t see any errors, you can find the new iPerf3 executable in the “src/” directory, and you can confirm that it works by printing the help output with the following:

Keep in mind, that if you want to use this latest version of iPerf3 your working directory has to be “iperf-3.7/src” and to run the command use “./iperf3” If you just type iperf3 (without the dot and forward slash) you will end up using whatever iPerf3 executable you have installed in your system.

Bidirectional Test

The bidirectional option is “ --bidir.” When used the client opens two TCP connections with the server: one is used for the forward test and one for the reverse. Here is how the output looks like from the client:

At the end of the test, the server sends what it measured back to the client. The client reports 930 Mbits/sec transmitted TX-C bandwidth, as measured from its perspective (sender) and 928 Mbits/sec TX-C from the server’s perspective (received). Then it reports 933 Mbits/sec received RX-C bandwidth, as measured from its perspective (received) and 934 Mbits/sec RX-C from the server’s perspective (sender). 

And here is the server’s side output for the same test:

iPerf2 vs. iPerf3

The “ --bidir” option is very similar to the “ --dualtest” option of iPerf2. The difference is that in iPerf2, one socket is opened from the iPerf client to the server and one from the server to the client. In addition, the server measurements are not sent back to the client to print them in the console output.

iPerf2 dualtest client output:

iPerf2 dualtest server output:

All in all, the bidirectional tests between iPerf2 and iPerf3 are very similar. The only advantage of iPerf3 is that it doesn’t require a reverse route or port open to receive the traffic since both sockets are opened from the client to the server. That can be important if the iPerf client is behind a NAT and is not able to accept connections.