← Enterprise IT Networks Studio
📶

Ping / Traceroute Hop Simulator

ICMP Echo round-trip and TTL-expiry hop discovery across a 6-node path

⚠ Illustrative simulation — RTT/latency values and topology are for teaching purposes only, not a live network measurement.
ICMP ECHO REQUEST (Type 8)Hop 1/11 · TTL 64
🖥️
PC-A
10.0.1.10
🔀
SW-A
10.0.1.x
📡
R1
10.0.1.1
📡
R2
10.0.2.1
🔀
SW-B
10.0.2.x
🖧
Server
10.0.2.20
PC-Aforward path
PC-A crafts an ICMP Echo Request (Type 8, Code 0) to 10.0.2.20. Its routing table shows the destination is remote, so it sets the Ethernet Dst MAC to the default gateway (R1) and sends the frame toward SW-A. TTL starts at 64.
TTL as a loop safety net: every router decrements TTL by 1; if it hits 0 the packet is discarded. This bounds how long a misrouted packet can circulate — without it, a routing loop would let packets loop forever.
Key Facts
ICMP Echo Request = Type 8, Code 0
ICMP Echo Reply = Type 0, Code 0
Switches never touch TTL — only Layer 3 devices do
Default TTL: 64 (Linux/macOS), 128 (Windows), 255 (Cisco IOS)

About the Ping / Traceroute Hop Simulator

This simulator illustrates two of the most common diagnostic tools in networking. The Ping mode animates a full ICMP Echo Request/Reply round trip hop by hop across routers and switches, showing exactly where the TTL field decrements and where it does not. The Traceroute mode shows how deliberately sending probes with an incrementing, artificially low TTL causes each router along the path to reveal itself one at a time via ICMP Time Exceeded messages.

How ping (ICMP Echo) works

Ping sends an ICMP Echo Request (Type 8, Code 0) to a destination IP address. If the destination is reachable and configured to respond, its IP stack replies with an ICMP Echo Reply (Type 0, Code 0). Every Layer 3 hop along the path — routers — decrements the packet's TTL (Time To Live) field by exactly 1 and recalculates the IP checksum; Layer 2 devices like switches forward the frame unchanged, without touching the IP header at all. The overall round-trip time (RTT) reported by ping is the time between sending the request and receiving the matching reply.

How traceroute discovers each hop

Traceroute (tracert on Windows) exploits the TTL-expiry mechanism deliberately. It first sends a probe with TTL=1: the very first router decrements it to 0, discards the packet, and must send back an ICMP Time Exceeded (Type 11) message — revealing that router's IP address as hop 1. Traceroute then sends a probe with TTL=2, which survives the first router but expires at the second, revealing hop 2, and so on, incrementing TTL by 1 each round until a probe finally reaches the actual destination, which replies normally instead of with a Time Exceeded message.

Why switches never appear as a traceroute hop

TTL is a field in the IP header (Layer 3) — plain Ethernet switches operate at Layer 2 and never inspect or modify IP headers, so they never decrement TTL and never generate a Time Exceeded message. Only Layer 3 devices (routers, Layer 3 switches, and any host doing IP forwarding) participate in the TTL mechanism, which is exactly why a traceroute across a path like PC → Switch → Router → Router → Switch → Server only ever lists the two routers and the final server, never either switch.

Frequently asked questions

Why do some traceroute hops show "* * *" instead of an IP address and RTT?

This usually means that particular router is configured to rate-limit, deprioritize, or simply not generate ICMP Time Exceeded replies (a common security/performance practice), not that the path is actually broken — traffic is very likely still flowing through it correctly to later hops.

What is the default TTL and why does it matter?

Different operating systems use different default starting TTLs — commonly 64 for Linux/macOS, 128 for Windows, and 255 for Cisco IOS. Because TTL decrements by exactly 1 per router hop, the TTL value observed in a received packet can be used to estimate how many router hops away the sender is, which is sometimes used for OS fingerprinting or anomaly detection.

Does traceroute use ICMP or UDP?

It depends on the implementation: Windows' tracert sends ICMP Echo Requests with incrementing TTL. Traditional Unix/Linux traceroute instead sends UDP packets to a high, typically-closed destination port, relying on the same TTL-expiry mechanism for intermediate hops and an ICMP Port Unreachable message from the final destination. Both approaches reveal the same underlying path.

Can a firewall block ping or traceroute without blocking real traffic?

Yes — many firewalls and routers are configured to drop or rate-limit ICMP Echo Requests and Time Exceeded messages as a security hardening measure, since ICMP has historically been used for reconnaissance and certain denial-of-service techniques. This can make a perfectly healthy path appear to "time out" in ping or traceroute even though normal application traffic (HTTP, DNS, etc.) passes through it fine.

🎓

Try our Enterprise IT Networks Studio

More calculators, simulators, and guides for this discipline.

Related tools & guides

ARP Resolution SimulatorNetwork Topology & Redundancy SimulatorMAC Address Table SimulatorSubnet Calculator