Iperf is a tool that measures the bandwidth and the quality of a network link. It can be installed very easily on any Linux system. One host must be set as the client and the other one as the server. Make sure that iperf is installed on both systems. If it is not installed, then use your package manager to install it before trying this tip.
Now run iperf on one of the Linux systems as the server, as shown below:
linux-erv3:/home/test/Desktop # iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
Go to the second Linux system and run iperf -c as the client:
linux-6bg3:~ # iperf -c 192.168.1.100
------------------------------------------------------------
Client connecting to 192.168.1.100, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.1.109 port 39572 connected with 192.168.1.100 port 5001
^C[ ID] Interval Transfer Bandwidth
[ 3] 0.0- 6.3 sec 6.38 MBytes 8.51 Mbits/sec
By default, the iperf client connects to the iperf server on the TCP port 5001 and the bandwidth displayed by iperf is the bandwidth from the client to the server. In the above example, it is 8.51 Mbits/sec between two Linux test systems connected over a wireless network.