Jump to Navigation

248 - Use SNMP, snmpwalk

SNMP is a unified protocol of network monitoring and network device management. All active network devices support SNMP.
Besides that, SNMP is supported by major operational systems and a large number of network applications.

To install snmpwalk or snmpget on Redhat use the command yum install net-snmp-utils.

# yum install net-snmp-utils

Let's use snmpwalk. The command snmpwalk uses the SNMP GETNEXT request to query a network for a tree of information.

To get all OIDs :

# snmpwalk -v 1 -c public 192.168.15.30 enterprises > snmp_info.txt

You find the MIB information(OID) what you want in snmp_indo.txt.

Ex. Zebra ZM400 Printer
To get the Serial Number & Printer Model

Serial Number :

# snmpwalk -v 1 -c public 192.168.15.30 enterprises.683.1.5.0

SNMPv2-SMI::enterprises.683.1.5.0 = STRING: "11545231"

Printer Model :

# snmpwalk -v 1 -c public 192.168.15.30 enterprises.10642.1.1.0

SNMPv2-SMI::enterprises.10642.1.1.0 = STRING: "ZTC ZM400-200dpi ZPL"

* SNMP Version 2

# snmpwalk -v 2c -c public 192.168.10.32 enterprises

-v 2c tells snmpwalk to use SNMP version 2
-v 1 tells snmpwalk to use SNMP version 1

MIB :
Short for Management Information Base, a database of objects that can be monitored by a network management system.
Both SNMP and RMON use standardized MIB formats that allows any SNMP and RMON tools to monitor any device defined by a MIB.

 

Linux:


Main menu 2

Story | by Dr. Radut