TEZZ CONNECTBlog

Blog / Internet Technology & Updates / ICMP, Ping and Traceroute

NETWORKING FUNDAMENTALS · PRACTICAL GUIDE

ICMP, Ping and Traceroute Explained: How Network Diagnostics Work

Learn how network control messages, echo probes and hop-by-hop tracing help explain reachability, delay and routing behaviour—and where these tools can mislead.

By Suraj Vishwakarma · Published by TEZZ CONNECT · Published 28 November 2026 · Updated 28 November 2026

Network equipment and Ethernet connections

When a website will not load, a game becomes unstable or a video call freezes, the first question is often whether the internet connection is working. A speed test can show throughput and latency under its test conditions, but it cannot explain every failure. Network engineers also use ICMP, ping and traceroute to investigate reachability, packet handling and the path between devices.

These three terms are related but not interchangeable. ICMP is a network control-message protocol. Ping is a diagnostic program that commonly uses ICMP Echo messages. Traceroute is a path-discovery technique that uses packets with increasing hop limits and observes the responses returned by routers. Understanding the difference helps prevent common troubleshooting mistakes. When diagnosing a routed network, it can also help to understand how routers exchange routes through protocols such as OSPF and how gateways translate addresses using NAT and PAT.

1. Why network diagnostics need more than a speed test

An internet connection can show a high download rate and still behave badly. A website may take several seconds before it begins loading, a remote desktop session may freeze, a game may show unstable response times, or a video call may briefly lose audio. A speed test measures selected aspects of throughput and responsiveness under its own test conditions. It does not, by itself, explain which network hop is slow, whether a destination is reachable, or why a packet was discarded.

Network diagnostics use several complementary observations. Ping sends probes and measures replies. Traceroute varies a packet's hop limit to reveal responding routers along a path. ICMP carries control and error information that helps hosts and routers communicate about packet handling. Together, these tools can help distinguish local connectivity problems, routing changes, filtering, congestion and destination-side behaviour.

These tools are useful, but they are not perfect maps of the internet. A router may forward traffic while declining to answer diagnostic probes. A response may take a different return route. Firewalls may filter probes, and devices may rate-limit control messages. A missing traceroute line is therefore evidence that a probe did not produce a visible response—not proof that the router is broken or that ordinary traffic cannot pass.

This guide explains the protocols behind common diagnostics, how to run and interpret tests, and how to avoid conclusions that the measurements cannot support.

2. What is ICMP?

The Internet Control Message Protocol, or ICMP, is a network-layer companion to IP. It carries control information and reports certain conditions encountered while processing IP packets. ICMP does not turn IP into a reliable delivery service. Its messages can themselves be lost, filtered or rate-limited, and applications still need transport protocols such as TCP or application-level mechanisms when they require reliable delivery.

ICMP is commonly described as an error-reporting protocol, but it also includes diagnostic messages. An ICMP message is carried inside an IP packet. For IPv4, the protocol number in the IP header identifies ICMP. The message begins with a Type and Code that identify the message category and a more specific reason, followed by a checksum and message-specific fields.

Examples include Echo Request and Echo Reply, which are used by ping; Destination Unreachable, which can report that a network, host, protocol or port cannot be reached; and Time Exceeded, which is central to the classic traceroute technique. ICMP may also report that a packet is too large for a path when fragmentation is not permitted, a signal that can be important for Path MTU Discovery.

ICMP messages normally include enough of the invoking packet to help the sender associate the report with the traffic that caused it. This is important because a host may have many packets in flight at once. The operating system can inspect the quoted packet information and pass the error to the relevant socket or process.

ICMP is not a user application protocol like HTTP, and it does not use TCP or UDP port numbers. That distinction matters when writing firewall rules or investigating traffic captures: ICMP is identified by message types and codes, not by a TCP or UDP destination port.

3. ICMPv4 and ICMPv6: related roles, different protocol details

ICMPv4 supports IPv4, while ICMPv6 is an integral companion protocol for IPv6. They serve similar broad purposes, but their message formats, type assignments and operational responsibilities differ. Do not assume that an ICMPv4 type number has the same meaning in ICMPv6.

