Route My World!

A CCNA/CCNP Blog

Archive for May 1st, 2009

Layer 2 Traceroute

Posted by Aragoen Celtdra on 1st May 2009

I found a cool simple command to trace the Layer 2 hop of a packet when going from one source device to another. 

According to Cisco docs:

  • The Layer 2 traceroute feature allows the switch to identify the physical path that a packet takes from a source device to a destination device.
  • Layer 2 traceroute supports only unicast source and destination MAC addresses.
  • It finds the path by using the MAC address tables of the switches in the path. When the switch detects a device in the path that does not support Layer 2 traceroute, the switch continues to send Layer 2 trace queries and lets them time out.
  • The switch can only identify the path from the source device to the destination device.
    • It cannot identify the path that a packet takes from source host to the source device or from the destination device to the destination host.
  • CDP must be enabled on all devices.
  • The maximum number of hops is 10.
  • Must be on the same subnet.

ont-sw01#traceroute mac ip 10.100.194.116 10.100.194.4
Translating IP to mac …..
10.100.194.116 => 1234.1fe6.1116
10.100.194.4 => 5678.4640.1114

Source 000f.1fe6.d8e9 found on ont-sw01
1 ont-sw01 (10.100.194.10) : Fa0/7 => Fa0/12
2 switch01 (10.100.194.41) : Fa0/15 => Fa0/6
Destination 5678.4640.1114 found on switch01
Layer 2 trace completed

=======================

ont-sw01#traceroute mac ip 10.100.194.116 10.100.194.1
Translating IP to mac …..
10.100.194.116 => 1234.1fe6.1116
10.100.194.1 => 4321.43da.1111

Source 000f.1fe6.d8e9 found on ont-sw01
1 ont-sw01 (10.100.194.10) : Fa0/7 => Fa0/2
Destination 4321.43da.1111 found on ont-sw01
Layer2 trace completed.
ont-sw01#

Reference:

  1. Using Layer 2 Traceroute

Posted in IOS Commands, Switching | 3 Comments » | Print This Post

 

Route My World! is Digg proof thanks to caching by WP Super Cache