Re: does '-n' work?
Well I found your problem. Since UDP is connectionless we have a handshake
at the end so that the server knows to close the socket and stop waiting.
This can be anywhere between 1-10 packets depending on if any packets get
lost. I think that you will find that if you use -n 28 -l 14 you will get
3 packets and so forth. You really do not want to bypass the closing
handshake because the server could in turn leak a lot. If -n actually
worked correctly (number of packets, instead of bytes) it still would not
take into account these 1-10 final packets, likewise TCP does not take
into account ACK SYN etc. Sorry for the confusion.
Kevin
On Tue, 21 Jan 2003, Yaniv Kaul wrote:
> Nope, still two packes for '-n 14 -l 14'.
>
> Kevin Gibbs wrote:
>
> Actually it works (sorta) but is misrepresented in the documentation. The
> -n actually takes in a byte amount not a number of packets. I will change
> this in future releases, but for now use -n 14 -l 14 for a single packet
> and so forth. I am not sure why it is sending two packets, but I will look
> into that later.
>
> Kevin
>
> On Tue, 21 Jan 2003, Yaniv Kaul wrote:
>
>
>
> Seems like with '-n' iperf (1.65, Linux) is sending 2 packets, whatever
> is '-n' set to, and reports it sent 1:
> [root --at-- yogi bin]# iperf -c 10.9.201.5 -u -n 1 -l 14
> ------------------------------------------------------------
> Client connecting to 10.9.201.5, UDP port 5001
> Sending 14 byte datagrams
> UDP buffer size: 64.0 KByte (default)
> ------------------------------------------------------------
> [ 3] local 192.168.9.121 port 32778 connected with 10.9.201.5 port 5001
> [ ID] Interval Transfer Bandwidth
> [ 3] 0.0- 0.0 sec 14.0 Bytes 1.87 Mbits/sec
> [ 3] Sent 1 datagrams
> [root --at-- yogi bin]# iperf -c 10.9.201.5 -u -n 2 -l 14
> ------------------------------------------------------------
> Client connecting to 10.9.201.5, UDP port 5001
> Sending 14 byte datagrams
> UDP buffer size: 64.0 KByte (default)
> ------------------------------------------------------------
> [ 3] local 192.168.9.121 port 32778 connected with 10.9.201.5 port 5001
> [ ID] Interval Transfer Bandwidth
> [ 3] 0.0- 0.0 sec 14.0 Bytes 1.90 Mbits/sec
> [ 3] Sent 1 datagrams
> [root --at-- yogi bin]# iperf -c 10.9.201.5 -u -n 4 -l 14
> ------------------------------------------------------------
> Client connecting to 10.9.201.5, UDP port 5001
> Sending 14 byte datagrams
> UDP buffer size: 64.0 KByte (default)
> ------------------------------------------------------------
> [ 3] local 192.168.9.121 port 32778 connected with 10.9.201.5 port 5001
> [ ID] Interval Transfer Bandwidth
> [ 3] 0.0- 0.0 sec 14.0 Bytes 1.84 Mbits/sec
> [ 3] Sent 1 datagrams
>
>
>
>
>
>
>