iPerf3 – Test Network Speed in Linux

Photo of author

By rasho

Introduction:

Network speed and throughput are critical factors in evaluating and optimizing network performance. In Linux, iPerf3 is a powerful command-line tool that enables you to measure speed and analyze throughput between two points on a network. This article provides a comprehensive guide on using iPerf3 in Linux, offering step-by-step instructions and command examples for precise network performance testing.

What is iPerf3?

iPerf3 is a free, open-source tool designed for network performance measurement. It generates TCP and UDP traffic between two endpoints on a network, providing detailed information about speed, throughput, latency, packet loss, and other performance metrics.

Installation and Setup

To begin using iPerf3, you need to install it on both the server and client machines. The installation process may vary based on your Linux distribution. Here are the general steps for installing iPerf3:

    1. Open a terminal on your Linux system.
    2. Update the package repositories using the following command:
sudo apt update
    1. Install iPerf3 by running the following command:
sudo apt install iperf3
    1. Once the installation is complete, you can verify it by checking the version:
iperf3 --version

[ads]

Performing Network Speed/Throughput Tests

To measure network speed and throughput using iPerf3, you need a server and a client. The server will listen for incoming connections, and the client will initiate the test. Here’s how to perform a basic network speed test:

    1. Start the server on the machine you want to test by running the following command:
iperf3 -s
    1. On the client machine, initiate the test by connecting to the server’s IP address using the following command:
iperf3 -c <server_ip_address>

Command Output Example:

Connecting to host <server_ip_address>, port 5201
[  5] local <client_ip_address> port 59000 connected to <server_ip_address> port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  5]   0.00-1.00   sec   112 MBytes   941 Mbits/sec    0   1.80 MBytes
[  5]   1.00-2.00   sec   112 MBytes   941 Mbits/sec    0   1.80 MBytes
[  5]   2.00-3.00   sec   112 MBytes   941 Mbits/sec    0   1.80 MBytes

Analyzing the Test Results

The command output provides valuable information about the network performance. Here are the key metrics to consider:

  1. Bandwidth: Indicates the amount of data transferred over the network per unit of time, measured in bits per second (bps) or its derivatives, such as kilobits per second (Kbps) or megabits per second (Mbps).
  2. [ads]

  3. Retr: Represents the number of packets that were retransmitted during the test. A high retransmission rate may indicate network congestion or issues.
  4. Cwnd: Refers to the congestion window size, which represents the number of packets allowed to be in transit at a given time. It can give insights into network congestion and capacity.

Conclusion

iPerf3 is a versatile tool for testing network speed and throughput in Linux. By utilizing its features, adjusting parameters, and analyzing the command output, you can gain valuable insights into your network’s performance and make informed decisions for optimization.

Leave a Comment