Hop (networking)

An illustration of hops in a network. The hop count between the computers in this case is 2.

In computer networking, a hop is one portion of the path between source and destination. Data packets pass through bridges, routers and gateways as they travel between source and destination. Each time packets are passed to the next network device, a hop occurs. The hop count refers to the number of intermediate devices through which data must pass between source and destination.

Since store and forward and other latencies are incurred through each hop, a large number of hops between source and destination implies lower real-time performance.

Hop count

The hop count refers to the number of intermediate network devices through which data must pass between source and destination.[1] Hop count is a rough measure of distance between two hosts. A hop count of n means that n network devices separate the source host from the destination host.

On a layer 3 network such as Internet Protocol (IP), each router along the data path constitutes a hop. By itself, this metric is, however, not useful for determining the optimum network path, as it does not take into consideration the speed, load, reliability, or latency of any particular hop, but merely the total count. Nevertheless, some routing protocols, such as Routing Information Protocol (RIP), use hop count as their sole metric.[2]

Each time a router receives a packet, it modifies the packet, decrementing the time to live (TTL). The router discards any packets received with a zero TTL value. This prevents packets from endlessly bouncing around the network in the event of routing errors. Routers are capable of managing hop counts, but other types of network devices (e.g. Ethernet hubs and bridges) are not.

Hop limit

Known as time to live (TTL) in IPv4, and hop limit in IPv6, this field specifies a limit on the number of hops a packet is allowed before being discarded. Routers modify IP packets as they are forwarded, decrementing the respective TTL or hop limit fields. Routers do not forward packets with a resultant field of 0 or less. This prevents packets from following a loop forever.

Next hop

Routing term used for the next gateway to which packets should be forwarded along the path to their final destination. One technique to make content of a routing table smaller is called next-hop routing.

Next hop forwarding

A routing table usually contains the IP address of a destination network and the IP address of the next gateway (next hop) along the path to the final network destination. Using a routing table to store a next hop for each 'known' destination is called next-hop forwarding. Therefore, a given gateway only knows one step along the path, not the complete path to a destination. It is also key to know that the next hops listed in a routing table are on networks to which the gateway is directly connected to.

Diagnostics

The ping or traceroute commands can be used to see how many router hops it takes to get from one host to another.

Hop counts are often useful to find faults in a network, or to discover if routing is indeed correct. Network utilities like ping can be used to determine the hop count to a specific destination. Ping generates packets that include a field reserved for the hop count.

See also

References

  1. "Hop Count". Infocellar.com.
  2. RFC 1058, Routing Information Protocol, C. Hendrik, The Internet Society (June 1988)

Further reading

  • Comer, Douglas E. Internetworking with TCP/IP, fifth edition. Pearson Prentice Hall,2006. ISBN 0-13-187671-6
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.