Why Benchmark Your LAN? #
Network performance matters for:
- NAS backups — slow file transfers = waste of time
- Homelab hypervisors — VM/container live migration
- Media streaming — 4K playback without buffering
- Troubleshooting — isolate network issues from disk/CPU limits
iPerf3 = the industry standard tool to measure real LAN throughput between two machines. Unlike speedtest.net (which tests your internet), iPerf3 tests your local network.
| Network Type | Expected Throughput |
|---|---|
| Gigabit Ethernet | ~940 Mbps (94 MB/s) |
| 2.5 Gigabit Ethernet | ~2.35 Gbps (235 MB/s) |
| 10 Gigabit Ethernet | ~9.4 Gbps (1.1 GB/s) |
| WiFi 6 (AX) | 600-900 Mbps |
| WiFi 5 (AC) | 300-600 Mbps |
What You Need #
- Two computers on the same LAN (server + client)
- iPerf3 installed on both machines (open source, free)
- Wired connection recommended for accurate testing
Step 1: Install iPerf3 #
For Windows: #
- Download iPerf3 from the official website: https://iperf.fr/iperf-download.php
- Choose the Windows version (zip file)
- Extract the zip file to your preferred folder (e.g.
C:\iperf3)
For Linux (Debian/Ubuntu): #
sudo apt-get update
sudo apt-get install iperf3For macOS (using Homebrew): #
brew install iperf3Step 2: Set Up the iPerf3 Server #
- Open a terminal or command prompt on the computer acting as the server.
- Run the following command:
Windows:
cd C:\iperf3
iperf3.exe -sLinux/macOS:
iperf3 -sThe server will now listen for incoming connections on the default port 5201.
Step 3: Run the iPerf3 Client #
On the second computer (client), run:
Basic Command:
iperf3 -c <SERVER_IP>Replace <SERVER_IP> with the server’s IP address.
Example:
iperf3 -c 192.168.1.100Step 4: Advanced Testing Options #
1. Change test duration (default is 10 seconds) #
iperf3 -c <SERVER_IP> -t 30 # 30 seconds2. Reverse mode (server sends to client) #
iperf3 -c <SERVER_IP> -R3. Use multiple streams (parallel testing) #
iperf3 -c <SERVER_IP> -P 4 # 4 parallel connections4. Change buffer size #
iperf3 -c <SERVER_IP> -l 8K # 8KB buffer5. Use UDP instead of TCP (default is TCP) #
iperf3 -c <SERVER_IP> -u -b 100M # UDP with 100Mbps targetStep 5: Interpreting the Results #
After the test finishes, you will see output like this:
[ ID] Interval Transfer Bitrate
[ 4] 0.00-10.00 sec 1.10 GBytes 944 Mbits/sec sender
[ 4] 0.00-10.00 sec 1.10 GBytes 944 Mbits/sec receiver- Transfer: Total amount of data transferred during the test
- Bitrate: Transfer speed in megabits per second (Mbps)
Tips and Troubleshooting #
-
Firewall: Make sure port
5201is open on the server firewall. -
Inconsistent results:
- Close other applications using the network.
- Run the test multiple times.
-
Error “connection refused”:
- Ensure the iPerf3 server is running.
- Double-check the server IP address.
-
Lower-than-expected speeds:
- Check your network cables (use CAT5e or better).
- Confirm that all devices support the expected LAN speeds (e.g. 1Gbps).
Example Automation Script (Linux/macOS) #
Create a file called network_test.sh with the following content:
#!/bin/bash
SERVER_IP="192.168.1.100"
DURATION=20
PARALLEL=4
echo "Running TCP test..."
iperf3 -c $SERVER_IP -t $DURATION -P $PARALLEL
echo -e "\nRunning UDP test..."
iperf3 -c $SERVER_IP -t $DURATION -u -b 100MRun the script:
chmod +x network_test.sh
./network_test.shConclusion #
With iPerf3, you can accurately measure your LAN performance. This tool is useful for:
- Verifying network speed
- Troubleshooting network issues
- Testing before and after network configuration changes
For best results, run the test multiple times under different network conditions (peak vs. off-peak hours).
–