Switch Detection – How to Identify Number of Switches Between Host and Router

layer2switchswitching

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.

Best Answer

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.