The server runs on the remote host and listens for connections from the client. The client is where you issue the bandwidth test parameters, and connect to a remote server.
You can install Iperf using apt-get on ubuntu.apt-get install iperf
Once installed, on the remote host run Iperf in client mode. If you wish to run the server in daemon mode, add -D to the command.
Iperf has many configurable options for testing network throughput. For our test, we will use TCP connections to a remote server at IP 10.1.1.50. The test will use 4 threads, each sending data and the test will be performed in both directions.
iperf -c 10.1.1.50 -r -P 4
The result will look similar to the below output. This example shows a total throughput of 9.42 Gbits/ second in one direction and 11.9 Gbits/ second in the other direction. As the results can fluctuate depending on the load of the server, or how congested the network is between the servers, it’s best to run each test 3 – 4 times at different times of the day and take an average.