ICMPv6 supports functions that are especially important to IPv6 operation, including Neighbor Discovery and Path MTU Discovery. IPv6 routers do not fragment packets in transit. When a packet is too large for a link along the path, an ICMPv6 Packet Too Big message can tell the sender to reduce the packet size. If that message is blocked, connections may partially work—small requests succeed while larger transfers stall. This is one reason that indiscriminately blocking all ICMPv6 can create hard-to-diagnose failures.

ICMPv6 also includes Echo Request and Echo Reply for diagnostics, Destination Unreachable, Time Exceeded and Parameter Problem messages. Its Time Exceeded message reports that a packet's Hop Limit reached zero in transit. IPv4 uses the Time To Live field for the corresponding forwarding-limit behaviour.

A secure network should apply deliberate policy to ICMP and ICMPv6 rather than treating every message as either harmless or dangerous. Administrators can filter unwanted traffic and rate-limit selected responses while preserving messages required for correct network operation. The appropriate policy depends on the network role, threat model and required services.

4. How ping works

Ping is a diagnostic utility that typically sends ICMP Echo Request messages to a target and waits for corresponding Echo Reply messages. It records whether replies arrive and measures the elapsed time between sending a request and receiving its reply. That elapsed time is usually described as round-trip time, or RTT.

A simple command-line example is ping example.com. The operating system resolves the hostname, selects an address and sends probes. Output commonly includes the responding address, sequence number, packet size, time-to-live information and response time. After several probes, the utility may show packets transmitted, packets received, loss percentage and minimum, average and maximum RTT.

A successful reply demonstrates that an Echo Request reached a system willing and able to answer and that the reply returned to the sender. It does not prove that a web server, database, VPN service or application port is working. A host can answer ping while its HTTPS service is down. Conversely, a host can block Echo Requests while serving web traffic normally.

Ping RTT includes the outbound journey, processing and the return journey. It is not a one-way delay measurement. The return path may differ from the outbound path, and the endpoint may delay responding to ICMP. As a result, ping is best treated as a reachability and response-time signal, not a precise measurement of application latency.

A ping result of 25 milliseconds does not mean every application transaction takes exactly 25 milliseconds. DNS lookup, TCP or QUIC setup, TLS negotiation, server processing, congestion, retransmissions and content delivery can all add time. A browser's page load experience includes far more than a single ICMP exchange.

5. Understanding ping output: RTT, loss and TTL

RTT is the time between sending a probe and receiving its reply. Lower RTT generally means a shorter or faster round trip for that probe, but the useful comparison is between repeated measurements under similar conditions. A single value can be affected by scheduling, Wi-Fi contention, queueing, route changes or temporary load.

Packet loss is the proportion of probes that did not produce a matching reply before the utility's timeout. Loss can occur on the forward path, at the target, or on the return path. Some routers also intentionally deprioritise or rate-limit ICMP responses. Therefore, ping loss does not always equal application packet loss. Compare results to multiple targets and, where possible, test the actual application or service.

The TTL value displayed by ping is often the TTL remaining in the reply packet when it reaches the sender, not a direct count of hops. Different operating systems and network stacks start with different initial TTL values. The displayed number can offer a rough clue, but it should not be used to identify a device or calculate a path without knowing the initial value and packet behaviour.

Jitter is variation in delay across a series of packets. Ping tools may show individual RTT values from which variation can be observed, although different tools calculate jitter differently. For real-time applications, consistent delay can matter as much as the average. A connection with a 30 ms average and occasional 400 ms spikes may feel worse than a stable 50 ms connection.

Interpret the complete pattern: stable RTT, rising RTT under load, intermittent timeouts, loss across several targets, or loss only at one destination. Each pattern suggests different next tests; none should be treated as a diagnosis on its own.

6. What is traceroute?

Traceroute is a diagnostic technique for discovering which routers respond along the path toward a destination. It works by sending probe packets with progressively larger hop limits. The first probe is allowed to travel one hop, the next two hops, then three, and so on. When a router must discard a probe because its hop limit has expired, it may send an ICMP Time Exceeded message back to the source. The source records the address of the responding router and the time taken to receive the response.

