Remember that the whole world is not ethernet. Even if the next interface is ethernet, the frame on the first LAN has no use on the second LAN because the MAC addresses do not exist on the second LAN. That is necessary because the layer-3 device must build a new frame for the next interface, which could be a completely different protocol that uses different addressing, or no addressing at all. Yes, layer-3 devices, like routers, strip off the layer-2 frame to forward the packet. Switches are transparent devices that do not alter the layer-2 frames in any way (except adding or removing VLAN tags on trunk links), and ethernet has nothing like a TTL field. Traceroute sends a packet with a TTL of 1, so the first router expires the TTL and sends back an ICMP message, then traceroute sends a packet with a TTL of 2, so the second router expires the TTL and sends back a message, etc. Traceroute works because layer-3 packet have a TTL that gets reduced by a router, and the router is supposed to send back an ICMP message when the TTL expires. Without such control over the router, there's no way. If the router has a packet capturing feature you could use that to capture from the far side, of course there may also be alternative, similar methods (sFlow possibly). A router decapsulates the packet and dumps the frame when it's routing. With L2 there's no way.Īfter all Layer 3 packets are encapsulated in layer 2 frames, perhaps there's a way to retain the Layer 2 headers in the opposite direction, instead of being stripped by the router somehow? 元/IP is no problem (traceroute) with hops supporting ICMP TTL exceeded. Layer 2 & 3 information all the way to 8.8.8.8 would be nice, With a managed switch you can ping it (or send just any kind of packet to its IP address) and check the router's ARP table. Using LLDP or CDP, you could just ask the router which adjacent devices it has discovered. There is no such concept in Ethernet, hence no traceroute.įor instance, I'd like to discover the MAC address of the nearest switch on the far side of a router.Ī switch doesn't necessarily have a MAC address (in the VLAN connected to the router). Longer answer: traceroute exploits IP's TTL feature. But is there any way to do a traceroute that will show Layer 2 information?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |