POSTECH DiffServ MIB Implementation
This homepage explains SNMP agent implementations for managing DiffServ routers, developed in
DP&NM Lab,
POSTECH, Korea.
If you have any comments or questions on this page, please feel free to
contact me at jay@postech.ac.kr.
Overview
- DiffServ manager/agent implementation in Linux DiffServ routers
- DiffServ MIB analysis
- Results from the research project funded by ETRI during nine months from 1999 to 2000.
Architecture
- The following figure explains our SNMP manager-agent implementation architecture.
DiffServ Router Configuration
Documents for Linux DiffServ Implementation
IETF DiffServ MIB
- For managing DiffServ routers in the SNMP framework, the first
thing to do is to define SNMP management information base for DiffServ routers.
The IETF DiffServ working group first defined a DiffServ MIB on July 1999 and
has exteded the MIB several times until now. The followings are some of
IETF draft documents on DiffServ MIBs from verion 0 to version 8.
- draft-ietf-diffserv-mib-00.txt, July 1999
- draft-ietf-diffserv-mib-01.txt, October 1999
- draft-ietf-diffserv-mib-03.txt, May 2000
- draft-ietf-diffserv-mib-05.txt, November 2000
- draft-ietf-diffserv-mib-08.txt, February 2001
- As we can see here, the contents of DiffServ MIB are constantly chaning relatively too fast.
When we develop a DiffServ agent, we need to fix one version of the MIB for concrete implementation. We have chosen
diffserv-mib-03 for our implementation.
- First, we have analyzed diffserv-mib-03 to understand the structure and
meaning of MIB objects. The following figure stands for the relationship
of MIB tables in diffserv-mib-03. Each table is connected to other tables
by following data path of packets.
- For monitoring statistics of DiffServ codepoint usages in DiffServ routers,
there is another MIB defined by the IETF RMON working group. The MIB is
an extension of RMON-2 MIB for monitoring statistics of DiffServ packets.
- draft-ietf-rmonmib-dsmon-mib-04.txt, January 2001
- We didn't implement DSMON MIB in our implementation. However, since the DiffServ MIB
does not contain tables for statistics information, implementation of DSMON MIB is
highly needed for complete management of DiffServ routers. In our implementation,
we have added a proprietary table for storing statistic information in DiffServ MIB.
UCD-SNMP and DiffServ Agent Implementation
- Our SNMP agent for DiffServ MIB has been implemented by using
UCD-SNMP package (now called as NET-SNMP).
We have used UCD-SNMP 4.1.2 and the DiffServ MIB has been inserted as an extension MIB in UCD-SNMP agent.
- If you want to have more information of extending UCD-SNMP agent, you can
find it at Dave Shield's contribution page.
- The detail implementation architecture of our SNMP agent is described in the following
figure.
- Adding DiffServ MIB to UCD-SNMP agent is somewhat easy and
straightforward. We have used 'mib2c' utility contained in UCD-SNMP
package to convert DiffServ MIB text file to C templates.
- The difficult part is writing backend processing modules, depicted
as a pink box in the figure, which map traffic shaping parameters
from Linux kernel to MIB objects in the UCD-SNMP agent.
- For each SNMP operation on objects in DiffServ MIB, the UCD-SNMP agent
invokes functions in the DiffServ agent. And then the DiffServ agent opens a netlink socket
to the kernel and requests proper parameters for the SNMP operation.
The retrieved parameters are mapped to one or more of SNMP MIB objects
in the DiffServ MIB and transfers to the SNMP manager who initially
requests the SNMP operation.
Agent Implementation Source Code
- In order to help people working on
similar efforts and receive valuable feedbacks from them, we decided to
release our source codes in public. We hope the source code should follow
GNU General Public License so that the contribution thereafter can also belong
to the open source community.
- Unfortunately, the current DiffServ agent implementation is operational, but not completely.
Only some part of DiffServ MIB tables are supported. We're still working on it.
- Our source code package has the following files. The gzipped tar file
(diffserv-postech-00.tar.gz) containing all is available
for your convenience.
Installation and Test Guide
- Download the following gzipped tar package containing all the source codes.
- Before installing our codes, UCD-SNMP should be installed first. We've used UCD-SNMP 4.1.2
and assume it is compiled at /usr/local/ucd-inst/ucd-snmp-4.1.2 and installed at /usr/local/ucd-snmp. Caution! You should compile
the UCD-SNMP package completely BEFORE installing our codes.
- Go to the agent/mibgroup directory and unpack our package there.
$ cd /usr/local/ucd-inst/ucd-snmp-4.1.2/agent/mibgroup
$ tar xf diffserv-postech-00.tar.gz
- The source codes will be placed at 'diffserv' directory.
- Copy DiffServ MIB file to UCD-SNMP MIB repository.
$ cd diffserv
$ cp DIFF-SERV-MIB.txt /usr/local/ucd-snmp/share/snmp/mibs
- Configure and compile the whole UCD-SNMP package with the following arguments. This will make
SNMP agent with the DiffServ MIB extensions.
$ cd /usr/local/ucd-inst/ucd-snmp-4.1.2
$ configure --prefix=/usr/local/ucd-snmp --with-mib-modules="diffserv/diffServMib"
$ make
- However, since we split DiffServ extensions into multiple source files, the agent should be
rebuilt with modified makefiles. Move makefiles to proper directory as following instructions.
Rename original makefiles if you want to keep them.
$ cd /usr/local/ucd-inst/ucd-snmp-4.1.2/agent/mibgroup/diffserv
$ cp Makefile.agent ../../Makefile
$ cp Makefile.mibgroup ../Makefile
- The makefiles assume that iproute2 libraries are located at /usr/src/iproute2.
Change the directory name if you install iproute2 at a different directory.
- Compile the UCD-SNMP agent only. You don't have to compile the whole package. What we want is
the extended 'snmpd'.
$ cd /usr/local/ucd-inst/ucd-snmp-4.1.2/agent
$ make
- If the compilation finishes successfully, the newly-created agent binary
can be found at /usr/local/ucd-inst/ucd-snmp-4.1.2/agent/snmpd. Of course, the agent supports
DiffServ MIB objects we have just added.
- Kill any running snmpd if exists and execute the new agent binary with root privileges.
# snmpd
- The DiffServ agent can be tested by sending SNMP GET message on
any of DiffServ MIB objects under oid 1.3.6.1.2.1.1.12345.
$ snmpget localhost public 12345.2.11.1.1.1
12345.2.11.1.1.1 = 1
- If you have any GUI-based SNMP manager that can compile the DiffServ MIB, you
can see easier interface like the following. Using MG-Soft MIB browser provides this running interface.
Feedbacks
Comments and suggestions will be welcomed,
please feel free to send mail to me!
Last updated, May 25, 2001
By jay@postech.ac.kr