First of all, make sure you have iperf installed on both hosts.
If you haven’t, then use the following command to install it. I will be using Ubuntu flavour linux for demonstration.
apt-get install iperf
Pick one host as Server, one host as Client.
On the server issue the following command
One the Client, issue the following command
You can find the Server_IP by using ifconfig -a on your host
iperf -c Server_IP
See the following example for more infoRead more