cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1261
Views
10
Helpful
4
Replies

L2 Traceroute Via SNMP??

min.chen
Level 1
Level 1

Hello Everyone,

Does anyone know of a way to do a L2trace route Via SNMP in Cisco Layer 2 enviroment.

I can do it manually with show arp -- show cdp neighbor and the telnet to the next device and do it all over again. But is there away to write a script to do this with SNMP??

Thanks.

4 Replies 4

milan.kulik
Level 10
Level 10

Hi,

this is something I'm planning to do "when I have time enough" :-)

But I'm afraid the script will be a little complicated - you will need to recognize the type of a switch (IOS versus CatOS at least) and use proper SNMP request, I'm afraid.

There are some commands which could help as an inspiration sources:

L2trace on CatOS

trace mac on Cat3550

But none of them works in mixed IOS/CatOS environment.

There is also a nice tool called Switch Port Mapper by SolarWinds - it displays all devices connected to a switch.

User Information tracking tool (downloadable from CCO as CiscoWorks extension) works also fine, but is using data captured by CW User Tracking, i.e. it's not on-line.

Here is an article which might help:

http://www.cisco.com/warp/public/477/SNMP/cam_snmp.pdf

SNMP support page is:

http://www.cisco.com/pcgi-bin/Support/browse/psp_view.pl?p=Technologies:SNMP&viewall=true

Regards,

Milan

Here is a C++ program that does L2 traceroutes. However, it doesn't work all the time and doesn't work on all cisco devices.

http://www.thtech.net/products/6

Marvin Rhoads
Hall of Fame
Hall of Fame

Why not use CiscoWorks LMS Campus Manager's "Path Analysis" tool"?

It does a simultaneous L2/L3 trace, lays out the results graphically in a single display and provides a tabular representation of you need to export for external analysis.

Here is an excerpt from the help file:

Overview: Layer 2 Path Analysis

The Layer 2 path is the physical path on the network that packets follow through Cisco devices. Path Analysis cannot always determine the Layer 2 path for every Layer 3 hop.

The Layer 2 path includes devices that are either Simple Network Management Protocol (SNMP) accessible and known through Topology Services, or are SNMP inaccessible but have been discovered by User Tracking (for example, end-user hosts).

The Layer 2 path provides further resolution of the Layer 3 path, but is not necessarily a complete representation of all Layer 2 devices. For example, hubs or other devices that do not support the Cisco Discovery Protocol (CDP) do not appear in Layer 2 traces.

Path Analysis uses Asynchronous Network Interface (ANI) information to build Layer 2 paths, combining:

Network topology information

Virtual LAN (VLAN) and Emulated LAN (ELAN) information

User and host information

Current LAN spanning tree configuration

Path Analysis supports Layer 2 tracing on Ethernet, Fast Ethernet, Gigabit Ethernet, and LAN Emulation (LANE) networks. LANE support includes tracing on the path inside an ATM cloud. For this release, Path Analysis Layer 2 tracing does not support FDDI, Token Ring, and WAN interfaces, or router bridge groups.

Because:

1) LMS is expensive, not everybody has CW2000 installed

2) Path Analysis doesn't allow you to trace pure L2 devices. You have to know IP address of the device you are searching. I'm also not sure if it's on-line (it's using info from User Tracking Discovery which runs periodically - per 4 hours by default).

So when a new suspicious L2 device apeares in your network Path Analysis is not a reliable tool to find it quickly.

Regards,

Milan