Iperf - Network Bandwidth Measurement Tool

Measure network bandwidth performance with Iperf, a powerful command-line tool for client-server network testing. Learn Iperf commands for TCP, UDP, and bi-directional tests.

Iperf

Understanding Iperf for Network Bandwidth Measurement

Iperf is a widely used command-line tool designed for active network performance assessment. It supports tuning various parameters related to the test and the UDP or TCP traffic generated. Iperf allows you to measure the maximum achievable bandwidth on an IP network. It consists of two programs: a server that can be run on the target machine, and a client that initiates the test.

Key Iperf Commands and Usage

Below are common Iperf commands to help you measure network throughput effectively. These examples cover starting the server, running the client, and specifying various test parameters.

Starting the Iperf Server

To begin testing, you first need to start the Iperf server on the machine you want to test against. The server listens for incoming connections from the client.

# Start an iperf server on the default port (5001)
iperf -s

# Start an iperf server on a specific port (for example, 5201)
iperf -s -p 5201

Running the Iperf Client

Once the server is running, you can use the Iperf client on another machine to initiate a bandwidth test. You'll need to specify the IP address of the server.

# Run an iperf client to connect to a server at a specific IP address
iperf -c <server_ip>

Advanced Iperf Test Configurations

Iperf offers numerous options to customize your network tests, including limiting bandwidth, setting test duration, and using different protocols like UDP.

# Run an iperf client with a specific bandwidth limit (1 Mbps)
iperf -c <server_ip> -b 1M

# Run an iperf test for a specific duration (10 seconds)
iperf -c <server_ip> -t 10

# Run an iperf test using UDP instead of TCP
iperf -c <server_ip> -u

# Run an iperf test with a specific port (e.g., 5201)
iperf -c <server_ip> -p 5201

# Run a bi-directional bandwidth test (client and then server directions)
iperf -c <server_ip> -d

# Run an iperf test using IPv6
iperf -c <server_ipv6_address> -V

# Generate test report format as JSON
iperf -c <server_ip> --reportstyle C

Further Resources for Network Testing

For more in-depth information on network protocols and performance testing, consider exploring the following resources: