You are on page 1of 1

Since such an OID may be difficult to handle by humans, available variables are

described by a MIB module which is a file that should be parsed to get a mapping
between OID and variable names and types. For example, the above OID can also b
e referred as IF-MIB::ifName.2. Those MIB modules are described using a subset o
f ASN.1 defined in RFC 2578.
A MIB module allows to group several variables into a conceptual table. For exam
ple, IF-MIB::ifDescr, IF-MIB::ifType, IF-MIB::ifSpeed are columns of IF-MIB::ifT
able. Each row is associated to an index. In the case of IF-MIB::ifTable, it is
the interface index. Net-SNMP includes snmptable allowing one to display such a
table in a natural manner1:
$ snmptable localhost IF-MIB::ifTable
SNMP table: IF-MIB::ifTable
ifIndex ifDescr
ifType ifMtu ifSpeed
1
lo softwareLoopback 16436 10000000
2
eth0 ethernetCsmacd 1500 100000000
3
eth1 ethernetCsmacd 1500 10000000
4
br0 ethernetCsmacd 1500
0
Variables inside a table are called columnar objects while those outside are sca
lar objects. SNMP, as a protocol, does not care of this distinction since it doe
s not know the concept of MIB modules.
Other useful tools from Net-SNMP includes snmpget to get a specific variable, sn
mpwalk to discover available variables (with GETNEXT operation) from an OID and
snmptranslate to translate between object names and OID.
$ snmpget localhost IF-MIB::ifDescr.2
IF-MIB::ifDescr.2 = STRING: eth0
$ snmpwalk localhost IF-MIB::ifDescr

You might also like