IPERF3(1)

โœจ NAME โœจ

okay so this is the manual page for iperf3, from the User Manuals, section 1 โ€” and it's literally the moment your network gets a vibe check ๐Ÿ’…

iperf3 โ€” perform network throughput tests. that's it, that's the job. ๐Ÿฆ‹


๐ŸŽ€ SYNOPSIS ๐ŸŽ€

iperf3 -s [ options ]
iperf3 -c server [ options ]

๐Ÿ’– DESCRIPTION ๐Ÿ’–

okay bestie, sit down, because iperf3 is a tool for performing network throughput measurements, and it eats. It can test TCP, UDP, or SCTP throughput. To perform an iperf3 test, the user must establish both a server and a client โ€” it takes two, no solo main character energy here. ๐Ÿ˜ญ

The iperf3 executable contains both client and server functionality. An iperf3 server can be started using either of the -s or --server command-line parameters, for example:

iperf3 -s
iperf3 --server

Note that many iperf3 parameters have both short (-s) and long (--server) forms. In this section we will generally use the short form of command-line flags, unless only the long form of a flag is available. iykyk โœจ

By default, the iperf3 server listens on TCP port 5201 for connections from an iperf3 client. A custom port can be specified by using the -p flag, for example:

iperf3 -s -p 5002

After the server is started, it will listen for connections from iperf3 clients (in other words, the iperf3 program run in client mode). The client mode can be started using the -c command-line option, which also requires a host to which iperf3 should connect. The host can be specified by hostname, IPv4 literal, or IPv6 literal:

iperf3 -c iperf3.example.com
iperf3 -c 192.0.2.1
iperf3 -c 2001:db8::1

If the iperf3 server is running on a non-default TCP port, that port number needs to be specified on the client as well:

iperf3 -c iperf3.example.com -p 5002

The initial TCP connection is used to exchange test parameters, control the start and end of the test, and to exchange test results. This is sometimes referred to as the "control connection". The actual test data is sent over a separate TCP connection, as a separate flow of UDP packets, or as an independent SCTP connection, depending on what protocol was specified by the client. it's giving layered. ๐Ÿงš

Normally, the test data is sent from the client to the server, and measures the upload speed of the client. Measuring the download speed from the server can be done by specifying the -R flag on the client. This causes data to be sent from the server to the client.

iperf3 -c iperf3.example.com -p 5202 -R

