It's fairly simple. You use two machines: one for a server and one for a client. It really doesn't matter which system is in what role; they are simply connection points.
To test TCP (normal bandwidth testing), you execute the binaries as follows on the server:
On the client, you run the following:
Code:
iperf3 -c <IP Address of server>
For proper testing of a local system, you want to be on the same subnet, otherwise you may find a router that cannot route that fast. Of course, you may find the local switch to be a bottleneck too, but that's rare these days.