Introduction
This document provides instructions for performing network bandwidth tests using iperf3 on FreeBSD or Linux systems with 1Gbps interfaces. iperf3 is a powerful tool for measuring network performance, including TCP and UDP throughput.
Prerequisites
- iperf3 installed on both the client and server machines.
- Access to a command-line interface on both machines.
- Basic understanding of network concepts (TCP/UDP, bandwidth).
TCP Bandwidth Test
TCP is a connection-oriented protocol that provides reliable, ordered delivery of data. This test measures the maximum TCP throughput between two hosts.
On the server machine, start iperf3 in server mode:
# iperf3 -s

On the client machine, connect to the server and run the test.
# iperf3 -c <server_ip_address>

Interval
: The time range of the measurement.Transfer
: The amount of data transferred during the interval.Bitrate
: The data transfer rate (bandwidth) in bits per second.Retr
: The number of TCP retransmissions.Cwnd
: TCP congestion window size.
Interpretation:
- The
Bitrate
value indicates the TCP throughput. In a 1Gbps network, you should typically see values around 900+ Mbps, considering protocol overhead. - A high retr value indicates network congestion.
- The sender and reciever lines show the results from each side of the connection.
UDP Bandwidth Test
On the server machine, start iperf3 in server mode with UDP:
# iperf3 -s -u

On the client machine, connect to the server and run the UDP test:
# iperf3 -c <servers_ip_address> -u -b 1G
-u
: Enables UDP mode.-b 1G
: Sets the target bandwidth to 1 Gigabit per second.- You can adjust the -b parameter to test different bandwidths.

Interpretation:
- The
Bitrate
value indicates the UDP throughput. Jitter
The variation in packet arrival time. Should be low in a stable network.Lost/Total Datagrams
The number of lost packets and the total number of packets sent. Should ideally be 0/Total. Any packet loss indicates potential issues.- A high packet loss indicates network congestion or errors.
Bidirectional Bandwidth Tests
This test measures the bandwidth in both directions simultaneously.
On the server machine, start iperf3 in server mode:
# iperf3 -s

On the client machine, connect to the server and run the bidirectional test:
# iperf3 -s <server_ip_address> -b 1G -R
-R
: Runs the test in reverse mode, resulting in a bi-directional test.-b 1G
: sets the bandwidth to 1G.
