4

As switches don't decrease the IP TTL header field, I can't detect how many steps are between a host and the router by using tracert. Are there any ways to detect the number of switches between a host and the router?

To define the scenario a bit further: These may be unmanaged switches, so using the administrative interface or console of the switches won't be a possibility.

1
  • if the swtich operates a L3 and thus performs a routing job then it is possible to detect how many hops are traversing switches, which are performing routing positions.
    – Max
    Commented May 17, 2016 at 11:01

2 Answers 2

7

No, there isn't. Switches are transparent devices. The frames which the host sends will be the same frames as the host (a router is just a host to a switch) on the other end of the switches receives. Frames only get modified on trunks, where a VLAN tag may be placed, but then removed as it reaches the next switch.

Managed switches just have a virtual host which manages the switch on a VLAN attached to the switch. Managed switches are still transparent to any traffic traversing the switch.

2

If all the switches run spanning tree then you may be able to calculate it from the Spanning Tree BPDUs, as they contain the cost of the path to the root switch. You'd compare the costs seen by the host versus the costs seen by the router.

There are obviously toplogies where this approach would fail, so even this is no general solution. As Ron wrote, a design objective of Radia Perlman's bridging was that it be transparent to hosts (and routers are hosts as far as ethernet cares).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.