Overview
iPerf3 is used as a primary tool to troubleshoot internet connection speed issues. An alternative way to measure the connection speed is to download the SpeedTest app, select the nearest server, and run the SpeedTest check.
Information
- Install iPerf on the client
- Install iPerf on the Kerio Control server
- Testing download and upload via iPerf
Installing iPerf3 Client on Linux
- Open the terminal and execute the following command:
sudo apt-get install iperf3
- Enter
Y
to confirm the installation.
Installing iPerf3 Client on Windows
- Download the package from the iPerf website.
- Extract the file to a folder and go to that folder using Command Prompt.
- Run the iperf3.exe file from this folder.
Installing iPerf3 Client on Mac
- Download the Mac package from the iPerf website.
- Open the Terminal app, navigate to the downloaded location (i.e. Downloads) and make the file executable:
chmod +x iperf3.sh
- For the test purposes, run the server listening command:
./iperf3 -s
The command will generate cannot verify the developer warning.
- Open System Preferences -> Security & Privacy -> Allow Anyway/Open Anyway.
- Execute the script again and click Open:
- The command line will show Server listening on 5201. Press Ctrl + C to interrupt the operation.
For advanced troubleshooting scenarios, please refer to the 3rd-party guide about installing iPerf3 on MacOS.
Installing iPerf3 Server on Kerio Control
- Enable SSH and log in to the Kerio Control console.
- Make the system readable and writeable:
mount -o rw,remount /
- Kerio Control does not have a package manager, so the Linux installation explained above will not work. Download the following files:
- Upload the files to the Kerio Control server. The libiperf3.so.0 file needs to be uploaded to the
/usr/lib/x86_64-linux-gnu/
folder.scp iperf3 root@[IP_address_of_Control]:/root
scp libiperf.so.0 root@[IP_address_of_Control]:/usr/lib/x86_64-linux-gnu
- Make the iperf3 file executable:
chmod +x iperf3
Testing Download and Upload Speed via iPerf3
When you are executing an iPerf3 test, you should run it several times:
- When there is saturation, the results fluctuate, which applies both to iPerf3 and Speedtest. Hence, it is recommended to run the test 5-10 times, documenting the results of each test. The maximum and minimum values will matter. A single test does not provide a valid result.
- All tests should be done both for upload and download. The results will be different.
- All tests should be done both when IPS/AV is on and off.
Important things to keep in mind:
- Running the iPerf tests against internal IP's will only gauge the peer-to-peer speed. For example, running iPerf commands from a LAN computer against the internal IP of Kerio Control will only test the speed between these 2, and will NOT gauge internet speed
- It is important to run the iPerf tests both internally (to see if there are internal network bottlenecks) and externally (to test the internet speed)
- Testing the internet speed requires a traffic rule be configured in Kerio Control, to allow the iPerf traffic to flow, configured as per the below. External testing should be done against the public IP of Kerio Control.
Source: Any
Destination: Firewall
Service: TCP port 5021
Action: Allow
The testing process is the same for both internal and external connections, with the sole difference that internal testing will be done against Kerio Control's internal IP address, and external testing will be done against the Kerio Control public IP address:
- Start the iPerf server (on the Kerio Control side; all other steps need to be performed on client-side):
./iperf3 -s
- Run upload and download tests from the client.
- To make an upload test:
iperf3 -c <ip address of the Control server>
- To make a download test. By default, iPerf3 performs an upload test. You have to use the
-R
parameter to perform a download test.iperf3 -c <ip address of Control server> -R
Note: By default, iPerf3 generates traffic for 10 seconds. For regular checks, it is enough. But if you have to collect data from Kerio Control you may have to run the test for longer durations. In order to do that you should use the-t
parameter. For a 1000 seconds download test use the following command:iperf3 -c <ipaddress of Control server> -R -t 1000
- To make an upload test:
Related Articles
Capturing Traffic on Server-Side of Kerio Control via TCPdump