Snmp client-side tools


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 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 available).

How to install

tar -xvf bsnmptools-20100516-01.tar
cd bsnmptools
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 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 My Makefile to compile and install gensnmpdef (which I have under src/usr.sbin/bsnmpd/gensnmpdef) can be fetched from 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).

Update 17-09-2007

Major cleanup of code - style(9)-ify, removed duplicate code, merge the three tools' main files/routines in a single. Successfully parse OIDs with a leading . like in .1.3.6, and textual OIDs with a leading dot as in (net-snmp style).

Update 13-08-2009

Fix a problem with bsnmpwalk looping forever when "End of Mib View" responce is received. Reported by: keramida@

Update 11-12-2009

Display InetAddress textual convention or at least the IPv4/IPv6 address types.

Update 16-05-2010

Add partial support for BITS type to the bsnmptools - now BITS type is printed/specified via hex number (up to 8 octets). TODO - actually print which bitsare set in an object of type BITS via their textual representation. Fix a crash when the indexes of a table include an object of type ENUM or BITS. Sources available in Perforce (under //depot/user/syrinx/bsnmp/usr.sbin/bsnmpd/tools/) and on Freefall (

CategorySnmp CategoryStale

BsnmpTools (last edited 2020-11-17T01:56:53+0000 by SashaVigole)