Iperf is a client server program that you run it in server mode at one end and connect to its from another computer on the other side of the network.
One both machines run:
sudo apt-get install iperf
We’ll start an iperf server on one of the machines:
And then on the other computer, tell iperf to connect as a client:
iperf -c <ip or hostname>