[netperf-talk] netperf port numbers
Rick Jones
rick.jones2 at hp.com
Tue Aug 9 10:12:24 PDT 2011
On 08/09/2011 09:56 AM, Vishal Ahuja wrote:
> Hi All,
>
> I am supplying netperf with the port numbers of the client and the
> server. *sudo netperf -H 192.168.0.9 -L 192.168.0.8 -t UDP_STREAM -p
> 5001,5001. *But when I view the tcpdump trace, I see different port
> numbers than the ones I have specified. The command I use to view the
> port numbers in the trace: *tshark -r netperfClient.pcap -T fields -e
> udp.srcport -e udp.dstport*.
Vishal
First, you should wait more than just 6 minutes (based on the times I'm
seeing in my mail client) between sending direct email to me, and then
asking the very same question to netperf-talk.
Second, for the sake of posterity, a repeat of what I sent in direct email.
To control the port numbers used by the data connection, one should use
the test-specific -P option. That is to say, one after the "--" that
separates global from test-specific options. So,
netperf -H 192.168.0.9 -L 192.168.0.8 -t UDP_STREAM -- -P 5001
Also, with those options, I believe there is no need to run as root.
raj at tardy:~/netperf2_trunk$ src/netperf -- -h
Usage: netperf [global options] -- [test options]
OMNI and Migrated BSD Sockets Test Options:
-b number Send number requests at start of _RR tests
-c Explicitly declare this a connection test such as
TCP_CRR or TCP_CC
-C Set TCP_CORK when available
-d direction Explicitly set test direction based on bitwise OR
of 0x2 for transmit and 0x4 for receive. Default:
based on test type
-D [L][,R] Set TCP_NODELAY locally and/or remotely (TCP_*)
-h Display this text
-H name[/mask],fam Use name (or IP) and family as target of data
connection
A mask value will cause randomization of the IP used
-k [file] Generate keyval output optionally based on file
Use filename of '?' to get the list of choices
-L name[/mask],fam Use name (or IP) and family as source of data
connection
A mask value will cause randomization of the IP used
-m bytes Set the send size (TCP_STREAM, UDP_STREAM)
-M bytes Set the recv size (TCP_STREAM, UDP_STREAM)
-n Use the connected socket for UDP locally
-N Use the connected socket for UDP remotely
-o [file] Generate CSV output optionally based on file
Use filename of '?' to get the list of choices
-O [file] Generate classic-style output based on file
Use filename of '?' to get the list of choices
-p min[,max] Set the min/max port numbers for TCP_CRR, TCP_TRR
-P local[,remote] Set the local/remote port for the data socket
-r req,[rsp] Set request/response sizes (TCP_RR, UDP_RR)
-R 0/1 Allow routing of traffic on data connection.
Default: 0 (off) for UDP_STREAM, 1 (on) otherwise
-s send[,recv] Set local socket send/recv buffer sizes
-S send[,recv] Set remote socket send/recv buffer sizes
-t type Explicitly set socket type. Default is implicit
based on other settings
-T protocol Explicitly set data connection protocol. Default is
implicit based on other settings
-u uuid Use the supplied string as the UUID for this test.
-4 Use AF_INET (eg IPv4) on both ends of the data conn
-6 Use AF_INET6 (eg IPv6) on both ends of the data conn
For those options taking two parms, at least one must be specified;
specifying one value without a comma will set both parms to that
value, specifying a value with a leading comma will set just the second
parm, a value with a trailing comma will set just the first. To set
each parm to unique values, specify both and separate them with a
comma.
happy benchmarking,
rick jones
More information about the netperf-talk
mailing list