The process continues until a probe reaches the destination or a configured limit is reached. Depending on the implementation, the final response may be an ICMP Echo Reply, a UDP Port Unreachable message, a TCP response, or another indication that the destination was reached. Different traceroute programs use different probe types and stopping conditions.

The technique takes advantage of a normal IP forwarding safeguard. IPv4 routers decrement TTL as they forward packets; when it reaches zero, the packet is discarded. IPv6 routers decrement Hop Limit. This prevents packets from circulating forever in a routing loop. Traceroute deliberately uses small values to cause a controlled expiry at successive points.

A traceroute output might show hop 1 as the home router, hop 2 as an ISP aggregation device, later hops inside a provider or transit network, and a final destination. The actual names and visibility vary. Routers may use private addresses, change source address selection, hide hostnames or suppress diagnostic replies. The output is a sequence of observed responses, not a complete topology diagram.

7. TTL and IPv6 Hop Limit: the mechanism behind the hops

The IPv4 Time To Live field is an 8-bit field in the IP header. Although its original description referred to time, operational forwarding uses it as a hop-count limit: each router that forwards the packet reduces the value by at least one. If the value reaches zero, the router discards the packet and may send an ICMP Time Exceeded message to the source.

IPv6 uses an 8-bit Hop Limit field with explicitly hop-oriented semantics. Each forwarding node decrements it. If it reaches zero, the node discards the packet and normally sends an ICMPv6 Time Exceeded message, subject to protocol rules and applicable rate limits.

Traceroute does not ask routers to reveal their routing tables. It sends ordinary IP packets with deliberately constrained TTL or Hop Limit values. Each responding router reveals itself indirectly by sending an error message. If a router forwards the probe but does not send a response, the source sees a timeout for that probe even though the packet may have continued under a different probe or may be handled normally when the limit is higher.

This distinction explains why asterisks can appear in the middle of a trace. A router may forward transit traffic but filter, rate-limit or deprioritise the ICMP message needed to make that hop visible. The next hop may still respond, and the destination may still be reachable.

8. UDP, ICMP and TCP traceroute methods

Traceroute is a family of techniques rather than one universal packet format. Classic Unix-style traceroute commonly sends UDP probes to high, usually unused destination ports. Each intermediate router that expires the TTL can return ICMP Time Exceeded. When a probe reaches the destination host, the unused UDP port may cause an ICMP Destination Unreachable, Port Unreachable response, which the utility interprets as arrival.

Some implementations send ICMP Echo Request probes instead. Others use TCP SYN probes directed at a selected service port, such as TCP 443. TCP-based traceroute can be useful when firewalls treat ICMP or UDP differently from normal application traffic. It may reveal a path that resembles the route used by a TCP service, but the probe is still not identical to a complete application session.

The probe type matters because networks apply policy based on protocol, destination port, state and traffic class. A UDP trace may be filtered while a TCP trace to a permitted service port succeeds. ICMP probes may be rate-limited. A trace using TCP port 443 may reach a load balancer or security appliance that handles diagnostic SYN packets differently from real HTTPS sessions.

When comparing traces, record the method and destination port. A path difference between UDP and TCP traces does not automatically mean the routing system is inconsistent. Policy-based routing, ECMP, firewalls and per-flow hashing can legitimately produce different paths for different flows. Use a method that matches the service you are investigating, and state its limitations.

9. Reading traceroute output line by line

A typical traceroute displays a hop number followed by one or more responding addresses or hostnames and one or more RTT measurements. Many tools send several probes per hop, so a line may contain three separate times. Those values can differ because probes may take different paths, encounter different queueing, or receive replies from control planes with different processing load.

A hostname is often obtained through reverse DNS. It is a label supplied by DNS, not guaranteed proof of the router's physical location, owner or role. Some addresses have no reverse record, and some names are generic. Treat them as clues, not authoritative inventory.

Private IPv4 ranges may appear inside an ISP or enterprise network. Their presence is not a problem by itself. A trace may also show public addresses belonging to an access provider, transit carrier, cloud network or content delivery network. Address ownership lookups can provide context, but routing and ownership are not always one-to-one.

A sudden RTT increase at one hop is not necessarily the point where user traffic becomes slow. A router may answer diagnostic packets slowly because its control plane prioritises forwarding over generating ICMP replies. If later hops return to lower RTT values, the apparent spike may reflect response handling rather than forwarding delay. If the increased RTT persists through all later hops and is also visible in application measurements, it is stronger evidence of a path delay.

A line containing only asterisks means no probe response arrived within the timeout. It does not tell you whether the packet was dropped, the response was filtered, or the reply was delayed. If later hops respond, the trace has demonstrated that probes with a larger hop limit can progress beyond the silent point.

10. Why traceroute paths can change

Internet routing is dynamic. Providers select routes based on routing policy, reachability, commercial relationships, traffic engineering and network conditions. A traceroute taken in the morning may show a different path later because a route changed, a link failed, maintenance occurred or traffic moved to another path.

Equal-Cost Multipath routing can distribute traffic across multiple next hops. Some routers use a hash of flow fields to select a path. Because traceroute may vary destination ports or other probe fields, its probes can be distributed across different paths. Paris traceroute-style methods attempt to keep selected flow identifiers stable so that probes are more likely to follow the same path through per-flow load balancing. Even then, no method can guarantee a complete view of every internal path.

Asymmetric routing is also common. The forward probe may travel through one set of routers while the ICMP reply returns through another. Traceroute generally shows the responding source address of each reply, not the return path. RTT is therefore the round-trip time for the exchange, not a measurement of the one-way delay to that hop.

A route change is not automatically an outage. A longer path can still perform well if its links are uncongested; a shorter path can perform poorly if it is overloaded. Compare repeated measurements, service performance and routing context before deciding whether a path change is harmful.

11. Common ICMP messages and what they tell you

Destination Unreachable messages indicate that a packet could not be delivered for a reported reason. In IPv4, codes can distinguish network unreachable, host unreachable, protocol unreachable, port unreachable, fragmentation needed and other conditions. In IPv6, corresponding message types and codes are defined separately. The exact code is important: a port-unreachable response to a UDP traceroute probe may simply mean that the probe reached the destination, while a network-unreachable response indicates a different condition.

Time Exceeded is used when a packet's TTL or Hop Limit expires in transit, and can also report a fragment reassembly timeout in IPv4. Traceroute relies on the transit-expiry case. Parameter Problem messages report issues with an IP header or extension-header field that prevents processing.

Packet Too Big in ICMPv6 tells a sender that a packet exceeded the next-hop link's supported size. IPv4 has a related fragmentation-needed signal when fragmentation is disallowed. These messages are essential to Path MTU Discovery. Blocking them without a replacement mechanism can create a black-hole condition in which small packets work but larger packets fail.

Echo Request and Echo Reply are the messages used by conventional ping. They are useful diagnostics, but they are not required for every application service to operate. A firewall may block Echo while allowing DNS, HTTPS or VPN traffic. Diagnose the service directly if the question is whether that service works.

12. Practical commands on Windows, macOS and Linux

On Windows, open Command Prompt or PowerShell and run ping example.com. To request a specific number of probes, use ping -n 10 example.com. A basic route trace can be run with tracert example.com. Windows also provides pathping, which combines route discovery with repeated measurements to estimate loss at hops over time. Its results still need careful interpretation because routers may treat probes differently.

On macOS and many Linux distributions, run ping example.com and stop it with Ctrl+C. To send a finite set of probes on common Unix-like systems, use ping -c 10 example.com. A classic UDP traceroute is often available as traceroute example.com. On Linux, the command may need installation through the distribution's package manager, or you can use tracepath example.com where available.

For IPv6, use the platform's IPv6 option or a tool such as ping -6 and traceroute -6 where supported. Some systems use different command names, such as ping6 or traceroute6. Consult the local manual page because flags vary between operating systems and implementations.

For a TCP-oriented trace, use a supported tool and specify the target service port. Do not assume the same syntax exists everywhere. If a command reports that raw sockets or elevated privileges are required, follow the operating system's documented permissions rather than downloading an unknown utility.

Use a hostname when testing name resolution and a numeric IP address when isolating DNS from the path test. If the hostname test fails but the numeric address works, investigate DNS separately. If both fail, test the local gateway and another known destination before concluding that the ISP is at fault.

