Hop (networking)
A hop is each step a network packet takes as it moves between intermediate devices. This article explains what hops are, how they are counted, why they matter, and common uses in diagnostics and routing.
Overview
In packet-switched computer networks, data travels from a source host to a destination host by being forwarded one segment at a time. Each time a packet is forwarded by an intermediate network device — most commonly a router or gateway — it is said to take a hop. The hop count expresses how many of these forwarding steps a packet has experienced along its path.
Image gallery
1 ImageHow hops are measured and enforced
At the network layer the Internet Protocol carries a small control field that limits how far a packet may travel. In IPv4 this is the Time To Live (TTL) field; in IPv6 the equivalent is the Hop Limit field. Every time a router forwards a packet it decrements that field by at least one. If the field reaches zero before the packet arrives at its final destination, the packet is discarded to prevent it from circulating endlessly. Often the router that drops the packet will notify the sender with an ICMP "Time Exceeded" message.
Technical distinctions and common misconceptions
Not every device on a path necessarily counts as a hop. Hops are normally counted at the network layer, so layer 2 switches and hubs that forward at the data link layer do not decrement TTL and are not considered separate hops in the same sense as routers. The TTL/Hop Limit control operates independently of physical distance or propagation delay; a path with few hops can still exhibit large latency, and a long sequence of low-latency hops may appear fast despite a high hop count.
History and rationale
The hop-count mechanism was introduced early in packet networking to avoid situations where misconfigured routes or transient loops would cause packets to circulate indefinitely. Although the IPv4 TTL field name suggests a measurement of time, it has long been used as a straightforward hop counter in practice. Routing protocols and algorithms also use hop counts and related metrics to evaluate path length and choose routes; for example, simple distance-vector protocols count hops as the primary metric for route selection.
Uses and practical examples
- Network diagnostics: Tools such as traceroute (also called tracert) reveal the sequence of hops between two hosts by sending packets with increasing TTL/Hop Limit values and recording intermediate responses.
- Troubleshooting: Observing which hop drops a packet or causes large delays helps isolate failures or congestion points along a path.
- Routing policies: Some routing systems impose maximum hop counts to constrain path length or to implement simple loop-avoidance rules.
- Security and analysis: Variation in TTL values can be used to infer aspects of topology or operating systems, though such inferences require caution.
Notable facts and best practices
When interpreting measurements, remember that the hop count is only one dimension of path quality. Latency, jitter, available bandwidth and packet loss are separate properties that together determine application performance. For diagnostics, combine hop-count based tools with active tests (ping, TCP/UDP probes) and passive observation to build a complete picture. When configuring network equipment, ensure reasonable default hop limits and monitor for persistent time-exceeded responses, which often signal routing loops or misconfigurations.
For more on packet forwarding behavior and routing fundamentals see entries on routers and general references to computer networks.
Related articles
Author
AlegsaOnline.com Hop (networking) Leandro Alegsa
URL: https://en.alegsaonline.com/art/45062