knowledge/technology/applications/network/iperf.md

38 lines
1.9 KiB
Markdown
Raw Normal View History

2023-12-04 10:02:23 +00:00
---
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:
```shell
iperf -s
```
This will start an iPerf server on the default port 5001.
To run an iPerf client, use the following command:
```shell
iperf -c <server_ip_address>
```
2024-06-02 18:43:53 +00:00
Replace `<server_ip_address>` with the [IP](../../internet/Internet%20Protocol.md) 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.
2023-12-04 10:02:23 +00:00
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:
```shell
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.
2024-09-04 14:22:57 +00:00
- `-b`: Specifies the bandwidth to use for the test. This option is only applicable when using UDP as the transport protocol.