$linuxjunkies
>

iperf3(1)

iperf3 measures network bandwidth and performance between two hosts using TCP, UDP, or SCTP protocols.

UbuntuDebianFedoraArch

Synopsis

iperf3 -s [OPTION]... | iperf3 -c SERVER [OPTION]...

Description

iperf3 is a tool for measuring maximum network throughput and latency between a client and server. One instance runs in server mode (-s) listening for connections, while another runs in client mode (-c) connecting to the server and sending test traffic. It supports multiple parallel streams, bidirectional testing, and detailed performance statistics.

Common use cases include validating network link capacity, troubleshooting bandwidth issues, and benchmarking network hardware. Results show throughput in Mbps or Gbps, jitter, packet loss, and other metrics depending on the protocol used.

Common options

FlagWhat it does
-sRun in server mode, listening for incoming client connections
-c HOSTRun in client mode and connect to server at HOST (IP or hostname)
-p PORTSet the port to listen on (server) or connect to (client); default is 5201
-P NUMNumber of parallel client streams to create (default 1)
-t SECONDSDuration of test in seconds; default is 10
-uUse UDP instead of TCP for the test
-b BITRATESet UDP bitrate limit, e.g. '10M' for 10 Mbps (client mode)
-RRun bidirectional test (measure both directions simultaneously)
-i SECONDSInterval for periodic bandwidth reports; default is 1
-JOutput results in JSON format instead of human-readable text
-w SIZESet TCP window size or UDP buffer size, e.g. '512K'
-B BIND_ADDRESSBind to specific local address (useful for multi-homed systems)

Examples

Start iperf3 in server mode listening on the default port 5201

iperf3 -s

Connect to a server at 192.168.1.100 and run a 10-second TCP throughput test

iperf3 -c 192.168.1.100

Test with 4 parallel streams for 30 seconds to measure aggregate bandwidth

iperf3 -c 192.168.1.100 -P 4 -t 30

Run UDP test with bandwidth limited to 100 Mbps, measuring jitter and packet loss

iperf3 -c 192.168.1.100 -u -b 100M

Measure throughput in both directions simultaneously (client to server and server to client)

iperf3 -c 192.168.1.100 -R

Start server on port 5202 running as a daemon in the background

iperf3 -s -p 5202 -D

Connect to server and output JSON results every 2 seconds, parsed with jq for readability

iperf3 -c 192.168.1.100 -i 2 -J | jq

Run 60-second test with a 2MB TCP window size for high-bandwidth networks

iperf3 -c 192.168.1.100 -w 2M -t 60

Related commands