Shared server guidance · Question & answer

How do I test basic reachability and packet loss from a Linux server?

A short ping test checks ICMP echo replies and provides a small sample of round-trip timing. It does not test an SSH, web or database login, and a host can serve applications while refusing ping. Use it as one observation alongside the relevant service check.

BeginnerLinux servers with iputils ping
Go to the answer

Before you start

  • An authorised destination that is expected to answer ICMP.
  • A real destination address in place of the documentation example.

Instructions

1. Run a limited numeric-address test

A fixed count avoids an unattended test running indefinitely. Testing a numeric address first separates basic reachability from hostname resolution.

Remote Linux shell
ping -n -c 5 -W 2 198.51.100.20

Sends five echo requests, uses numerical output and limits the response wait for each request.

2. Compare the hostname path

Use the name used by the application. Read the resolved address near the start of the output; it may differ from the endpoint you intended to test.

Remote Linux shell
ping -n -c 5 -W 2 app.example.com

Repeats the bounded check after hostname resolution.

3. Interpret the sample

Record sent and received counts, loss percentage and average timing with the test time. Five probes can identify an obvious failure but cannot establish a long-term availability or latency guarantee. Repeat at a relevant incident time if the symptom is intermittent.

Check the result

  • The intended destination replies within the expected network baseline, and the actual application check also succeeds.

Troubleshooting

Every ping times out but HTTPS works
ICMP may be filtered or rate-limited. Do not weaken firewall policy solely to make ping succeed.
The hostname fails but its IP replies
Investigate DNS separately; routing changes will not fix a name-resolution failure.

Official references

Use the documentation for your installed version when a flag, service name or platform feature differs.