Displaying SNMP OIDs in a MIB

The last time i tackled this issue I used the snmptranslate utility which is part of the net-snmp package.

While I was looking around the Internet I found this post which describes a better alternative to the snmptranslate utility. It uses the smidump tool in the libsmi package. So I proceeded to try it on a FreeBSD as follows:

1) Install libsmi (as root)

cd /usr/ports/net-mgmt/libsmi/
make install clean

2) Download the latest VMware mibs from here

3) Run the tool (for a simple MIB)

~/vmware/mib/vmw# /usr/local/bin/smidump -f identifiers BRIDGE-MIB.mib
# BRIDGE-MIB list of identifiers (generated by smidump 0.4.8)

BRIDGE-MIB BridgeId                           type
BRIDGE-MIB Timeout                            type
BRIDGE-MIB dot1dBridge                        node         1.3.6.1.2.1.17
BRIDGE-MIB dot1dNotifications                 node         1.3.6.1.2.1.17.0
BRIDGE-MIB newRoot                            notification 1.3.6.1.2.1.17.0.1
BRIDGE-MIB topologyChange                     notification 1.3.6.1.2.1.17.0.2
BRIDGE-MIB dot1dBase                          node         1.3.6.1.2.1.17.1
BRIDGE-MIB dot1dBaseBridgeAddress             scalar       1.3.6.1.2.1.17.1.1
BRIDGE-MIB dot1dBaseNumPorts                  scalar       1.3.6.1.2.1.17.1.2
BRIDGE-MIB dot1dBaseType                      scalar       1.3.6.1.2.1.17.1.3
BRIDGE-MIB dot1dBasePortTable                 table        1.3.6.1.2.1.17.1.4
BRIDGE-MIB dot1dBasePortEntry                 row          1.3.6.1.2.1.17.1.4.1
<SNIP>

4)  IF you run this on a VMware mib you may get the error below. This indicates that you will need to supply the additional mibs in the correct order

~/vmware/mib/vmw# /usr/local/bin/smidump -f identifiers VMWARE-SYSTEM-MIB.mib
VMWARE-SYSTEM-MIB.mib:15: failed to locate MIB module `VMWARE-ROOT-MIB'
VMWARE-SYSTEM-MIB.mib:46: unknown object identifier label `vmwSystem'
smidump: module `VMWARE-SYSTEM-MIB.mib' contains errors, expect flawed output
smidump: aborting due to severe parsing errors
smidump: use the -k option to force continuation
 1:06PM agarg@zzz:~/vmware/mib/vmw# /usr/local/bin/smidump -f identifiers VMWARE-SYSTEM-MIB.mib VMWARE-ROOT-MIB.mib
VMWARE-SYSTEM-MIB.mib:15: failed to locate MIB module `VMWARE-ROOT-MIB'
VMWARE-SYSTEM-MIB.mib:46: unknown object identifier label `vmwSystem'
smidump: module `VMWARE-SYSTEM-MIB.mib' contains errors, expect flawed output
smidump: aborting due to severe parsing errors
smidump: use the -k option to force continuation
 1:06PM agarg@zzz:~/vmware/mib/vmw# /usr/local/bin/smidump -f identifiers VMWARE-ROOT-MIB.mib VMWARE-SYSTEM-MIB.mib
# VMWARE-ROOT-MIB list of identifiers (generated by smidump 0.4.8)

VMWARE-ROOT-MIB   vmware                   node         1.3.6.1.4.1.6876
VMWARE-ROOT-MIB   vmwNotifications         node         1.3.6.1.4.1.6876.0
VMWARE-ROOT-MIB   vmwSystem                node         1.3.6.1.4.1.6876.1
VMWARE-ROOT-MIB   vmwVirtMachines          node         1.3.6.1.4.1.6876.2
VMWARE-ROOT-MIB   vmwResources             node         1.3.6.1.4.1.6876.3
VMWARE-ROOT-MIB   vmwProductSpecific       node         1.3.6.1.4.1.6876.4
VMWARE-ROOT-MIB   vmwLdap                  node         1.3.6.1.4.1.6876.40
VMWARE-ROOT-MIB   vmwTraps                 node         1.3.6.1.4.1.6876.50
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s