Monday, October 23, 2006

SNMP - Simple Is Not Easy

Simple Is Not Easy
Simple is not always Easy, and SNMP is a good example for this. In this blog I will try to broach on a few simple things about SNMP, and I hope you will find this introduction useful.

SNMP stands for - and is one of the most widely spread internet management protocols. It is based on UDP (though there exists an RFC defining SNMP over TCP) and uses BER for encoding.

SNMP is an internet technology - specified by means of RFCs (Requests For Comments), which are issued through the Internet Engineering Task Force (IETF)

SNMP defines both how to structure management information (data model exposed for management), and how to access it (protocol). According to SNMP, the management information is structured into MIBs (Management Information Bases). A MIB is defined using a formal language called Structure of Management Information (SMI) - whose syntax uses a subset of ASN.1.

So when we speak of SNMP we usually mean two things:

  • The protocol itself - of which there exists three main versions: SNMPv1, SNMPv2c, and SNMPv3 .
  • The Structure of Management Information - which is the formal language in which MIBs are specified, and of which there exists two versions, SMIv1 and SMIv2

The basic verbs of the SNMP protocol are GET, SET, and GETNEXT (SNMPv2 adds GETBULK). An SNMP entity can also send asynchronous events (a TRAP in SNMPv1, a NOTIFICATION or an INFORM in SNMPv2). What you GET and SET are individual variables of simple types (to simplify, strings/integers/enumerations) which can be either scalar - or located in tables.
These are the simple things about SNMP. Rest assure, I will not enter into more details today. But if you want to dig it further, here are a few additional links that will help you:



I can also recommend some good books on SNMP:

  • Understanding SNMP MIBs, by Perkins and McGinnis, published by Prentice Hall
  • Practical Guide to SNMPv3 and Network Management by David Zeltserman, Published by Prentice Hall.

Now at this point, you're probably wondering why you're reading this blog, and what all of this has to do with JMX, Java, etc...
Well the thing is that starting with , and following with , Java SE now comes with a built-in SNMPv2 agent, that makes it possible to access the data exposed by the through SNMP.
As we have seen, SNMP requires that the data exposed for management is described in a MIB - and the MIB that describes the data of the Management and Monitoring of the JVM is the .



Saturday, October 21, 2006

SNMP RFCs

