Ping Command: Network Diagnostics Guide
Ping is the most basic and essential network diagnostic tool. It sends ICMP Echo Request packets to a target and measures how long it takes for the Echo Reply to return. If you're having network problems, ping should be your first troubleshooting step — it quickly tells you if a host is reachable and how fast the connection is.
How Ping Works
When you ping a host, your device sends a small packet (32-64 bytes) to the target and waits for a response. The response includes the round-trip time (RTT) in milliseconds. If the host is reachable, you get a reply; if not, you get a timeout or an error message. Ping uses ICMP (Internet Control Message Protocol), not TCP or UDP.
Basic Ping Commands
# Ping a domain ping miip.link # Ping an IP address ping 8.8.8.8 # Ping with a count (Linux/macOS) ping -c 5 miip.link # Ping with a count (Windows) ping -n 5 miip.link # Continuous ping (Linux/macOS - press Ctrl+C to stop) ping miip.link
Interpreting Ping Results
PING miip.link (104.21.50.120): 56 data bytes 64 bytes from 104.21.50.120: icmp_seq=0 ttl=56 time=12.3 ms 64 bytes from 104.21.50.120: icmp_seq=1 ttl=56 time=11.8 ms 64 bytes from 104.21.50.120: icmp_seq=2 ttl=56 time=13.1 ms --- miip.link ping statistics --- 3 packets transmitted, 3 received, 0% packet loss round-trip min/avg/max/stddev = 11.8/12.4/13.1/0.6 ms
Key metrics:
- icmp_seq: Sequence number — should increment by 1
- ttl: Time to live — decreases by 1 at each hop
- time: Round-trip time in milliseconds — lower is better li>Packet loss: Should be 0% — any loss indicates network problems
What Ping Results Mean
| Result | Meaning | Action |
|---|---|---|
| Reply with low time (<50ms) | Healthy connection | No action needed |
| Reply with high time (>200ms) | Network congestion or distance | Check for bandwidth issues |
| Request timed out | Host unreachable or blocking ICMP | Check if host is online, firewall may block ping |
| Destination host unreachable | No route to the host | Check your network connection and gateway |
| Packet loss > 0% | Network instability | Check cables, WiFi signal, or ISP issues |
Advanced Ping Options
# Change packet size ping -s 1000 miip.link # 1000 byte packets (Linux/macOS) ping -l 1000 miip.link # 1000 byte packets (Windows) # Set TTL ping -t 64 miip.link # TTL of 64 (Linux/macOS) ping -i 64 miip.link # TTL of 64 (Windows) # Flood ping (careful!) ping -f miip.link # Send packets as fast as possible # Ping with timeout ping -W 5 miip.link # 5 second timeout per packet
FAQ
Why do some hosts not respond to ping?
Many servers and firewalls block ICMP (ping) requests for security reasons. This doesn't mean the server is down — it just means ping is disabled. Use traceroute or port scanning as alternatives.
What is a good ping time?
Under 20ms is excellent (local server), under 50ms is good, under 100ms is acceptable for most uses, and over 200ms may cause noticeable lag in real-time applications like gaming or video calls.
Test your connection and check your IP at miip.link.