Wednesday, November 9, 2011

net-snmp on fun_plug

I have ZyXEL NSA 320 at home so I wanted to use it's full capability, first step was to get "linux" there, first and for the moment last choice was FFP (Funz Fun Plug).
As far as I'm working in network monitoring other interest of mine was if I can have SNMP agent running there and yes I could, here is short guide how to install it. It's nothing hard.

1) Download and install net-snmp for ffp
funpkg -i net-snmp-5.5-1.tgz
2) Configure net-snmp, best way to do so is use snmpconf program, which is menu based commandline interface which helps you to setup snmp deamon. More info can be find here

3) Start snmp deamon during start of system
# PROVIDE: snmpd
. /ffp/etc/ffp.subr
telnetd_flags="-l /ffp/bin/sh"
run_rc_command "$1"
4) Start snmpd deamon and check if it works. See example bellow, don't forget to change IP and community to correspond to your own settings.

C:\Users\j.kindl>snmpwalk -v 2c -c gnet-ro system
SNMPv2-MIB::sysDescr.0 = STRING: Linux nsa320 #1 Wed May 18 20:18:38 CS
T 2011 armv5tel
SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::org
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (14061) 0:02:20.61
SNMPv2-MIB::sysContact.0 = STRING: plord@
SNMPv2-MIB::sysName.0 = STRING: nsa320
SNMPv2-MIB::sysLocation.0 = STRING: Unknown
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (3) 0:00:00.03
SNMPv2-MIB::sysORID.1 = OID: SNMP-MPD-MIB::snmpMPDMIBObjects.3.1.1
SNMPv2-MIB::sysORID.3 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.4 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.6 = OID: IP-MIB::ip
SNMPv2-MIB::sysORDescr.1 = STRING: The MIB for Message Processing and Dispatching.
SNMPv2-MIB::sysORDescr.2 = STRING: The MIB for Message Processing and Dispatching.
SNMPv2-MIB::sysORDescr.3 = STRING: The SNMP Management Architecture MIB.
SNMPv2-MIB::sysORDescr.4 = STRING: The MIB module for SNMPv2 entities
SNMPv2-MIB::sysORDescr.5 = STRING: The MIB module for managing TCP implementations
SNMPv2-MIB::sysORDescr.6 = STRING: The MIB module for managing IP and ICMP implementations
SNMPv2-MIB::sysORDescr.7 = STRING: The MIB module for managing UDP implementations
SNMPv2-MIB::sysORDescr.8 = STRING: View-based Access Control Model for SNMP.
SNMPv2-MIB::sysORUpTime.1 = Timeticks: (2) 0:00:00.02
SNMPv2-MIB::sysORUpTime.2 = Timeticks: (2) 0:00:00.02
SNMPv2-MIB::sysORUpTime.3 = Timeticks: (2) 0:00:00.02
SNMPv2-MIB::sysORUpTime.4 = Timeticks: (2) 0:00:00.02
SNMPv2-MIB::sysORUpTime.5 = Timeticks: (3) 0:00:00.03
SNMPv2-MIB::sysORUpTime.6 = Timeticks: (3) 0:00:00.03
SNMPv2-MIB::sysORUpTime.7 = Timeticks: (3) 0:00:00.03
SNMPv2-MIB::sysORUpTime.8 = Timeticks: (3) 0:00:00.03