Chapter 7. Rudimentary NMS Software Components


Chapter 7. Rudimentary NMS Software Components

It's one thing to talk about NMS components; it's quite another to actually build them. In this chapter we see how to build and use SNMP code components. Using some custom software in conjunction with two commercial SNMP APIs, we provide some low-level elements of an NMS. The software is far from production standard (improvements are suggested later) and was written purely as a learning aid to show some of the nuts and bolts of SNMP. Two example programs are provided: one using Microsoft Visual C++ and the other using the Sun Microsystems Java Development Management Kit (JDMK) version 4.2. It is interesting to compare the two APIs from the viewpoint of the SNMP versions supported, platform-independence, speed, and other features. Both programs are driven from user -supplied command-line parameters, and a set of DOS batch files is provided to facilitate ease of use.

The first item of prototype software we look at is a small program called snmpmgr.exe , written using the Microsoft Visual C++ V6.0 SNMPv1 API. This program provides the following services:

  • Sends a GetRequest / SetRequest to a specified SNMPv1 agent

  • Receives a GetResponse from the specified SNMPv1 agent

  • Performs a walk of a specified agent MIB table

  • Receives a Trap PDU from a specified SNMPv1 agent

The program is written so that it can be run from the command line with the user specifying:

  • The remote SNMP agent IP address or DNS name

  • The remote SNMP agent community name

  • The required MIB object identifier instance

  • The value (for SET operations only) of the object instance

To receive traps, the user just presents the word TRAP on the program command line. This registers the program to receive traps from an agent. The agent in question must be configured to send its traps to the host running the program. The configuration steps will be described.

The ability to run from the command line allows for the program to be incorporated into a batch file (i.e., a script file) so that many SNMP-based operations can be executed.

We hope that the source code examples will help to solidify some of the concepts introduced in the book so far. In order not to restrict the user to a PC (running Microsoft Windows) platform, we also provide a short sample of similar capability using the Sun Microsystems JDMK toolkit. Because the latter is built using Java, it has multiplatform capability. A noteworthy aspect of JDMK is the brevity of the example program.

All source code provided in this chapter is available for download on the Prentice Hall Web site: [PrenticeHall] in the location provided in the Preface.



Network Management, MIBs and MPLS
Network Management, MIBs and MPLS: Principles, Design and Implementation
ISBN: 0131011138
EAN: 2147483647
Year: 2003
Pages: 150

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net