Route My World!

A CCNA/CCNP/CCIE Blog

Layer 2 Traceroute

Posted by Aragoen Celtdra on May 1st, 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

4 Responses to “Layer 2 Traceroute”

  1. RobertNo Gravatar Says:

    What?? no CCNP yet? man you are slacking! Hows it going G. Me I am chasing my MCSE right now (I think). I want to have have BSCS degree with CCNA/MCSE then I am going to hammer CCNP once I am done. I know I know. but in my area MCSE/CCNA is king….and well then after MCSE no more MS stuff yuke! then Cisco all the way….just wanted to see how you are doing. Wish you the best man. Each of us has to go our own way..I know you will be writing for Cisco soon! with your CCIE x5 under your belt and a huge beird (grey one at that) down to the floor saying IT Daddy who???hahaha hhahha a keep hammering man keep hammering!

  2. mike in ozNo Gravatar Says:

    thanks for the tip. useful command i did not know about.

  3. Aragoen CeltdraNo Gravatar Says:

    @Daddy: I’ll get there.. someday. But you man, you keep changing your mind so often I can’t keep up anymore. LOL. Good luck with MCSE though. I just dont think I can hang with MS stuff anymore – not after I’ve met Cisco… =D

    @Mike: Thanks man.. Glad it’s helpful for you.

  4. root_takerNo Gravatar Says:

    Good stuff!  If all you know is the MAC address you can use just the MAC addresses without the “IP” portion of the command then too. 

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>