Re: iperf -n option with udp
Hi Gokul,
I can confirm this behaviour on FreeBSD 6.2 using Iperf v2.0.2 for both
UDP and TCP modes of operation. The "-n" option appears to have no
effect in the scenario you described. A quick scan of the sourceforge
bug tracker
(http://sourceforge.net/tracker/?atid=711371&group_id=128336&func=browse)
doesn't reveal any filed bugs relating to this issue.
Playing around with it a bit, I did discover that the option does work
as expected with TCP if you use the "M" suffix on the number of bytes
i.e. limit the test to x megabytes e.g. on server run "iperf -s" and on
client run "iperf -c 127.0.0.1 -n 20M" and that works correctly. It does
not work in TCP mode if I use the "K" suffix or no suffix at all, and
the option does not appear to work at all when running in UDP mode,
regardless of the suffix.
Perhaps you should log a bug unless someone out there has some info on
why the "-n" option does not appear to function as expected?
Cheers,
Lawrence
gokul wrote:
Hi,
I am a new user of iperf trying to test our network by passing a given
amount of UDP traffic across. In order to do so, I run the following
commands:
iperf -s -u
iperf -u -c 192.168.18.3 -n 20000
The -n option should limit the traffic passed to 20000 bytes however I
seem to find that data transfer seems to occur indefinitely. I am
using iperf 2.0.2 on ubuntu. Could someone shed some light on the
behavior of the "-n" option ?
Thanks,
Gokul