Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to specify iperf client port

Tags:

port

client

iperf

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?

like image 698
mirandaio Avatar asked Apr 08 '12 18:04

mirandaio


People also ask

Which port does iPerf 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.

What is client and server in iPerf?

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.

What is iPerf client?

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.


2 Answers

-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
like image 85
Dan Avatar answered Nov 09 '22 02:11

Dan


iperf -c <remoteip> --port <remoteport> -B <localbindip>:<localbindport>

I have been able to do this using the above.

like image 24
joe d Avatar answered Nov 09 '22 03:11

joe d