I am unable to set the bandwidth on both sides using the Iperf tool.

When I use the command iperf -c -b 10m -l 32k -w 128k I get this error:

--iperf: ignoring extra argument -- 10m

--Can't use packet-oriented mode with these settings.

Why am I getting this error?

  • iperf 2.0.8+ supports -b <bandwidth> for TCP using a token bucket.
    – rjmcmahon
    Commented Jul 15, 2016 at 18:01
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can post and accept your own answer.
    – Ron Maupin
    Commented Jan 5, 2021 at 18:21

4 Answers 4


I'm inclined to believe that it is your caps/non-caps on the bandwidth designations (i.e. -b 10M -l 32K -w 128K). I can't test it because we don't know what version you're running. Iperf does make a distinction between bits and bytes:

-f, --format    [kmKM]   format to report: Kbits, Mbits, KBytes, MBytes

Though, the sections you were modifying were strictly K or M:

-b, --bandwidth #[KM]    for UDP, bandwidth to send at in bits/sec
                         (default 1 Mbit/sec, implies -u)
-l, --len       #[KM]    length of buffer to read or write (default 8 KB)
-w, --window    #[KM]    TCP window size (socket buffer size)

I can, however, tell you that getting your version up to current will render this issue obsolete. Iperf version 2.0.5 (08 Jul 2010) makes no distinction between the 2 different types in those fields.

Here is your exact cli syntax working for one of my private servers.


root@AFP001SRV01:~# iperf -s -u
Server listening on UDP port 5001
Receiving 1470 byte datagrams
UDP buffer size:  208 KByte (default)
[  3] local port 5001 connected with port 40974
[ ID] Interval       Transfer     Bandwidth        Jitter   Lost/Total Datagrams
[  3]  0.0-10.0 sec   550 KBytes   449 Kbits/sec   0.017 ms    0/  383 (0%)


root@AFP001SRV01:~# iperf -c  -b 10m -l 32k -w 128k
WARNING: option -b implies udp testing
Client connecting to, UDP port 5001
Sending 32768 byte datagrams
UDP buffer size:  256 KByte (WARNING: requested  128 KByte)
[  3] local port 40542 connected with port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  12.0 MBytes  10.0 Mbits/sec
[  3] Sent 383 datagrams
[  3] Server Report:
[  3]  0.0-10.0 sec   550 KBytes   449 Kbits/sec   0.008 ms    0/  383 (0%)

You can use iperf3, or v2 only in UDP mode:

# iperf -v
iperf version 2.0.5 (08 Jul 2010) pthreads
# iperf -h
  -b, --bandwidth #[KM]    for UDP, bandwidth to send at in bits/sec
                           (default 1 Mbit/sec, implies -u)


# iperf3 -h
  -b, --bandwidth #[KMG][/#] target bandwidth in bits/sec
                            (default 1 Mbit/sec for UDP, unlimited for TCP)
                            (optional slash and packet count for burst mode)
  • why this command:->#iperf -c -u -n 100M give the error "Amount-oriented (-n) works only in non-packet-oriented mode."
    – sak
    Commented Apr 11, 2014 at 20:39
  • Have you tried 'iperf -u -c -n 100M' and the server is well set to UDP ?
    – cgasp
    Commented Jun 10, 2014 at 21:13

You need to specify -u UDP "datagram-oriented" mode if not using iperf3.

   -b, --bandwidth n[KM]
          set  target  bandwidth to n bits/sec (default 1 Mbit/sec).  This
          setting requires UDP (-u).



You're getting the error because you're using 10m instead of 10M. Try:

iperf -c  -b 10M -l 32k -w 128k

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.