Request SNMP Information per MIB Browser

From Thomas-Krenn-Wiki
Jump to: navigation, search

Many network devices support SNMP (Simple Network Management Protocol) for querying status information and setting configuration parameters. This article will show you how to request SNMP information using an MIB Browser.

Management Information Base

A MIB (Management Information Base)[1] describes the information that can be requested from, or set on, a device in the TCP/IP network. The individual pieces of data are called Managed Objects and are identified by means of an Object Identifier using the Abstract Syntax Notation One (ASN.1) format.

The following example shows an extract from the Intel Modular Server MIB (the INTELCORPORATION-MULTI-FLEX-SERVER-PWR-MIB.my MIB file):

        pwrSupplyEmbTemp OBJECT-TYPE
            SYNTAX INT32withException
            MAX-ACCESS read-only
            STATUS current
            DESCRIPTION
                "Power supply's EMB Temperature in degrees Celsius

                degrees Celsius   - when power supply is present
                notApplicable     - if a power supply fan blank, or isn't
                                    present
                unknown           - if device type is unknown"
            ::= { pwrSupplyEntry 22 }

The status of four power supplies in the system can be read from the following four addresses (object identifiers in ASN.1 format:

  • .1.3.6.1.4.1.343.2.19.1.2.10.207.1.1.22.1
  • .1.3.6.1.4.1.343.2.19.1.2.10.207.1.1.22.2
  • .1.3.6.1.4.1.343.2.19.1.2.10.207.1.1.22.3
  • .1.3.6.1.4.1.343.2.19.1.2.10.207.1.1.22.4

MIB Browser

MIB browser software is available from various manufacturers. Often, there are slightly limited versions available for free. The following list shows examples of several MIB browsers:

SNMP Queries using an MIB Browser

MIB Browser Get Subtree Query
The following screenshot shows a request for the temperatures of the power supplies for the modular server using the iReasoning MIB browser. Before making the query, the MIB files are loaded using File -> Load MIBs. We selected the pwrSupplyEmbTemp object in the INTELCORPORATION-MULTI-FLEX-SERVER-PWR-MIB area. All four power supplies are then queried by the Get Subtree operation.

SNMP Queries using snmpwalk

This request for the temperatures of the modular server’s power supplies may optionally be made from a Linux PC using snmpwalk from the command line.

[admin@tpw admin]$ snmpwalk -v 2c -c public 10.10.10.239 .1.3.6.1.4.1.343.2.19.1.2.10.207.1.1.22
SNMPv2-SMI::enterprises.343.2.19.1.2.10.207.1.1.22.1 = INTEGER: 34
SNMPv2-SMI::enterprises.343.2.19.1.2.10.207.1.1.22.2 = INTEGER: 35
SNMPv2-SMI::enterprises.343.2.19.1.2.10.207.1.1.22.3 = INTEGER: 38
SNMPv2-SMI::enterprises.343.2.19.1.2.10.207.1.1.22.4 = INTEGER: -32
[admin@tpw admin]$ 

References

  1. Management Information Base (en.wikipedia.org)

Additional Information


Foto Werner Fischer.jpg

Author: Werner Fischer

Werner Fischer, working in the Web Operations & Knowledge Transfer team at Thomas-Krenn, completed his studies of Computer and Media Security at FH Hagenberg in Austria. He is a regular speaker at many conferences like LinuxTag, OSMC, OSDC, LinuxCon, and author for various IT magazines. In his spare time he enjoys playing the piano and training for a good result at the annual Linz marathon relay.


Related articles

IPMI Security Updates
Nuvoton WPCM450R IPMI Chip with ATEN-Software
Supermicro IPMI Security Updates November 2013