knowledge/technology/applications/network/iperf.md
2024-09-04 16:22:57 +02:00

1.9 KiB

obj
application

iperf

iPerf is an open-source tool that is used for testing the performance of a network. It is widely used by network administrators, network engineers, and other IT professionals to measure the bandwidth and speed of a network.

Usage

Once iPerf is installed, you can use it to test the performance of your network. The basic usage of iPerf involves running a server on one machine and a client on another machine. The client sends data to the server, and iPerf measures the bandwidth and speed of the network.

To run an iPerf server, use the following command:

iperf -s

This will start an iPerf server on the default port 5001.

To run an iPerf client, use the following command:

iperf -c <server_ip_address>

Replace <server_ip_address> with the IP address of the machine running the iPerf server. This will start an iPerf client that sends data to the server and measures the bandwidth and speed of the network.

By default, iPerf uses TCP as the transport protocol. If you want to use UDP instead, you can add the -u option to the iPerf command:

iperf -u -c <server_ip_address>

This will start an iPerf client that sends data using UDP.

Advanced options

iPerf provides many advanced options that you can use to customize your network performance testing. Some of the common options are:

  • -t: Specifies the duration of the test (in seconds). By default, iPerf runs for 10 seconds.
  • -i: Specifies the interval between periodic bandwidth reports. By default, iPerf reports the bandwidth every second.
  • -p: Specifies the port number to use for the iPerf server. By default, iPerf uses port 5001.
  • -w: Specifies the TCP window size. This option is only applicable when using TCP as the transport protocol.
  • -b: Specifies the bandwidth to use for the test. This option is only applicable when using UDP as the transport protocol.