Check the Network of Your Linux Server: ping, mtr and iperf3

When connections to your server are slow or break off, these tests show where the problem is: on the server, in the network between, or at your end. The results are also what our support needs when you report a network problem. The commands were tested on Ubuntu 26.04 LTS; run them as root.


Is the Destination Reachable?

ping -c 4 1.1.1.1

The last lines show the lost packets and the response times:

4 packets transmitted, 4 received, 0% packet loss, time 3003ms
rtt min/avg/max/mdev = 7.944/8.016/8.200/0.106 ms

Use the address that causes problems instead of 1.1.1.1, for example the IP address of your home connection. Some routers and home connections do not answer ping at all; then the loss is 100 % even though the connection works.

Where Is the Problem? mtr

mtr combines ping and traceroute: it tests every router on the way and shows where packets are lost or slowed down. It is already installed on Ubuntu (apt install mtr-tiny if not). Run a report with 100 packets:

mtr -n -r -c 100 1.1.1.1

-n shows IP addresses instead of router names, so mtr does not wait for name lookups, -r prints a report at the end, and -c 100 sends 100 packets. It takes about 100 seconds. The answer looks like this:

Start: 2026-11-27T08:18:12+0000
HOST: ds12345                     Loss%   Snt   Last   Avg  Best  Wrst StDev
  1.|-- 203.0.113.124              0.0%   100    0.3   0.3   0.2   0.9   0.1
  2.|-- 81.17.34.82                0.0%   100   33.7   1.0   0.3  33.7   3.4
  3.|-- 31.31.38.116               0.0%   100    0.3   0.3   0.3   0.4   0.0
  4.|-- 31.31.34.23                0.0%   100    7.2   7.2   7.1   7.2   0.0
  5.|-- 141.101.71.186             0.0%   100    5.9   5.8   5.8   6.0   0.0
  6.|-- 141.101.71.211             0.0%   100    6.7  10.4   6.6  48.7   7.1
  7.|-- 1.1.1.1                    0.0%   100    8.0   8.0   8.0   8.3   0.1

How to read it:

  • Loss% that starts at one line and stays until the last line means a real problem from that router on.
  • Loss on a single router in the middle, with 0 % on the last line, is normal: many routers answer test packets slowly or not at all, while they forward your traffic without problems.
  • Avg is the average time in milliseconds. A jump that stays on all following lines shows where the delay starts. A single high Wrst value, as on line 6 above, is not a problem.

Test both directions: from the server to your computer, and from your computer to the server. On Windows, use WinMTR: Making an MTR. What support needs is listed at the end of this guide.

How Fast Is the Connection? iperf3

iperf3 measures the speed between two computers. Our network provider runs public test servers, so you do not need a second server of your own:

apt install iperf3
iperf3 -c speedtest.ams1.nl.leaseweb.net -p 5201 -t 10
iperf3 -c speedtest.ams1.nl.leaseweb.net -p 5201 -t 10 -R

The first command measures sending from your server, the second (-R) receiving. If the port is busy (the server is busy running a test), try one of the ports 5202 to 5210. The last lines give the result:

[  5]   0.00-8.00   sec   900 MBytes   943 Mbits/sec   10            sender
[  5]   0.00-8.00   sec   898 MBytes   941 Mbits/sec                  receiver

The server in this example has a 1 Gbps port; about 940 Mbits/sec is the full speed of such a port. The uplink speed of your server is shown on the Information tab of the Client Area.

A simple download test works without installing anything:

curl -o /dev/null -w "%{speed_download} bytes/s\n" http://speedtest.ams1.nl.leaseweb.net/1000mb.bin

The answer is in bytes per second; 115067618 bytes/s is about 115 MB/s, or 920 Mbit/s.

ℹ Slow only to your home?

If the tests above are fast but transfers to your computer are slow, the limit is usually your home connection, your Wi-Fi or the route between your provider and ours. An mtr from your computer to the server shows where.

Reporting a Network Problem to Support

To check a network problem, support needs:

  1. The IP addresses the problem concerns: the IP address of your server (on the Information tab of the Client Area) and the IP address of the other side, for example your home connection or the server you transfer files with.
  2. An mtr in both directions, each with 100 packets and without name resolution:
    • from your server to the other side: mtr -n -r -c 100 followed by the IP address of the other side;
    • from the other side to your server: on Linux and macOS the same command followed by the IP address of your server, on Windows WinMTR: Making an MTR.
  3. When the problem happens and what it looks like, for example: downloads from the server to my home are slow every evening from 20:00 CET.

Paste both complete mtr reports into the ticket as text.

💡 The IP address of your home connection

Connect to your server over SSH from the computer that has the problem and run echo $SSH_CLIENT. The first value is the public IP address of your connection; the two numbers after it are ports.


Related Guides

View all Linux guides

Was this answer helpful? 0 Users Found This Useful (0 Votes)