Sunday, June 13, 2010

A couple of useful OIDs that I keep forgetting

This is more a "notes to myself" entry, but here are the couple of OIDs I keep misplacing:

get the list of operational vlans on the switch
snmpwalk -c commstring MySwitch 1.3.6.1.4.1.9.9.46.1.3.1.1.2

get the list of mac addresses the switch knows about per VLAN
snmpwalk -c comstring MySwitch@VLAN .1.3.6.1.2.1.17.4.3.1.1
for whatever VLAN is. So, it would be "MySwitch@177" for vlan 177.

Interface names for each port (not descriptions/port-names, names)
snmpwalk -c commstring MySwitch .1.3.6.1.2.1.31.1.1.1.1
IF-MIB::ifName.2 = STRING: Gi1/1
IF-MIB::ifName.3 = STRING: Gi1/2

No comments:

Post a Comment

Followers

About Me

My photo
Regis has worked as a network engineer since 1994 for small companies and for large companies.