Hop Count

This term has caused a lot of confusion, and therefore warrants it's own page.  A hop is hopping over a router, from link to link !!

To define hop count we first need to define hop.  A hop is every router the packets have to travel through to get to their destination.  Obviously, hop count = the number of hops.  From the http://compnetworking.about.com glossary:

the hop count represents the total number of routing devices a given piece of data (packet) passes through

The key there is, number of routing devices and  passes through.  Obviously, to "hop" means over, not through, but we can equate the terms since in both cases, the begin and end points are at either side of the device.  This means you are hopping over a device - not hopping over a link or a network !!!  The diagram below shows a path with Hop Count = 2

 

The Myth that will never go Away

Many people will always believe that a hop means jumping from router to router, which is completely wrong.  This myth started with the incorrect, colloquial usage of the term next hop.

The "Next Hop" confusion - this term has been butchered.  To most people, Next Hop means the next router in a path - this is incorrect:

 Next hop means the hop over the next router !!

But we're stuck with it, so just realize that when someone is talking about the next hop - they are referring to the next router (hopping over the link, to the next router).  Wrong, but you at least will know what they mean.

Unfortunately, since virtually everyone uses the term, Next Hop, incorrectly, to denote the next router - they also incorrectly believe that a hop means hopping over the link between the two routers - from one router to the next.  And since this does yield the correct number of hops (Hops = Routers), there is nothing to contradict this belief.

Other Devices 

Typically Hop Count = routers.  The end stations are not included in the count. However, some other devices may also be included, such as firewalls, but they are only included if they route packets !!

Repeaters, Hubs, and Switches (do not include them in the hop count) - these devices are all transparent, and do not route - and therefore is not included in the hop count.   

Firewall that are Routers (include them in the Hop Count) - many firewalls are also routers, in which case they should be included in the hop count.  These are hooked up either in front of or behind the router - in serial with the router - and they support multiple networks.  For example, a firewall with three ports, one connected to the router, and the other two to hubs or switches - is routing the packets to the two networks.

Firewall that are NOT Routers (do NOT include them in the Hop Count) - do not include a firewall that is a proxy server - it does not route, and merely acts as a buffer between you and the Internet to protect you.  Do not include a firewall that is hooked up the the network in parallel to the router.  Also, do not include a firewall that is hooked is series with the router, unless it is also routing.  For example, a firewall with two ports, one connected to the router, and the other to a hub or switch - is not routing packets.

How to Count the Hops 

Very simple:   Hop Count = Routers  

 

As you can see, the hop count is two.  Hop Count = Routers !!!    This means you are hopping over the routers, from network-to-network.  You may prefer to view this as starting out on the LAN segment of the source workstation, and ending on the LAN segment of the destination workstation, which will also give the correct number of hops.

If the packet goes from one workstation on a LAN to another workstation on the same LAN, then no routers are involved and the hop count = 0.

The Incorrect Method -Hop from Router to Router (Hop over the Links, or Networks)

Some people calculate hop count as hopping from router to router, and so long as they do not include the end stations, they will get the correct number of hops.  But this model incorrectly defines hops.  Also, it has the packets starting at one router, and hopping across until they get to the last router - that's only part of the path - it skips the beginning and end of the path.  In reality, the packets begin at the source end station, hop across routers from network-to-network, and terminate at the destination end station.  This is what is actually occurring.