Snmp client-side tools

03/09/2005

First versions of the snmp client tools (snmpget, snmpset and snmpwalk) have been checked into the Perforce code repository. There's a lot more work to be done though :

Update 07-05-2006

A new version of bsnmptools(bsnmpwalk, bsnmpget, bsnmpset) installing separately from the rest of the bsnmp code is available at http://www.ringlet.net/~shteryana/snmp/bsnmptools-20060818-01.tar. The up-to-date sources are currently in FreeBSD perforce code repository under //depot/user/soc-shteryana/bsnmp/. Tarball of perforce sources is available at http://www.ringlet.net/~shteryana/snmp/bsnmp_p4-20060819-01.tar.

How to install



fetch http://www.ringlet.net/~shteryana/snmp/bsnmptools-20060818-01.tar
tar -xvf bsnmptools-20060818-01.tar
cd bsnmptools
make
make install (as root)

How to use



Each of the tools installs with a man page that describes the options that can be provided to the bsnmptools and how to use them. Since bsnmptools read OID<->Human-Readable-OID-Name information from the files produced by gensnmpdef(1) (the ones used by bsnmpd(1) daemon and installed under /usr/share/snmp/defs), to be able to use the complete functionality of the bsnmptools, one needs an updated version of the files containing a bit more information. A tarball of the updated files is available at http://www.ringlet.net/~shteryana/snmp/snmp_defs-20060502-01.tar. A quick and dirty way to install the files is to un-tar the tarbal and copy all the files under /usr/share/snmp/defs/. After re-compiling bsnmp sources (e.g. as a part of build && installworld), the files will be overwritten though. These files should be enough to get a decent output when using the tools against bsnmpd(1) agent. If you want to use the tools against a different agent and still get a nice user-friendly ouput of the OIDs, you will have to produce your own .def files with gensnmpdef(1) for the MIBS your agent is serving. Currently gensnmpdef's sources are in CVS under src/contrib/bsnmp/gensnmpdef but gensnmpdef is not compiled/installed with the base system. To install it you need to install libsmi first - to install it from port do:

cd /usr/ports/net-mgmt/libsmi
make install (as root)

Furthermore to produce files that contain all the information bsnmptools need to give a decent output you need to patch gensnmpdef - patch available at http://www.ringlet.net/~shteryana/snmp/gensnmpdef-20060503-03.diff. My Makefile to compile and install gensnmpdef (which I have under src/usr.sbin/bsnmpd/gensnmpdef) can be fetched from http://www.ringlet.net/~shteryana/snmp/Makefile. You can produce your own files with 'gensnmpdef MIB-FILE'.

Known Issues




Enjoy ;)

Update 19-08-2006

Three new textual conventions implemented - Macaddress(SNMPv2-TC), Bridgeid (BRIDGE-MIB), Bridgeportd (BEGEMOT-BRIDGE-MIB).


CategorySNMP

BsnmpTools (last edited 2008-06-17 21:38:23 by localhost)