Is there a way to force an iperf client to use a specific port number as its outgoing port instead of letting iperf on choosing a random port to use?
By default iPerf uses TCP/UDP port 5201/5001 (depending on version) for ports during transfer. This does not work too well for ECMP testing. Specifying the -P flag tells iPerf to spawn multiple client threads, where the source port uses 5201 as well as a series of ephemeral ports.
iPerf is simple, open-source, command-line network diagnostic tool, which you can run on Linux, BSD, or Windows operating systems and install on two endpoints. One endpoint runs in a "server" mode, which listens for requests. The other endpoint runs in a "client" mode and sends data.
iPerf is a tool which can be used to test LAN and WLAN speeds and throughput. It works by generating traffic from a computer acting as a client which is sent to the IP address of a computer acting as the server.
-p, --port # $IPERF_PORT The server port for the server to listen on and the client to connect to. This should be the same in both client and server. Default is 5001, the same as ttcp.
-p option denotes the port # to be use in client or server.Then you need to set the same port to server side and client site.
For example Server
iperf -s -p 10000
Client
iperf -c SERVER_IP -p 10000 -t60
iperf -c <remoteip> --port <remoteport> -B <localbindip>:<localbindport>
I have been able to do this using the above.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With