SNMP Configuration

We use the OpenNMS open source Network Management System for managing our network. Any Network Management System uses the Simple Network Management Protocol (SNMP) to exchange the underlying messages. Before proceeding, check the basic working of SNMP and the various components involved here.

Before installing OpenNMS, we must first install and test SNMP in our network. The SNMP system has an SNMP Manager and several SNMP Agents. In our system, the SNMP Manager is our local system, while the OpenWrt based RBs act as the SNMP Agents.

SNMP Agent Configuration on OpenWrt RB

First, install SNMP Daemon on all RouterBoards that need to be monitored.

opkg install snmpd

If this does not work, download the .ipk files for snmpd and prerequisites for your platform from the openwrt downloads page. We use the RouterBoard 433AH platform. The necessary prerequisites are 'libelf' and 'libnetsnmp' and can be found here. Copy the tar file in your RB, extract it and execute the script file (snmp) to install snmp.

SNMP configuration can be done using the file "/etc/config/snmpd". To get the basic SNMP system working, no changes are required in the "/etc/config/snmpd" file. Start the snmp daemon on the RB using:

/etc/init.d/snmpd restart

SNMP Manager Configuration on local machine

A good tutorial on SNMP Manager configuration can be found here. Do not forget to comment the "mib:" line in the "/etc/snmp/snp.conf" file and restart the snmp service.

Testing SNMP in your network

Do a simple 'snmpwalk' of all OpenWrt RBs in order to test the correct functioning of SNMP in your network.

snmpwalk -v 1 -c public #IP Address of RB#

If the output looks something like,

SNMPv2-MIB::sysDescr.0 = STRING: Linux OpenWrt 3.3.8 #1 Tue May 20 19:40:42 IST 2014 mips
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (584010) 1:37:20.10
SNMPv2-MIB::sysContact.0 = STRING: bofh@example.com
SNMPv2-MIB::sysName.0 = STRING: GG
SNMPv2-MIB::sysLocation.0 = STRING: Department of Electrical Engineering
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (2) 0:00:00.02
SNMPv2-MIB::sysORID.1 = OID: IP-MIB::ip
SNMPv2-MIB::sysORID.2 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.3 = OID: TCP-MIB::tcpMIB
SNMPv2-MIB::sysORID.4 = OID: UDP-MIB::udpMIB
SNMPv2-MIB::sysORID.5 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup
SNMPv2-MIB::sysORID.6 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.7 = OID: SNMP-MPD-MIB::snmpMPDCompliance
SNMPv2-MIB::sysORID.8 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance
SNMPv2-MIB::sysORID.9 = OID: SNMPv2-SMI::transmission.131
.....

you are on the right track. If not, check this page. SNMP uses MIBs to exchange messages. A good explanation of MIBs is given here. Different useful MIBs are listed here. We will not need to test these MIBs for our functioning, but OpenNMS won't function without these MIBs working correctly.


OpenNMS Configuration

The OpenNMS Wiki gives a very detailed tutorial on installing OpenNMS on a local machine and testing various OpenNMS functionalities. Click here for steps on installation and configuration of OpenNMS on local machine.


Page maintained by Gaurang Naik.