3

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
    May 17 '16 at 11:01
6

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.

1

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, privacy policy and cookie policy

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