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

get the list of mac addresses the switch knows about per VLAN
snmpwalk -c comstring MySwitch@VLAN .
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 .
IF-MIB::ifName.2 = STRING: Gi1/1
IF-MIB::ifName.3 = STRING: Gi1/2

No comments:

Post a Comment


About Me

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