Linux CMU SNMP Project

Jürgen Schönwälder, Erik Schönfelder


This is the documentation for the eighth release of the CMU SNMP port to Linux. This port supports SNMP version 1 (SNMPv1) and SNMP version 2 (SNMPv2). It includes a bilingual SNMPv1/SNMPv2 agent and several simple command-line management tools. This release is based on the CMU SNMP release with USEC support. It does not implement the historic party based administrative model of SNMPv2.

Where can I download the software?

The source and binary distributions are named

and available from ftp.ibr.cs.tu-bs.de (134.169.34.15) in /pub/local/linux-cmu-snmp. The distribution is also available from sunsite.unc.edu in /pub/Linux/system/Network/admin.

This release has been tested with Linux v2.0 and libc v5.2.18 (therefore it is ELF based) and may or may not work with older kernels and libc's. It will work with Linux v2.1.

What's new?

As in previous releases, a hand-full of bugs are fixed and for developers additional support is included. If you are running version 3.3 or earlier, you should upgrade to version 3.4.

Which MIB modules are supported?

The current release supports the following MIB modules:

The Linux MIB is experimental. Please contact <schoenw@cs.utwente.nl> is you have suggestions for additional Linux specific MIB variables.

What is SNMP at all?

SNMP is the Simple Network Management Protocol of the Internet. The first version of this protocol (SNMPv1) is a full Internet standard and defined in RFC 1155 and RFC 1157. The second version of SNMP (SNMPv2) is defined in RFC 1901 - RFC 1908 and is currently a draft Internet standard.

The protocol allows to retrieve and set variables, addressed as objects in a Management Information Base (MIB). The well-known standard MIB is called MIB-2 and defined in RFC 1213. It contains variables related to the TCP/IP protocol suite. Many additional MIB modules are defined (and sometimes implemented...) by IETF working groups. These modules together with some vendor specific MIB modules allow to monitor and operate equipments like Unix-Hosts, X-Terminals, Printers, Routers, coffee machines, toasters and more.

Access to the MIB is implemented by an SNMP agent. It listens on a well-known UDP port for SNMP requests send by a management station, gets the requested information out of the operating system, and returns a response. A management station can range from a simple command-line tool as contained in this CMU port (e.g. snmpget or snmpwalk) to a complex powerful graphical management station.

The security model of SNMPv2 is still under development and the currently implemented SNMPv2 USEC model is likely to change in a future version.

Where can I find more information related to SNMP?

There are several online resources where you can learn more about SNMP. The following list of URLs points to the some important starting points.

Are there other nice SNMP tools around?

There are many SNMP tools around. A widely used package is the scotty network management toolkit:
http://www.cs.utwente.nl/~schoenw/scotty/
Scotty includes an extension for the Tool Command Language (Tcl) called Tnm which allows to write SNMPv1/SNMPv2 scripts in Tcl. A number of example scripts are included to demonstrate the power of the Tcl API. The Scotty package also contains Tkined, a graphical network management station based on Tk/Tcl.

People who prefer the Perl language should look at:

ftp://ftp.wellfleet.com/netman/snmp/perl5/SNMP.tar.gz
This is a Perl 5 extension module that provides an OO interface to the CMU toolkit library.

How to install?

Binary Quick Install:

  1. Be sure, you have ELF support installed (ELF libc, ELF kernel support).
  2. Extract binaries, manpages and add-on's by running:
    rm /usr/sbin/snmpd /lib/libsnmp.so
    cd / ; tar xvzf .../cmu-snmp-linux-3.4-bin.tar.gz
  3. If you install v3.4 the first time, do
    cd tmp/cmu-snmp-linux-3.4/etc
    ./installconf -mini <password>
  4. Have a look at /etc/snmpd.conf to be familiar with it and create an entry in /etc/rc.local:
    /usr/sbin/snmpd -f ; echo 'snmpd'
    This launches the agent (running in background).
  5. A quick test would be (after launching the agent):
    snmpwalk localhost public system

Source Quick Install:

  1. Extract the source by running:
    tar xvzf .../cmu-snmp-linux-3.4-src.tar.gz
    cd cmu-snmp-linux-3.4 ; ./configure ; make
  2. Switch to root and run
    make install
  3. If you install v3.4 the first time, do
    cd ./etc
    ./installconf -mini <password>
  4. Have a look at /etc/snmpd.conf to be familiar with it and create an entry in /etc/rc.local:
    /usr/sbin/snmpd -f ; echo 'snmpd'
    This launches the agent (running in background).
  5. A quick test would be (after launching the agent):
    snmpwalk localhost public system

Installed files:

The default installation includes the following list of files:

  1. /lib/libsnmp.so.3.4
  2. /usr/sbin/snmpd
  3. /usr/bin/snmptrapd
  4. /usr/bin/snmpget
  5. /usr/bin/snmpgetnext
  6. /usr/bin/snmpset
  7. /usr/bin/snmpwalk
  8. /usr/bin/snmptest
  9. /usr/bin/snmpnetstat
  10. /usr/bin/snmptrap
  11. /usr/lib/mib.txt
  12. /etc/snmpd.conf (if not already installed)
  13. /etc/snmpd.agentinfo (if not already installed)
  14. /usr/man/man8/snmpd.8
  15. /usr/man/man8/snmptrapd.8
  16. /usr/man/man1/snmpget.1
  17. /usr/man/man1/snmpgetnext.1
  18. /usr/man/man1/snmpset.1
  19. /usr/man/man1/snmpwalk.1
  20. /usr/man/man1/snmptest.1
  21. /usr/man/man1/snmpnetstat.1
  22. /usr/man/man1/snmptrap.1
  23. /usr/man/man3/snmp_api.3
  24. /usr/man/man5/variables.5
  25. /usr/include/snmp/snmp.h
  26. /usr/include/snmp/snmp_impl.h
  27. /usr/include/snmp/asn1.h
  28. /usr/include/snmp/snmp_api.h
  29. /usr/include/snmp/parse.h
  30. /usr/include/snmp/snmp_client.h

How to launch snmpd?

To start ``snmpd'' at boottime, add a line to /etc/rc.local containing:
/usr/sbin/snmpd -f ; echo 'starting snmpd'
The -f option forces snmpd to fork a background demon and to return.

To start ``snmptrapd'' at boottime, add a line to /etc/rc.local containing:

/usr/sbin/snmptrapd -v 1 -s >/dev/null 2>&1 &
(option -v 1 for V1 auth and -s for syslog-option) You should start snmptrapd before the snmpd, if the coldStart trap of snmpd is sent to this host. :-)

If you are running another trapsink (e.g. if you are using tkined/scotty), you should not run snmptrapd -- as a rule of thumb: if you don't know, there's no need to run snmptrapd.

If you are running a CD-based Linux-system (/usr/lib mounted readonly from CD), you may copy mib.txt to /etc and it will be used instead.

Configuring the SNMP agent:

A sample snmpd.conf file for the agent will be installed in /etc, if /etc/snmpd.conf is not present. You may want to run
etc/installconf [-mini|...] <password>
to install a config other than the sample USEC configuration. Additional parameters are set-able in /etc/snmpd.conf with this linux port:

What has changed in the last releases?

Are there any known bugs?

Who wrote all the code?

Several people have contributed code to this project. The list below is a starting point to give credits. Let us know if you know additional names that should be listed below.


This page was last updated on 24. July 1997