iperf – Network Performance Measurement

iperf (version 2) is a widely-used tool for measuring TCP and UDP bandwidth performance. It...

Networking Tools Linux Open Source

iperf (version 2) is a widely-used tool for measuring TCP and UDP bandwidth performance. It creates data streams to measure the throughput between two endpoints and reports detailed statistics. While iperf3 is newer, iperf2 remains relevant for compatibility with older systems and specific testing scenarios requiring its unique features.

Key Features

  • TCP/UDP Testing – Measure both protocol types
  • Bidirectional – Test throughput in both directions simultaneously
  • Parallel Streams – Multiple connections for aggregate testing
  • Window Size – Configure TCP window for tuning
  • Bandwidth Limiting – Set target bandwidth for UDP tests
  • Report Intervals – Periodic throughput reporting

Installation

# Debian/Ubuntu
sudo apt install iperf

# RHEL/CentOS/Fedora
sudo dnf install iperf

# Arch Linux
sudo pacman -S iperf

Common Usage Examples

# Start server
iperf -s

# TCP client test
iperf -c server_ip

# UDP test
iperf -c server_ip -u

# UDP with bandwidth target
iperf -c server_ip -u -b 100M

# Bidirectional test
iperf -c server_ip -d

# Multiple parallel streams
iperf -c server_ip -P 4

# Set TCP window size
iperf -c server_ip -w 256K

# Test duration
iperf -c server_ip -t 60

# Report every second
iperf -c server_ip -i 1

Use Cases

iperf is essential for network capacity testing, troubleshooting throughput issues, verifying link speeds, QoS validation, and baseline performance measurements.

Download iperf

Was this article helpful?