Hop

Routing

Definition

One segment of a network path between a source and destination, representing the passage of a packet through a single router or intermediate device. The total number of hops affects latency and is visible via traceroute.

Counting Hops

Every time a packet passes through a RouterA network device that forwards data packets between different networks by examining destination IP addresses and consulting its routing table. Routers operate at Layer 3 (Network) of the OSI model., that counts as one hop. The hop count from your laptop to a web server might be 10-20 for traffic that stays within a continent, or 20-30 for transoceanic paths. Each hop introduces a small amount of latency — typically 1-5 ms on a fast link, more on satellite or congested links.

Hop count was historically used as a routing metric in protocols like RIP (Routing Information Protocol), where the best route was simply the one with the fewest hops. Modern protocols like OSPFOpen Shortest Path First. An interior gateway routing protocol that uses link-state advertisements and Dijkstra's algorithm to compute the shortest path within an autonomous system. use more sophisticated metrics that account for link bandwidth and delay, producing better paths than simple hop minimization.

TTL and Hops

The TTL (Time to Live)A field in an IP packet header that limits the packet's lifespan by specifying the maximum number of hops it can traverse. Each router decrements the TTL by one; when it reaches zero, the packet is discarded to prevent routing loops. field in IP packet headers directly relates to hops. Each router that forwards a packet decrements the TTL by one. When TTL reaches zero, the router drops the packet and sends an ICMP Time Exceeded message back to the source. This prevents packets from circulating indefinitely in routing loops.

TracerouteA network diagnostic tool that maps the path packets take from source to destination by sending probes with incrementing TTL values. Each responding router reveals one hop in the route, along with its latency. exploits this mechanism deliberately — it sends packets with TTL values of 1, 2, 3, and so on, causing each successive router to send back a Time Exceeded message, revealing the path hop by hop.

Diagnosing Hop-Level Problems

High latency at a specific hop, or a hop that does not respond, can indicate congestion, misconfiguration, or a firewall blocking ICMP. Note that some routers deprioritize or drop ICMP TTL-exceeded messages, causing hops to appear as * * * even when the path is working correctly. Use Ping Test to measure round-trip time to a target.

Related Terms

More in Routing