How to Diagnose Network Latency and Packet Loss with Ping and Traceroute
A step-by-step diagnostic guide to routing: track packet transmission, measure round-trip times, and isolate where latency spikes occur.
Tags
When a website is loading slowly or connection drops happen, it's easy to blame the server's CPU or memory. Often, the real culprit lies in the middle: the transit path between the client and the host. Network path diagnostics rely on two essential diagnostic operations: Ping and Traceroute. Using these tools lets you identify if latency is occurring inside your host network, at an upstream ISP transit provider, or at the destination server itself. This guide will walk you through reading traceroute paths and solving routing errors.
Quick Answer
Use Ping to check if a host is reachable and measure overall round-trip time (RTT). If you observe high RTT or packet loss, run a Traceroute to inspect each intermediate hop (router) along the path. Look for the first router hop where latency increases sharply or where packet drops begin, as this reveals the bottleneck.
How Ping Works (And When to Use It)
Ping uses ICMP (Internet Control Message Protocol) Echo Request packets. When you ping a server, you send an ICMP request; if reachable, the server returns an ICMP Echo Reply. The diagnostic calculates the round-trip time (RTT) in milliseconds. Running a Ping Tool test checks basic server uptime, monitors network jitter, and gauges connection latency. However, some secure hosts block ICMP traffic, meaning a ping request can time out even if the website is working normally in the browser.
Decoding Traceroute Hops
Traceroute builds a full map of the routing path using a header value called TTL (Time to Live). When a packet leaves your device, each router it crosses decrements the TTL by 1. If TTL hits 0, the router discards the packet and returns an ICMP "Time Exceeded" notification. By systematically sending packets with incrementing TTLs (1, 2, 3, etc.), Traceroute extracts the IP and host name of every routing hop.
Traceroute query to my-toolskit.com:
1 192.168.1.1 (Local Router) - 1.2 ms
2 10.0.0.1 (ISP Gateway) - 4.5 ms
3 68.86.1.134 (Regional Transit Hop) - 12.1 ms
4 * * * (Request Timed Out - Firewall blocking ICMP)
5 206.19.2.14 (CDN Edge Node) - 14.8 ms
Key Troubleshooting Indicators
1. Consistent Packet Loss: If you see a 5% to 20% loss across all ping iterations, it indicates congested interfaces or dropping lines. If the packet loss begins at hop 2 or 3, contact your local internet provider. If it begins right at the target hop, the server's network card or software firewall is overloaded.
2. Latency Spikes: If hop times look like 10ms, 12ms, 14ms, and then suddenly jump to 180ms at hop 6, this indicates a bottleneck or routing loop at hop 6's interface. Often, this is a transit link issue between different ISPs, which CDNs (like Cloudflare) bypass using private backbones.
3. Jitter (Variable RTT): Jitter is the variance in latency over time. For example, if your pings fluctuate between 15ms and 300ms, it makes real-time tools (like APIs, WebSockets, or VOIP) unstable. This usually stems from wireless interference, router bufferbloat, or network congestion.
Resolving Routing Issues
If your network diagnostics reveal high latency at your server edge, verify if the port listening on the host is open and not firewalled using our Port Scanner Guide. If you recently changed your server's IP address, check whether the update is visible globally using our DNS Propagation Guide, as outdated DNS caching can direct users to the old routing hop.
FAQ
Q: Why does traceroute show asterisks (* * *) for some hops?
A: This means that particular router does not respond to ICMP packets or is configured to ignore low-TTL packets. If subsequent hops respond successfully, your connection is passing through fine.
Q: Does a high ping RTT mean my site is slow?
A: Yes, a higher RTT delays the initial TCP handshake. Visitors physically far away from your server experience higher RTT. You can resolve this by serving assets from servers closer to them using a Content Delivery Network (CDN).
Q: What is the normal ping latency for server networks?
A: Under 30ms is considered excellent (cable/fiber), 30ms–80ms is normal for regional hops, and 80ms–250ms is common for transoceanic transit routing.