Results are displayed on both the client and server. There will be at least one line of output per measurement interval (by default a measurement interval lasts for one second, but this can be changed by the -i option). Each line of output includes (at least) the time since the start of the test, amount of data transferred during the interval, and the average bitrate over that interval. Note that the values for each measurement interval are taken from the point of view of the endpoint process emitting that output (in other words, the output on the client shows the measurement interval data for the client. ๐Ÿ‘€

At the end of the test is a set of statistics that shows (at least as much as possible) a summary of the test as seen by both the sender and the receiver, with lines tagged accordingly. Recall that by default the client is the sender and the server is the receiver, although as indicated above, use of the -R flag will reverse these roles. plot twist, but make it network engineering. ๐Ÿ”ฅ

The client can be made to retrieve the server-side output for a given test by specifying the --get-server-output flag. obsessed with that actually.

Either the client or the server can produce its output in a JSON structure, useful for integration with other programs, by passing it the -J flag. Normally the contents of the JSON structure are only completely known after the test has finished, no JSON output will be emitted until the end of the test. By enabling line-delimited JSON multiple objects will be emitted to provide a real-time parsable JSON output. real-time parsable, periodt. ๐Ÿ’š

iperf3 has a (overly) large set of command-line options that can be used to set the parameters of a test. They are given in the "GENERAL OPTIONS" section of the manual page below, as well as summarized in iperf3's help output, which can be viewed by running iperf3 with the -h flag.


๐ŸŒˆ GENERAL OPTIONS ๐ŸŒˆ

okay here comes the menu, and bestie it is LONG. every single one, no skipping, we don't do that here. ๐Ÿ“

  • -p, --port n โ€” Set server port to listen on/connect to to n (default 5201). yes the port is the door. ๐Ÿšช
  • -f, --format [kmgtKMGT] โ€” Set format to report: Kbits/Mbits/Gbits/Tbits.
  • -i, --interval n โ€” Pause n seconds between periodic throughput reports; default is 1, use 0 to disable. (so 0 = no more little updates, just the big finale โœจ)
  • -I, --pidfile file โ€” Write a file with the process ID. This option is most useful when running as a daemon.
  • -F, --file name โ€” Use a file as the source (on the sender) or sink (on the receiver) of data, rather than just generating random data or throwing it away. This feature is used for finding whether or not the storage subsystem is the bottleneck for file transfers. It does not turn iperf3 into a file transfer tool. The length, attributes, and in some cases contents of the received file may not match those of the original file. This option is unavailable when doing --udp tests. ๐Ÿซถ note the "does not turn iperf3 into a file transfer tool" โ€” do not use this as scp, bestie.
  • -A, --affinity n/n,m โ€” Set the CPU affinity, if possible (Linux, FreeBSD, and Windows only). On both the client and server you can set the local affinity by using the n form of this argument (where n is a CPU number). In addition, on the client side you can override the server's affinity for just that one test, using the n,m form of argument. Note that when using this feature, a process will only be bound to a single CPU (as opposed to a set containing potentially multiple CPUs).
  • -B, --bind host[%dev] โ€” Bind to the specific interface associated with address host. If an optional interface is specified, it is treated as a shortcut for --bind-dev dev. Note that a percent sign and interface device name are required for IPv6 link-local address literals, in order to set the link-local scope.
  • --bind-dev dev โ€” Bind to the specified network interface. This option uses SO_BINDTODEVICE or IP_BOUND_IF, and may require root permissions. (Available on Linux and possibly other systems.)
  • -V, --verbose โ€” Produce more detailed output. she's chatty and we love her. ๐Ÿ’œ
  • -J, --json โ€” Output in JSON format instead of the default human-readable output.
  • --json-stream โ€” Output in line-delimited JSON format instead of the default human-readable output. This option overrides the --json option, if that option was also specified.
  • --json-stream-full-output โ€” Output in JSON format with JSON streams enabled. This flag only takes effect if the --json-stream option was also specified.
  • --logfile file โ€” Send output to a log file.
  • --forceflush โ€” Force flushing output at every interval. Used to avoid buffering when sending output to pipe.
  • --timestamps[=format] โ€” Prepend a timestamp at the start of each output line. By default, timestamps have the format emitted by ctime(1). Optionally, = followed by a format specification can be passed to customize the timestamps, see strftime(3). If this optional format is given, the = must immediately follow the --timestamps option with no whitespace intervening. โš ๏ธ no space, bestie, the = is clingy.
  • --rcv-timeout # โ€” Set idle timeout for receiving data during active tests. The receiver will halt a test if no data is received from the sender for this number of ms (default to 120000 ms, or 2 minutes).
  • --snd-timeout # โ€” Set timeout for unacknowledged TCP data (on both test and control connections) This option can be used to force a faster test timeout in case of a network partition during a test. The required parameter is specified in ms, and defaults to the system settings. This functionality depends on the TCP_USER_TIMEOUT socket option, and will not work on systems that do not support it.
  • --use-pkcs1-padding โ€” This option is only meaningful when using iperf3's authentication features. Versions of iperf3 prior to 3.17 used PCKS1 padding in the RSA-encrypted credentials, which was vulnerable to a side-channel attack that could reveal a server's private key. Beginning with iperf-3.17, OAEP padding is used, however this is a breaking change that is not compatible with older iperf3 versions. Use this option to preserve the less secure, but more compatible, behavior. so likeโ€ฆ less secure. she said it, not me. ๐Ÿ’€
  • -m, --mptcp โ€” Use the MPTCP variant for the current protocol. This only applies to TCP and enables MPTCP usage.
  • -d, --debug โ€” Emit debugging output. Primarily (perhaps exclusively) of use to developers.
  • -v, --version โ€” Show version information and quit.
  • -h, --help โ€” Show a help synopsis.

๐Ÿ‘‘ SERVER SPECIFIC OPTIONS ๐Ÿ‘‘

okay bestie, this is the section for when you're the one hosting, not the one testing. main character server energy only โœจ these flags decide how your iperf3 server behaves, who it lets in, and when it ghosts a client. let's get into it ๐Ÿ’…

  • -s, --server โ€” literally just runs iperf3 in server mode. you're the host now, the clients come to you. periodt ๐Ÿซถ
  • -D, --daemon โ€” runs the server in the background as a daemon, so it dips out of your terminal and just... lives there. no cap, very set-it-and-forget-it ๐ŸŒธ
  • -1, --one-off โ€” handles at most one client connection, then exits. one and done, she's not doing encores ๐Ÿ’€ and heads up: if an idle time is set, the server will exit after that amount of time with no connection at all. so she can also leave on her own if nobody shows up ๐Ÿ˜ญ
  • --idle-timeout n โ€” restarts the server after n seconds in case it gets stuck (yes, servers get stuck too, we don't judge ๐Ÿ™ˆ). and in one-off mode? this is the number of seconds the server will wait before exiting. same number, different job, iykyk โœจ
  • --server-max-duration n โ€” the maximum time, in seconds, that an iperf client can run against the server. and here's the gatekeeping part: when the sum of the client's time and omit values goes over the max duration set by the server, or the client's time value is 0, the measurement gets rejected. no measurement for you, bestie ๐Ÿšซ
  • --server-bitrate-limit n[KMGT][/n] โ€” sets a limit on the server side, and it will abort a test if either: the client specifies a test of more than n bits per second, or the average data sent or received by the client (including all the data streams) is greater than n bits per second. the default limit is 0, which means no limit โ€” go wild, no rules ๐ŸŒˆ the interval over which to average the data rate is 5 seconds by default, but you can specify it by adding a / character and a number to the bitrate specifier. so like, that second n after the slash? that's your averaging window ๐Ÿ‘‘
fr fr note: [KMGT] are your size suffixes, and the /n part is separate from them. don't mix it up ๐ŸŽ€
  • --rsa-private-key-path file โ€” path to the RSA private key (not password-protected) used to decrypt authentication credentials from the client. this one only exists if iperf3 was built with OpenSSL support ๐Ÿฆ‹
  • --authorized-users-path file โ€” path to the configuration file holding the authorized users credentials that are allowed to run iperf tests. again, only if built with OpenSSL support ๐Ÿ” the file is a comma separated list of usernames and password hashes, and you can find more info on the structure of that file in the EXAMPLES section. go peek ๐Ÿ‘€
  • --time-skew-threshold seconds โ€” specify the allowable time skew threshold (in seconds) between the server and client during the authentication process. basically: how far apart can their clocks be before things get weird โฐโœจ

โœจ CLIENT SPECIFIC OPTIONS โœจ

  • -c, --client host[%dev] โ€” okay so this is how you become the client, bestie ๐Ÿ’… you point it at the server you wanna talk to and off you go. Default vibe is client-sends-data-to-server, unless you bring -R to flip it. If you tack on an optional interface, that's just a cute shortcut for --bind-dev dev. And heads up: for IPv6 link-local address literals you need the percent sign plus the interface device name, no skipping it.
  • --sctp โ€” use SCTP instead of TCP for the actual test (FreeBSD and Linux only, so don't try this everywhere). Note that the control connection between client and server is still plain old TCP. The handshake is not the vibe, it's just the plumbing.
  • -u, --udp โ€” use UDP instead of TCP for the test. Same deal as above: TCP is still what carries the control connection between client and server.
  • --connect-timeout n โ€” set the timeout for establishing that very first control connection to the server, measured in milliseconds. Default behavior is whatever your OS does for TCP connection establishment. Giving it a shorter value can speed up the detection of a down iperf3 server, which is lowkey handy.
  • -b, --bitrate n[KMGT] โ€” set your target bitrate to n bits/sec (default is 1 Mbit/sec for UDP, and unlimited for TCP/SCTP). Got multiple streams going (-P)? The throughput limit gets applied separately to each stream, no sharing. You can also add a / and a number to the bitrate specifier โ€” that's called "burst mode" โœจ and it performs the given number of sends without pausing, even if that temporarily blows past the throughput limit you set. Set the target bitrate to 0 and bitrate limits are disabled entirely (super useful for UDP tests). This throughput limit is implemented internally inside iperf3, and it's available on all platforms. Compare it with the --fq-rate flag, they're different things. This option replaces --bandwidth, which is now deprecated but (at least for now) still accepted.
  • --pacing-timer n[KMGT] โ€” set the pacing timer interval in microseconds (default 1000 microseconds, aka 1 ms). This controls iperf3's internal pacing timer for the -b/--bitrate option, and the timer fires at whatever interval you set here. Smaller values smooth out the traffic iperf3 emits, but potentially at the cost of performance, because the timer gets processed more often. Tradeoffs, bestie.
  • --fq-rate n[KMGT] โ€” set a rate to be used with fair-queueing based socket-level pacing, in bits per second. This pacing (if you specify it) is in addition to any pacing from iperf3's internal throughput pacing (the -b/--bitrate flag), and you can specify both for the same test. Only available on platforms supporting the SO_MAX_PACING_RATE socket option (currently only Linux). Default is no fair-queueing based pacing.
  • --no-fq-socket-pacing โ€” this one is deprecated and will be removed ๐Ÿ˜ญ it's exactly the same as specifying --fq-rate=0.
  • -t, --time n โ€” set the test duration in seconds (default 10 secs). The -t, -n, and -k options are mutually exclusive, so pick your fighter.
  • -n, --bytes n[KMGT] โ€” set the number of bytes to transmit. The -t, -n, and -k options are mutually exclusive.
  • -k, --blockcount n[KMGT] โ€” set the number of blocks (packets) to transmit. The -t, -n, and -k options are mutually exclusive.
  • -l, --length n[KMGT] โ€” set the length of the buffer to read or write. For TCP tests the default is 128KB. For UDP, iperf3 tries to dynamically determine a reasonable sending size based on the path MTU; if that can't be determined it uses 1460 bytes as a sending size. For SCTP tests the default size is 64KB.
  • --cport port โ€” bind data streams to a specific TCP or UDP client port (TCP and UDP only; the default is to use an ephemeral port).
  • -P, --parallel n โ€” set the number of parallel client streams to run. Beginning with iperf-3.16, iperf3 spawns off a separate thread for each test stream. Multiple streams may get you higher throughput than a single stream when your network throughput is CPU-limited. She's multithreaded now ๐Ÿ’…
  • -R, --reverse โ€” reverse the direction of a test, so the server is the one sending data to the client. Plot twist.
  • --bidir โ€” test in both directions (normal and reverse), with both the client and server sending and receiving data simultaneously. Chaotic, bidirectional, iconic.
  • -w, --window n[KMGT] โ€” set the socket buffer size / window size. This value gets sent to the server and used on that side too; on both sides this option sets both the sending and receiving socket buffer sizes. You can use it to set (indirectly) the maximum TCP window size. Note that on Linux systems, the effective maximum window size is approximately double what you specify here โ€” that is not a bug in iperf3, it's a feature of the Linux kernel, as documented by tcp(7) and socket(7).
  • -M, --set-mss n โ€” set the TCP/SCTP maximum segment size, which is MTU minus 40 bytes.
  • -N, --no-delay โ€” set the TCP/SCTP no delay option, which disables Nagle's Algorithm. Goodbye buffering era ๐Ÿ™ˆ
  • -4, --version4 โ€” force the use of IPv4.
  • -6, --version6 โ€” force the use of IPv6.
  • -S, --tos n โ€” set the IP type of service bits. The usual prefixes for octal and hex work here, i.e. 52, 064 and 0x34 all specify the same value.
  • --dscp dscp โ€” set the IP DSCP bits. Both numeric and symbolic values are accepted. Numeric values can be given in decimal, octal and hex (see --tos above for how that works).
  • -L, --flowlabel n โ€” set the IPv6 flow label (currently only supported on Linux).
  • -X, --xbind name โ€” bind SCTP associations to a specific subset of links using sctp_bindx(3). The --B flag gets ignored if this flag is specified. Normally SCTP includes the protocol addresses of all active links on the local host when setting up an association โ€” specifying at least one --X name disables that behavior. This flag must be specified for each link to be included in the association, and it's supported for both iperf servers and clients (the client side is supported by passing the first --X argument to bind(2)). Hostnames are accepted as arguments and are resolved using getaddrinfo(3). If the --4 or --6 flags are also specified, names that don't resolve to addresses within the specified protocol family get ignored.
  • --nstreams n โ€” set the number of SCTP streams.
  • -Z, --zerocopy โ€” use a "zero copy" method of sending data, like sendfile(2), instead of the usual write(2). Efficiency queen ๐Ÿ‘‘
  • --skip-rx-copy โ€” ignore received packet data, using the MSG_TRUNC flag passed to the recv(2) system call.
  • -O, --omit n โ€” perform a pre-test for n seconds and omit the pre-test statistics, so you skip past the TCP slow-start period. No one wants slow-start numbers in their results, fr fr.
  • -T, --title str โ€” prefix every output line with the string str.
  • --extra-data str โ€” specify an extra data string field to be included in JSON output.
  • -C, --congestion algo โ€” set the congestion control algorithm (Linux and FreeBSD only). An older --linux-congestion synonym for this flag is accepted but is deprecated.
  • --get-server-output โ€” get the output from the server. The output format is determined by the server (in particular, if the server was invoked with the --json flag, the output will be in JSON format, otherwise it'll be human-readable). If the client is run with --json, the server output is included in a JSON object; otherwise it's appended at the bottom of the human-readable output. Note that the server output is only available if the test completes โ€” if it gets interrupted you get nothing ๐Ÿ˜ญ
  • --udp-counters-64bit โ€” use 64-bit counters in UDP test packets. This can help prevent counter overflows during long or high-bitrate UDP tests. Both client and server need to be running at least version 3.1 for this option to work. It may become the default behavior at some point in the future, so stay tuned.
  • --gsro โ€” enable UDP Generic Segmentation Offload (GSO) on the sender and Generic Receive Offload (GRO) on the receiver, where supported by the operating system and network hardware (currently Linux only). GSO lets the network stack aggregate multiple UDP datagrams into larger packets, which improves throughput and reduces CPU overhead โœจ This is a client-only option; the client communicates the GSO/GRO settings to the server automatically. It's disabled by default and must be explicitly enabled with this flag.
  • --repeating-payload โ€” use a repeating pattern in the payload instead of random bytes. The same payload is used in iperf2 (ASCII '0..9' repeating). It might help you test and reveal problems in networking gear with hardware compression (including some WiFi access points), where iperf2 and iperf3 perform differently, just based on payload entropy. Sneaky little detail.
  • --dont-fragment โ€” set the IPv4 Don't Fragment (DF) bit on outgoing packets. Only applicable to tests doing UDP over IPv4.
  • --username username โ€” specify the username to use for authentication to the iperf server (if built with OpenSSL support). The password gets prompted for interactively when the test is run. Note the password can also be specified via the IPERF3_PASSWORD environment variable โ€” if that variable is present, the password prompt gets skipped entirely. Convenient ๐ŸŽ€
  • --rsa-public-key-path file โ€” set the path to the RSA public key used to encrypt authentication credentials (if built with OpenSSL support).

๐Ÿ’… EXAMPLES ๐Ÿ’…

Okay bestie, this is the part where it all comes together. Real commands, real files, no cap. ๐ŸŽ€


๐Ÿ” Authentication - RSA Keypair

So iperf3's authentication feature needs an RSA public keypair. Here's the vibe:

  • The public key encrypts the authentication token that's holding your user credentials.
  • The private key decrypts that authentication token.

And some non-negotiable rules, pay attention ๐Ÿ’€:

  • The private key must be in PEM format, and it must not have a password set. Like, none. At all.
  • The public key must be in PEM format and use SubjectPrefixKeyInfo encoding.

Here's a set of UNIX/Linux commands using OpenSSL to generate a correctly-formed keypair, literally copy-paste:

> openssl genrsa -des3 -out private.pem 2048
> openssl rsa -in private.pem -outform PEM -pubout -out
public.pem
> openssl rsa -in private.pem -out private_not_protected.pem \
  -outform PEM

And after you run all that โœจ:

  • the public key lives in the file public.pem
  • the private key lives in the file private_not_protected.pem

๐Ÿ“ Authentication - Authorized users configuration file

Now you gotta hand the iperf3 server a plaintext file that says who's allowed in. Simple as that, girl. ๐Ÿซถ

The file is literally just a list of comma-separated pairs of a username and its matching password hash. And that password hash? It's a SHA256 hash of the string "{$user}$password".

Oh and bonus: the file can also contain commented lines, which are the ones starting with the # character. Iconic. ๐Ÿ‘‘

Here's how you generate the password hash on a UNIX/Linux system:

> S_USER=mario S_PASSWD=rossi
> echo -n "{$S_USER}$S_PASSWD" | sha256sum | awk '{ print $1 }'

And here's what a password file looks like โ€” this one has an entry matching that username and password from above:

> cat credentials.csv
# file format: username,sha256
mario,bf7a49a846d44b454a5d11e7acfaf13d138bbe0b7483aa3e050879700572709b

๐Ÿ‘‘ AUTHORS ๐Ÿ‘‘

Wanna know who actually built this thing? The full list of contributors to iperf3 is in the documentation over at:

https://software.es.net/iperf/dev.html#authors

Go give them their flowers, they earned it ๐Ÿ’


๐ŸŒˆ SEE ALSO ๐ŸŒˆ


And that's the whole page, bestie!! ๐Ÿฆ‹ You made it to the end, I'm so proud. This was ESnet's iperf3 man page, dated April 2026, and it's filed under IPERF3(1) in section 1 โ€” you know, the "user commands" section, main character energy only. Now go forth and measure some bandwidth ๐Ÿ’–โœจ๐ŸŒธ

๐Ÿ“ฆ where this page comes from