RFC 1157 - http://www.faqs.org/rfcs/rfc1157.html
V1; Simple Network Management Protocol (SNMP). J.D. Case, M. Fedor, M.L. Schoffstall, C. Davin. May 1990.
RFC 2574 - http://www.faqs.org/rfcs/rfc2574.html
User-Based Security Model (USM) for Version 3 of the Simple Network Management Protocol (SNMPv3). U. Blumenthal, B. Wijnen. April 1999.
RFC 2575 - http://www.faqs.org/rfcs/rfc2575.html
View-Based Access Control Model (VACM) for the Simple Network Management Protocol (SNMP). B. Wijnen, R. Presuhn, K. McCloghrie. April 1999.
RFC 2571 - http://www.faqs.org/rfcs/rfc2571.html
An Architecture for Describing SNMP Management Frameworks. B. Wijnen, D. Harrington, R. Presuhn. April 1999.
RFC 2573 - http://www.faqs.org/rfcs/rfc2573.html
SNMP Applications. D. Levi, P. Meyer, B. Stewart. April 1999.
RFC 1215 - http://www.faqs.org/rfcs/rfc1215.html
V1; Convention for Defining Traps for use with the SNMP. M.T. Rose. March 1991.
RFC 2572 - http://www.faqs.org/rfcs/rfc2572.html
Message Processing and Dispatching for the Simple Network Management Protocol (SNMP). J. Case, D. Harrington, R. Presuhn, B. Wijnen. April 1999.
RFC 1448 - http://www.faqs.org/rfcs/rfc1448.html
Protocol Operations for Version 2 of the Simple Network Management Protocol (SNMPv2). J. Case, K. McCloghrie, M. Rose, S. Waldbusser. April 1993.
RFC 1442 - http://www.faqs.org/rfcs/rfc1442.html
Structure of Management Information for Version 2 of the Simple Network Management Protocol (SNMPv2). J. Case, K. McCloghrie, M. Rose, S. Waldbusser. April 1993.
RFC 1445 - http://www.faqs.org/rfcs/rfc1445.html
Administrative Model for Version 2 of the Simple Network Management Protocol (SNMPv2). J. Galvin, K. McCloghrie. April 1993.
RFC 1446 - http://www.faqs.org/rfcs/rfc1446.html
Security Protocols for Version 2 of the Simple Network Management Protocol (SNMPv2). J. Galvin, K. McCloghrie. April 1993.
RFC 2570 - http://www.faqs.org/rfcs/rfc2570.html
Introduction to Version 3 of the Internet-Standard Network Management Framework. J. Case, R. Mundy, D. Partain, B. Stewart. April 1999.
RFC 2271 - http://www.faqs.org/rfcs/rfc2271.html
An Architecture for Describing SNMP Management Frameworks. D. Harrington, R. Presuhn, B. Wijnen. January 1998.
RFC 1443 - http://www.faqs.org/rfcs/rfc1443.html
Textual Conventions for Version 2 of the Simple Network Management Protocol (SNMPv2). J. Case, K. McCloghrie, M. Rose, S. Waldbusser. April 1993.
RFC 1089 - http://www.faqs.org/rfcs/rfc1089.html
V1; SNMP over Ethernet. M.L. Schoffstall, C. Davin, M. Fedor, J.D. Case. February 1989.
RFC 2576 - http://www.faqs.org/rfcs/rfc2576.html
Coexistence Between Version 1, Version 2, and Version 3 of the Internet-standard Network Management Framework. R. Frye, D. Levi, S. Routhier, B. Wijnen. March 2000.
RFC 1449 - http://www.faqs.org/rfcs/rfc1449.html
Transport Mappings for Version 2 of the Simple Network Management Protocol (SNMPv2). J. Case, K. McCloghrie, M. Rose, S. Waldbusser. April 1993.
RFC 1444 - http://www.faqs.org/rfcs/rfc1444.html
Conformance Statements for Version 2 of the Simple Network Management Protocol (SNMPv2). J. Case, K. McCloghrie, M. Rose, S. Waldbusser. April 1993.
RFC 2273 - http://www.faqs.org/rfcs/rfc2273.html
SNMPv3 Applications. D. Levi, P. Meyer, B. Stewart. January 1998.
RFC 1352 - http://www.faqs.org/rfcs/rfc1352.html
SNMP Security Protocols. J. Galvin, K. McCloghrie, J. Davin. July 1992.
RFC 2272 - http://www.faqs.org/rfcs/rfc2272.html
Message Processing and Dispatching for the Simple Network Management Protocol (SNMP). J. Case, D. Harrington, R. Presuhn, et al. January 1998.
RFC 1303 - http://www.faqs.org/rfcs/rfc1303.html
A Convention for Describing SNMP-based Agents. K. McCloghrie, M. Rose. February 1992.
RFC 1353 - http://www.faqs.org/rfcs/rfc1353.html
Definitions of Managed Objects for Administration of SNMP Parties. K. McCloghrie, J. Davin, J. Galvin. July 1992.
RFC 1187 - http://www.faqs.org/rfcs/rfc1187.html
V1; Bulk Table Retrieval with the SNMP. M.T. Rose, K. McCloghrie, J.R. Davin. October 1990.
RFC 1351 - http://www.faqs.org/rfcs/rfc1351.html
SNMP Administrative Model. J. Davin, J. Galvin, K. McCloghrie. July 1992.
RFC 1270 - http://www.faqs.org/rfcs/rfc1270.html
V1; SNMP Communications Services. F. Kastenholz. October 1991.
RFC 1228 - http://www.faqs.org/rfcs/rfc1228.html
V1; SNMP-DPI: Simple Network Management Protocol Distributed Program Interface. G. Carpenter, B. Wijnen. May 1991.
RFC 1503 - http://www.faqs.org/rfcs/rfc1503.html
Algorithms for Automating Administration in SNMPv2 Managers. K. McCloghrie, M. Rose. August 1993.