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 ton(default5201). yes the port is the door. ๐ช-f,--format [kmgtKMGT]โ Set format to report: Kbits/Mbits/Gbits/Tbits.-i,--interval nโ Pausenseconds between periodic throughput reports; default is1, use0to disable. (so0= 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--udptests. ๐ซถ note the "does not turn iperf3 into a file transfer tool" โ do not use this asscp, 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 thenform of this argument (wherenis a CPU number). In addition, on the client side you can override the server's affinity for just that one test, using then,mform 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 addresshost. 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 usesSO_BINDTODEVICEorIP_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--jsonoption, 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-streamoption 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 byctime(1). Optionally,=followed by a format specification can be passed to customize the timestamps, seestrftime(3). If this optional format is given, the=must immediately follow the--timestampsoption 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 to120000ms, 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 theTCP_USER_TIMEOUTsocket 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 to3.17used PCKS1 padding in the RSA-encrypted credentials, which was vulnerable to a side-channel attack that could reveal a server's private key. Beginning withiperf-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 afternseconds 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 is0, 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 thannbits per second, or the average data sent or received by the client (including all the data streams) is greater thannbits per second. the default limit is0, which means no limit โ go wild, no rules ๐ the interval over which to average the data rate is5seconds by default, but you can specify it by adding a/character and a number to the bitrate specifier. so like, that secondnafter the slash? that's your averaging window ๐
fr fr note:[KMGT]are your size suffixes, and the/npart is separate from them. don't mix it up ๐
--rsa-private-key-pathfile โ 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-pathfile โ 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 theEXAMPLESsection. go peek ๐--time-skew-thresholdseconds โ 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-Rto 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-rateflag, 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/--bitrateoption, 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/--bitrateflag), and you can specify both for the same test. Only available on platforms supporting theSO_MAX_PACING_RATEsocket 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-koptions are mutually exclusive, so pick your fighter.-n,--bytes n[KMGT]โ set the number of bytes to transmit. The-t,-n, and-koptions are mutually exclusive.-k,--blockcount n[KMGT]โ set the number of blocks (packets) to transmit. The-t,-n, and-koptions 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 bytcp(7)andsocket(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,064and0x34all 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--tosabove 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 usingsctp_bindx(3). The--Bflag 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--Xname 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--Xargument tobind(2)). Hostnames are accepted as arguments and are resolved usinggetaddrinfo(3). If the--4or--6flags 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, likesendfile(2), instead of the usualwrite(2). Efficiency queen ๐--skip-rx-copyโ ignore received packet data, using theMSG_TRUNCflag passed to therecv(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-congestionsynonym 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--jsonflag, 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 theIPERF3_PASSWORDenvironment 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
SubjectPrefixKeyInfoencoding.
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
- arch rolling: iperf3 3.22-1 ยท BSD-3-Clause
- centos-stream 10: iperf3 3.21-2.el10 ยท BSD-3-Clause-LBNL AND MIT AND dtoa AND BSD-3-Clause AND NCSA AND LicenseRef-Fedora-Public-Domain
- fedora 43: iperf3 3.22-2.fc43 ยท BSD-3-Clause-LBNL AND MIT AND dtoa AND BSD-3-Clause AND NCSA AND LicenseRef-Fedora-Public-Domain
- fedora 43: iperf3 3.22-2.fc43 ยท BSD-3-Clause-LBNL AND MIT AND dtoa AND BSD-3-Clause AND NCSA AND LicenseRef-Fedora-Public-Domain
- fedora 44: iperf3 3.22-1.fc44 ยท BSD-3-Clause-LBNL AND MIT AND dtoa AND BSD-3-Clause AND NCSA AND LicenseRef-Fedora-Public-Domain
- fedora 44: iperf3 3.22-1.fc44 ยท BSD-3-Clause-LBNL AND MIT AND dtoa AND BSD-3-Clause AND NCSA AND LicenseRef-Fedora-Public-Domain
- nixpkgs unstable: iperf 3.21
- opensuse-leap 16.0: iperf 3.21-160000.1.1 ยท BSD-3-Clause
- opensuse-leap 16.0: iperf 3.21-160000.1.1 ยท BSD-3-Clause
- opensuse-leap 16.0: iperf 3.21-160000.1.1 ยท BSD-3-Clause
- opensuse-leap 16.0: iperf 3.21-160000.1.1 ยท BSD-3-Clause
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms