HomeGuidesConnectivityHow to Use Ping to Test Connectivity?

How to Use Ping to Test Connectivity?

Learn how to use the ping command to test network connectivity, diagnose issues, and interpret results.

Intermediate15 min

Need Help?

Try our AI Troubleshooting Assistant for personalized help.

Ping test diagram showing how devices send ICMP echo requests and receive replies.
The ping command helps test connectivity between devices on a network.

How to Use Ping to Test Connectivity?

The ping command is one of the most common network troubleshooting tools. It sends small packets of data to a destination and measures how long it takes to receive a response.

Example

Use this section as your baseline before working through the symptoms, commands, and fixes below.

Running a Ping Test

Open Terminal (macOS/Linux) or Command Prompt (Windows) and enter:

ping <IP address or domain>

Example:

ping 8.8.8.8

In this example, 8.8.8.8 is Google's public DNS server.

Alt text for the image

Understanding the Results

When you run a ping test, you'll see several lines of information.

Destination Host:

PING 8.8.8.8 (8.8.8.8): 56 data bytes

This confirms the destination address that is being tested and the size of the packet being sent.

Response Information

64 bytes from 8.8.8.8: icmp_seq=0 ttl=112 time=24.376 ms

Each response contains several important values:

64 bytes: Amount of data received back from the destination.

icmp_seq: Packet sequence number used to track requests.

ttl (Time To Live): Limits how many network hops a packet can travel before being discarded.

time: The round-trip latency between your device and the destination.

Ping Statistics:

8 packets transmitted, 8 packets received, 0.0% packet loss

This section summarizes the test results.

Packets transmitted – Total requests sent.

Packets received – Total responses received.

Packet loss – Percentage of packets that never returned.

A healthy connection typically shows:

0% packet loss

Consistent response times

No timeout errors

Latency Summary

round-trip min/avg/max/stddev =

21.176/24.258/28.197/1.845 ms

These values represent:

Min – Fastest response time

Avg – Average response time

Max – Slowest response time

Stddev – Variation between responses

In this example, the average latency is approximately 24 ms, which indicates a fast and stable connection.

Common Issues:

Request Timed Out

A timeout usually indicates:

The destination is unreachable

A firewall is blocking ICMP traffic

Network connectivity problems

High Latency

High latency may be caused by:

Network congestion

Weak Wi-Fi signal

Long-distance connections

ISP issues

General guidelines:

0–50 ms: Excellent

50–100 ms: Good

100–150 ms: Noticeable delay

150+ ms: High latency, especially for gaming

Packet Loss

Packet loss occurs when data packets fail to reach their destination or return to the sender.

Common causes include:

Wi-Fi interference

Faulty network equipment

ISP outages

Congested networks

Key Takeaway:

Ping is a simple but powerful tool for testing connectivity, measuring latency, and detecting packet loss. It is often the first command used when troubleshooting network performance or internet connection issues.