cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
254
Views
0
Helpful
2
Replies

Tracking switches

alperkeskin133
Level 1
Level 1

Hi,

How would I do to track all the switches in my network? i.e. I would like to snmpwalk the top switch and from the data I got from it, I would like to know how many level 2 switches there are and so on.. Is there a way to distinguish a switch from any other device by looking at the port it is connected to?

I hope I made myself clear,

Thanks,

Alper

2 Replies 2

Steve Fuller
Level 9
Level 9

If the switches have CDP enabled you could walk the CISCO-CDP-MIB.

Walk "cdpCacheVersion" (OID=1.3.6.1.4.1.9.9.23.1.2.1.1.5) to determine the device type, and from this build a list of neighbour switches. You can then walk "cdpCacheAddress" (OID=1.3.6.1.4.1.9.9.23.1.2.1.1.4) to get the IP address of each neighbour.

For each neighbour discovered you would then perform the same operation.

If you store the results in a hash you'd obviously avoid duplicates.

If you're using Perl, there are a couple of scripts I've found on the Perl Monks web site. I've not tried them, but you can get them at http://www.perlmonks.org/index.pl?node_id=80979 or http://www.perlmonks.org/index.pl?node_id=60928

Regards

s.uslay
Level 1
Level 1

there are also some free tools to scan the whole subnet and identify equipments.If you have a budget, Solarwinds standard edition has SNMP sweep in addition to other tools that you might find handy..

Serhat.

Review Cisco Networking for a $25 gift card