Debian:
apt-get install iperf3Dla RedHat, CentOS:
yum install iperf3On the server side
We choose one of the servers - any. It does not matter which one will act as a server and which as a client. On the one selected as the server - after installing iperf, we do:
iperf3 -s -f KBy default, it will listen on port 5201 in Debian. In this case, this port should be open between the servers and unblocked. If port 5201 is closed for some reason or something else is listening on it, you can change the port with the -p (lowercase p) switch.
Other switches used for the test:
-s – run as server mode
-f K – format. K (Kb), M (Mb), G (Gb), T (Tb) i.e. kilobits, megabits, etc.
On the client side:
If our server is listening on the mentioned port, e.g. 6000, we issue the command on the client side:
iperf3 -c 10.0.0.3 -f K -p 6000A window on the client side will appear:
And on the server side:
Network testing will begin. We have to wait until the end of the test.
If we switch to another switch showing e.g. Megabits per second, it will look like this:
As you can see, the local connection between my servers is roughly 250-320 MB/s.
In another test, the results are twice as good.
To maximize network utilization and test performance, for example on several simultaneous connections, we can add a switch for pararelization, i.e. simultaneous connections.
iperf3 -c 10.0.0.3 -f M -p 6000 -P 10-P 10 – means 10 simultaneous connections
The marked area contains a summary of all sessions. As you can see, the network has a maximum speed of 500 Mb/s.
We can, if necessary, redirect the results to the log using the well-known > switch
iperf3 -c 10.0.0.3 -f G -p 6000 -P 10 > test.logThen all this information displayed on the screen will be saved directly to the log file. Among other useful switches, we can, for example, return a bit more information by adding the -V or verbose switch.
In turn, the switches:
–4 (–version 4)
-6 (–version 6)
will determine whether we are using an ipv4 or ipv6 network.
The -D switch , in turn, will allow us to run iperf in daemon mode and close the window with the session open to the server, if we want, for example, constant, cyclical testing of the throughput of our network (e.g. from monitoring).