13. A systematic troubleshooting workflow

Start close to the device. Confirm that Wi-Fi or Ethernet is connected, the device has a valid IP configuration and the default gateway is present. If possible, repeat the test over Ethernet to remove Wi-Fi signal quality and radio interference from the first stage. A strong Wi-Fi indicator does not guarantee a clean radio channel or a healthy broadband connection.

Ping the local default gateway. A stable reply suggests that the local device can exchange ICMP with the router, but it does not prove that every wireless frame is healthy or that the router's internet connection works. If gateway ping is unstable, check signal strength, channel congestion, cabling, switch ports and router load.

Next, test a numeric public IP address and then a hostname. If the numeric target responds but the hostname does not resolve, investigate DNS. If neither responds, test another target and check whether ICMP is filtered. A failed ping alone cannot distinguish a routing failure from a policy that blocks Echo.

Run traceroute to the affected destination and, if possible, to a second destination. Repeat the trace at different times and compare the final destination, not just intermediate hops. Use TCP traceroute to the relevant service port if ordinary UDP or ICMP probes appear filtered. Then test the actual application: open the website, establish the VPN, or connect to the service port using an appropriate client.

Record timestamps, target names and addresses, test method, packet count, RTT range, loss, and whether the problem affects one or multiple destinations. This evidence is more useful to a provider or network administrator than a screenshot of one failed ping. Avoid publishing internal addresses or sensitive hostnames if the trace exposes private infrastructure.

14. Interpreting common patterns without jumping to conclusions

If the gateway is unreachable but other devices work, the issue may be local to the test device, its firewall or its wireless association. If every device has trouble reaching the gateway, inspect the access point, router, switch and local link.

If the gateway responds but several external numeric addresses fail, investigate the WAN link, provider access network, routing and any upstream filtering. If one destination fails while others work, the issue may be destination-specific, a route problem, a remote firewall or a service outage.

If traceroute shows asterisks at one hop and then later hops respond, that intermediate router is likely forwarding at least some probes while not returning visible diagnostic replies. Do not report that hop as a confirmed failure. If every hop after a point is silent, the trace alone cannot establish where the packet stopped; the destination may block probes, the path may filter them, or a routing issue may exist.

If RTT rises at a hop and remains elevated at all subsequent hops, repeat the measurement and compare application behaviour. Persistent increases can indicate additional path delay, but the reply path and control-plane processing still complicate interpretation. If only one hop shows a large value and later hops return to normal, the router may simply be slow to answer diagnostics.

If ping is clean but an application is slow, test DNS resolution, TCP connection setup, TLS negotiation, server response time, packet loss under load and local device performance. Network diagnostics are most useful when combined with measurements of the service the user actually needs.

15. Security, filtering and responsible use

ICMP is a normal part of IP networking, but diagnostic traffic can be abused or misused. Large volumes of Echo Requests can contribute to denial-of-service activity, and error messages can reveal network information. Administrators may rate-limit or filter selected messages at network boundaries. The goal should be to reduce risk without breaking required functions such as Path MTU Discovery, IPv6 Neighbor Discovery or useful operational diagnostics.

Do not treat a policy that blocks ping as evidence of strong security. A firewall should enforce a documented traffic policy based on the services and trust boundaries that matter. Likewise, allowing ping does not make a host insecure by itself. Exposure should be evaluated in the context of the system's role, patching, authentication, monitoring and attack surface.

Run traceroute only against systems and networks you are authorised to test. High-rate probing, aggressive scanning or repeated tests against third-party infrastructure can trigger abuse controls or violate acceptable-use policies. A small number of diagnostic probes to troubleshoot a legitimate connection is different from a broad scan.

For enterprise networks, document which ICMP and ICMPv6 message types are permitted, where rate limits apply, how Path MTU Discovery is supported, and how network teams can run approved diagnostics. Keep packet captures and trace outputs protected if they contain internal IP addresses, hostnames or topology details.

16. What ping and traceroute cannot prove

