1819743 Members
3289 Online
109606 Solutions
New Discussion юеВ

Re: How to count hops?

 
Yogeeraj
Advisor

How to count hops?

Hello,

Sorry for this stupid question. BUT i'm confused...

A. How do i count the no. of hops from one device to another?
From my main switch -> to my Server
Switch port->twisted pair cable(RJ45)->media converter->fibre cable->media converter->twisted pair cable(RJ45)->Server NIC

How many hops does it make?

B. Is there a limit to the number of hops that i can have in a switched network segment?

Thanks for a reply
Yogeeraj
5 REPLIES 5
Ravi_8
Honored Contributor

Re: How to count hops?

Hi,
From your main switch to server nic it makes only one hop if you are in the same network(subnet). it doesn't consider switch port, cable and all. if you are in different network connected thru router then it makes hops to reach the defined target(max 30 hops).
you can test this using "traceroute" command
never give up
Deshpande Prashant
Honored Contributor

Re: How to count hops?

HI
/usr/contrib/bin/traceroute will tell you how many hops are needed to reach the destination address.

Thanks.
Prashant.
Take it as it comes.
rick jones
Honored Contributor

Re: How to count hops?

is your question in the context of IP, and its ttl, or something more general? you really need to state the context in which you intend to pose the question.

the IP hop count/ttl is decremented each time an IP datagram passes through a router. as someone else points-out, you can see how many IP hops sit between two systems at a given point in time with the traceroute command. note the use of the term router here, not switch. basically, whenever the datagram is forwarded at layer three in the ISO model, not layer two

if you are talking "hops" in a more ethernet fashion, then you would count links between switches. for switched (versus hubbed) ethernet, I do not think there is a fixed limit to the number of hops one can have. a switch separates rather than propagates collision domains, and for classic (CSMA/CD) Ethernet, what limits the network diameter (iirc) is the required timing for collision detection.

further, many times, switches imply the use of full-duplex, which does not use CSMA/CD at all and so has no "collision domain" - and if one is going to be a strict interpreter of what is an is not "Ethernet" you would have to say that since full-duplex does not use CSMA/CD, it isn't really "Ethernet" :)
there is no rest for the wicked yet the virtuous have no pillows
Shahul
Esteemed Contributor

Re: How to count hops?


Hi

Use this command

#traceroute AA.AA.AA.AA "packet size"

Where AA.AA.AA.AA is the IP address of the remote device.

This command will give U a the Number of hops used.

Shahul
Volker Borowski
Honored Contributor

Re: How to count hops?

Hi,

the hop-count from the route-command does not really have to do with how many HOPs you have between two targets. This terminus is always used in this context, when you debug something with ip and routing.

Intentionally it means the COST of the ip route. I.E. you have a network, where two sites are connected through a leased line, with a backup-connection using dial-on-demand.

Assuming both connections are build with two routers, you would have an equal HOP-count (2).
Since usally you pay a fixed amount of money for a leased-line, in terms of COST, you would favor the leased line, because the dial-on-demand costs extra. So if you need to setup some routing tables, you would increase then hop/cost for the dial-on-demand line, although it actually has the same number of hops.

Just for counting the nodes which do route between diffrent IP-networks, as said already, traceroute gives a good shot.
I think there is no IP-Tool, to measure, how many active and inactive network-componets are inbetween. I found myself confused one time, when I had a connection between two machines within the same IP-network, but one card was a tokenring and the other one was fast ethernet. There was a transparent bridge between both !

Do not know if this helps.
Volker