Networking & Routing

What is Hop?

Definition

A hop is one passage of a packet through a router or other layer-3 forwarding device as it travels from source to destination across an internetwork.

A hop is the fundamental unit of progress in packet-switched networks. Each time a packet passes from one router to the next, it completes a single hop. The path from source to destination is a sequence of hops, where the source host and each intermediate router constitute a hop boundary. The destination host itself is not counted as a hop in most contexts, though exceptions exist in traceroute implementations where the final host responds with an ICMP port unreachable.

Hops are counted and measured at the Internet layer (OSI layer 3). The IPv4 header contains a Time to Live (TTL) field, originally specified as an 8-bit field in RFC 791 (1981). Each router decrements the TTL by at least 1 per hop. When TTL reaches 0, the router discards the packet and sends an ICMP Time Exceeded message back to the source. In IPv6, the identical function is called the Hop Limit (RFC 2460). The hop count thus serves as both a routing metric and a loop-prevention mechanism.

Hop count is a simple metric used by routing protocols such as RIP (Routing Information Protocol), which defines a maximum hop count of 15 (RFC 1058). A route with a metric of 16 is considered unreachable. More sophisticated protocols like OSPF or BGP use composite metrics. The hop count is also the basis for traceroute, a diagnostic tool that sends packets with progressively increasing TTL values to map the router-level path to a destination.

Key facts

  • IPv4 TTL and IPv6 Hop Limit are both decremented by at least 1 per router.
  • RIP uses hop count as its sole metric with a maximum of 15 hops.
  • Traceroute exploits TTL expiration to discover each hop in the path.
  • A hop always involves layer-3 forwarding, not layer-2 bridging or switching.
  • The term originates from early ARPANET packet-switching nodes.

How it works in practice

When a user in New York sends a ping to a server in London, the ICMP echo request may traverse 10 routers across the Atlantic. Each router processes the packet, decrements TTL, and forwards it to the next hop. If one router fails, the path may change to a different sequence of hops, which traceroute would reveal as a change in the intermediate addresses.

Related terms

Time to Live (TTL) Hop Limit Router Traceroute Routing Information Protocol (RIP) Metric

References

More in Networking & Routing

Anycast

Anycast is a network addressing and routing method where a single IP address is assigned to multiple servers, and routers send traffic to the nearest server based on routing protocol metrics.

AS Path

A BGP path attribute that lists the sequence of autonomous system numbers a route has passed through, used for loop detection and path selection.

ASN

A globally unique 16 or 32 bit number assigned to an autonomous system for use in BGP routing between organizations on the Internet.

Autonomous System

An Autonomous System (AS) is a group of IP networks under a single administrative routing policy, identified by a unique ASN (Autonomous System Number) for exterior gateway routing.

BGP

BGP (Border Gateway Protocol) is the path vector routing protocol that networks use to exchange reachability information between autonomous systems on the public internet.

CIDR

CIDR (Classless Inter-Domain Routing) is a method for allocating IP addresses and routing packets using variable-length subnet masks (e.g., /24) instead of fixed classful boundaries.

IPv4

IPv4 is the core Internet Protocol using 32-bit addresses, providing roughly 4.3 billion unique identifiers for network interfaces on the global internet.

IPv6

IPv6 is the most recent version of the Internet Protocol, using 128-bit addresses to provide an effectively unlimited number of unique identifiers for networked devices.

Latency

Latency (or round-trip time, RTT) is the time required for a packet to travel from a source to a destination and back, measured in milliseconds, and is a critical metric in network performance.

Looking Glass

A looking glass is a public web-based tool that provides read-only access to a network's BGP routing table, ping, and traceroute diagnostics from that network's perspective.

Who Is Online

In total there are 82 users online: 0 registered, 76 guests and 6 bots.

Bots: Facebook Googlebot Majestic Other Bot Other Spider SemrushBot

Users active in the past 15 minutes. Total registered members: 340