Ping cannot prove that a particular TCP or UDP port is open, that a website is healthy, or that all packets on the path have the same delay. It measures the response to its own probe. A host may prioritise, delay or ignore ICMP independently of application traffic.

Traceroute cannot guarantee that it displays every router, every link or the exact forward and return paths. It reveals only the routers that generate responses visible to the source. Load balancing, asymmetric routing, filtering, rate limiting, tunnelling and address translation can make the output incomplete or misleading.

Neither tool measures available bandwidth in the same way as a throughput test. Neither one alone identifies whether a problem is caused by a home router, ISP, transit provider, cloud network, destination host or application. They help narrow the investigation when used with DNS tests, TCP connection checks, packet captures, router statistics and application logs.

A good diagnostic conclusion is appropriately limited: “The gateway responds consistently; public ICMP replies are intermittent; TCP connections to the service also time out” is more defensible than “the ISP router at hop four is broken.” Report observations first, then list likely causes and the additional test needed to distinguish them.

17. How ICMP fits into a broader network-health check

A complete connectivity investigation combines several layers. First confirm local link and IP configuration. Then verify name resolution. Use ping to observe basic round-trip reachability where permitted. Use traceroute to examine the sequence of visible forwarding responses. Test the actual service with its normal protocol and port. Finally, compare results over time and under load.

For a website, this may mean checking DNS lookup time, TCP or QUIC connection establishment, TLS negotiation, time to first byte and total page load. For a game, it may mean monitoring RTT, jitter and loss to the game service rather than relying on a generic public ping target. For a VPN, it may mean checking tunnel establishment, routes, MTU and whether required ICMP errors can return through the tunnel.

TEZZ CONNECT's speed test can help measure download, upload and latency under its test conditions. For a deeper diagnosis, pair those measurements with the operating system's ping and traceroute utilities and the service-specific checks described above. A single speed number is not a full network-health report; the goal is to gather several independent signals and see where they agree.

For more practical troubleshooting, browse the [Internet Problems & Fixes category](/blog/category/internet-problems-fixes/) and the [TEZZ CONNECT Blog](/blog/).

18. Frequently asked questions

Is ICMP the same as ping?

No. ICMP is a network control-message protocol. Ping is a utility that commonly uses ICMP Echo Request and Echo Reply messages to test reachability and measure round-trip time.

Does a failed ping mean the internet is down?

No. A host or firewall may block or rate-limit ICMP Echo while allowing normal application traffic. Test the actual service and compare more than one destination.

What is the difference between ping and traceroute?

Ping measures replies from a target. Traceroute sends probes with increasing TTL or Hop Limit values to discover routers that return time-exceeded messages along the path.

Why does traceroute show asterisks?

An asterisk means a probe did not receive a response before its timeout. The router may filter or rate-limit diagnostic replies, or the probe or reply may have been lost.

What does TTL mean in ping output?

The displayed TTL is generally the remaining TTL in the reply packet when it reaches your device. It is not a direct hop count unless the initial TTL is known.

Can traceroute show the exact route packets take?

Not always. Load balancing, policy routing, asymmetric return paths, tunnels, filtering and hidden routers can make the displayed sequence incomplete or different from other traffic flows.

Why does one traceroute hop show high latency but later hops look normal?

That router may be slow to generate diagnostic replies while forwarding transit traffic normally. A delay that persists at later hops and in application tests is stronger evidence of path delay.

What is the difference between ICMPv4 and ICMPv6?

They support similar control and diagnostic roles for IPv4 and IPv6, but use different message formats and type assignments. ICMPv6 also supports essential IPv6 functions such as Neighbor Discovery and Path MTU Discovery.

Does traceroute use UDP or ICMP?

It depends on the implementation. Classic traceroute often uses UDP probes, some tools use ICMP Echo, and others use TCP probes to a selected destination port.

Should I block all ICMP traffic on my firewall?

Usually not. Apply a deliberate policy and preserve required messages, especially those needed for Path MTU Discovery and IPv6 operation. Filter or rate-limit selectively based on your security requirements.

Standards and further reading

Protocol standards describe expected message behaviour, but operating systems, routers and firewalls may apply local policy and implementation-specific limits. Use the relevant platform documentation when interpreting command options or designing network security rules.