<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html xmlns:fn="http://www.w3.org/2005/02/xpath-functions"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" href="../../../../doc/otp_doc.css" type="text/css"> <title>Erlang -- SNMP Introduction</title> </head> <body bgcolor="white" text="#000000" link="#0000ff" vlink="#ff00ff" alink="#ff0000"><div id="container"> <script id="js" type="text/javascript" language="JavaScript" src="../../../../doc/js/flipmenu/flipmenu.js"></script><script id="js2" type="text/javascript" src="../../../../doc/js/erlresolvelinks.js"></script><script language="JavaScript" type="text/javascript"> <!-- function getWinHeight() { var myHeight = 0; if( typeof( window.innerHeight ) == 'number' ) { //Non-IE myHeight = window.innerHeight; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode' myHeight = document.documentElement.clientHeight; } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatible myHeight = document.body.clientHeight; } return myHeight; } function setscrollpos() { var objf=document.getElementById('loadscrollpos'); document.getElementById("leftnav").scrollTop = objf.offsetTop - getWinHeight()/2; } function addEvent(obj, evType, fn){ if (obj.addEventListener){ obj.addEventListener(evType, fn, true); return true; } else if (obj.attachEvent){ var r = obj.attachEvent("on"+evType, fn); return r; } else { return false; } } addEvent(window, 'load', setscrollpos); //--></script><div id="leftnav"><div class="innertube"> <img alt="Erlang logo" src="../../../../doc/erlang-logo.png"><br><small><a href="users_guide.html">User's Guide</a><br><a href="index.html">Reference Manual</a><br><a href="release_notes.html">Release Notes</a><br><a href="../pdf/snmp-4.21.1.pdf">PDF</a><br><a href="../../../../doc/index.html">Top</a></small><p><strong>Simple Network Management Protocol (SNMP)</strong><br><strong>User's Guide</strong><br><small>Version 4.21.1</small></p> <br><a href="javascript:openAllFlips()">Expand All</a><br><a href="javascript:closeAllFlips()">Contract All</a><p><small><strong>Chapters</strong></small></p> <ul class="flipMenu" imagepath="../../../../doc/js/flipmenu"> <li id="loadscrollpos" title="SNMP Introduction" expanded="true">SNMP Introduction<ul> <li><a href="snmp_intro.html"> Top of chapter </a></li> <li title="Scope and Purpose"><a href="snmp_intro.html#id136711">Scope and Purpose</a></li> <li title="Prerequisites"><a href="snmp_intro.html#id134129">Prerequisites</a></li> <li title="Definitions"><a href="snmp_intro.html#id131879">Definitions</a></li> <li title="About This Manual"><a href="snmp_intro.html#id136976">About This Manual</a></li> <li title="Where to Find More Information"><a href="snmp_intro.html#id138752">Where to Find More Information</a></li> </ul> </li> <li id="no" title="Agent Functional Description" expanded="false">Agent Functional Description<ul> <li><a href="snmp_agent_funct_descr.html"> Top of chapter </a></li> <li title="Features"><a href="snmp_agent_funct_descr.html#id139873">Features</a></li> <li title="SNMPv1, SNMPv2 and SNMPv3"><a href="snmp_agent_funct_descr.html#id138359">SNMPv1, SNMPv2 and SNMPv3</a></li> <li title="Operation"><a href="snmp_agent_funct_descr.html#id144137">Operation</a></li> <li title="Sub-agents and MIB Loading"><a href="snmp_agent_funct_descr.html#id148343">Sub-agents and MIB Loading</a></li> <li title="Contexts and Communities"><a href="snmp_agent_funct_descr.html#id148513">Contexts and Communities</a></li> <li title="Management of the Agent"><a href="snmp_agent_funct_descr.html#id148647">Management of the Agent</a></li> <li title="Notifications"><a href="snmp_agent_funct_descr.html#id147124">Notifications</a></li> <li title="Discovery"><a href="snmp_agent_funct_descr.html#id147463">Discovery</a></li> </ul> </li> <li id="no" title="Manager Functional Description" expanded="false">Manager Functional Description<ul> <li><a href="snmp_manager_funct_descr.html"> Top of chapter </a></li> <li title="Features"><a href="snmp_manager_funct_descr.html#id147607">Features</a></li> <li title="Operation"><a href="snmp_manager_funct_descr.html#id149064">Operation</a></li> <li title="MIB loading"><a href="snmp_manager_funct_descr.html#id149132">MIB loading</a></li> </ul> </li> <li id="no" title="The MIB Compiler" expanded="false">The MIB Compiler<ul> <li><a href="snmp_mib_compiler.html"> Top of chapter </a></li> <li title="Operation"><a href="snmp_mib_compiler.html#id149255">Operation</a></li> <li title="Importing MIBs"><a href="snmp_mib_compiler.html#id149318">Importing MIBs</a></li> <li title="MIB Consistency Checking"><a href="snmp_mib_compiler.html#id149389">MIB Consistency Checking</a></li> <li title=".hrl File Generation"><a href="snmp_mib_compiler.html#id149426">.hrl File Generation</a></li> <li title="Emacs Integration"><a href="snmp_mib_compiler.html#id149476">Emacs Integration</a></li> <li title="Compiling from a Shell or a Makefile"><a href="snmp_mib_compiler.html#id149522">Compiling from a Shell or a Makefile</a></li> <li title="Deviations from the Standard"><a href="snmp_mib_compiler.html#id149576">Deviations from the Standard</a></li> </ul> </li> <li id="no" title="Running the application" expanded="false">Running the application<ul> <li><a href="snmp_config.html"> Top of chapter </a></li> <li title="Configuring the application"><a href="snmp_config.html#id149835">Configuring the application</a></li> <li title="Modifying the Configuration Files"><a href="snmp_config.html#id151959">Modifying the Configuration Files</a></li> <li title="Starting the application"><a href="snmp_config.html#id152049">Starting the application</a></li> <li title="Debugging the application"><a href="snmp_config.html#id152099">Debugging the application</a></li> </ul> </li> <li id="no" title="Definition of Agent Configuration Files" expanded="false">Definition of Agent Configuration Files<ul> <li><a href="snmp_agent_config_files.html"> Top of chapter </a></li> <li title="Agent Information"><a href="snmp_agent_config_files.html#id152592">Agent Information</a></li> <li title="Contexts"><a href="snmp_agent_config_files.html#id152669">Contexts</a></li> <li title="System Information"><a href="snmp_agent_config_files.html#id152722">System Information</a></li> <li title="Communities"><a href="snmp_agent_config_files.html#id152790">Communities</a></li> <li title="MIB Views for VACM"><a href="snmp_agent_config_files.html#id152873">MIB Views for VACM</a></li> <li title="Security data for USM"><a href="snmp_agent_config_files.html#id153112">Security data for USM</a></li> <li title="Notify Definitions"><a href="snmp_agent_config_files.html#id153328">Notify Definitions</a></li> <li title="Target Address Definitions"><a href="snmp_agent_config_files.html#id153408">Target Address Definitions</a></li> <li title="Target Parameters Definitions"><a href="snmp_agent_config_files.html#id153614">Target Parameters Definitions</a></li> </ul> </li> <li id="no" title="Definition of Manager Configuration Files" expanded="false">Definition of Manager Configuration Files<ul> <li><a href="snmp_manager_config_files.html"> Top of chapter </a></li> <li title="Manager Information"><a href="snmp_manager_config_files.html#id153846">Manager Information</a></li> <li title="Users"><a href="snmp_manager_config_files.html#id153987">Users</a></li> <li title="Agents"><a href="snmp_manager_config_files.html#id154088">Agents</a></li> <li title="Security data for USM"><a href="snmp_manager_config_files.html#id154271">Security data for USM</a></li> </ul> </li> <li id="no" title="Agent Implementation Example" expanded="false">Agent Implementation Example<ul> <li><a href="snmp_impl_example_agent.html"> Top of chapter </a></li> <li title="MIB"><a href="snmp_impl_example_agent.html#id154522">MIB</a></li> <li title="Default Implementation"><a href="snmp_impl_example_agent.html#id154562">Default Implementation</a></li> <li title="Manual Implementation"><a href="snmp_impl_example_agent.html#id154642">Manual Implementation</a></li> </ul> </li> <li id="no" title="Manager Implementation Example" expanded="false">Manager Implementation Example<ul> <li><a href="snmp_impl_example_manager.html"> Top of chapter </a></li> <li title="The example manager"><a href="snmp_impl_example_manager.html#id154974">The example manager</a></li> <li title="A simple standard test"><a href="snmp_impl_example_manager.html#id155064">A simple standard test</a></li> </ul> </li> <li id="no" title="Instrumentation Functions" expanded="false">Instrumentation Functions<ul> <li><a href="snmp_instr_functions.html"> Top of chapter </a></li> <li title="Instrumentation Functions"><a href="snmp_instr_functions.html#id155207">Instrumentation Functions</a></li> <li title="Using the ExtraArgument"><a href="snmp_instr_functions.html#id155822">Using the ExtraArgument</a></li> <li title="Default Instrumentation"><a href="snmp_instr_functions.html#id155930">Default Instrumentation</a></li> <li title="Atomic Set"><a href="snmp_instr_functions.html#id156035">Atomic Set</a></li> </ul> </li> <li id="no" title="Definition of Instrumentation Functions" expanded="false">Definition of Instrumentation Functions<ul> <li><a href="snmp_def_instr_functions.html"> Top of chapter </a></li> <li title="Variable Instrumentation"><a href="snmp_def_instr_functions.html#id156211">Variable Instrumentation</a></li> <li title="Table Instrumentation"><a href="snmp_def_instr_functions.html#id156586">Table Instrumentation</a></li> </ul> </li> <li id="no" title="Definition of Agent Net if" expanded="false">Definition of Agent Net if<ul> <li><a href="snmp_agent_netif.html"> Top of chapter </a></li> <li title="Mandatory Functions"><a href="snmp_agent_netif.html#id157489">Mandatory Functions</a></li> <li title="Messages"><a href="snmp_agent_netif.html#id157511">Messages</a></li> </ul> </li> <li id="no" title="Definition of Manager Net if" expanded="false">Definition of Manager Net if<ul> <li><a href="snmp_manager_netif.html"> Top of chapter </a></li> <li title="Mandatory Functions"><a href="snmp_manager_netif.html#id158310">Mandatory Functions</a></li> <li title="Messages"><a href="snmp_manager_netif.html#id158328">Messages</a></li> </ul> </li> <li id="no" title="Audit Trail Log" expanded="false">Audit Trail Log<ul> <li><a href="snmp_audit_trail_log.html"> Top of chapter </a></li> <li title="Agent Logging"><a href="snmp_audit_trail_log.html#id158735">Agent Logging</a></li> <li title="Manager Logging"><a href="snmp_audit_trail_log.html#id158778">Manager Logging</a></li> </ul> </li> <li id="no" title="Advanced Agent Topics" expanded="false">Advanced Agent Topics<ul> <li><a href="snmp_advanced_agent.html"> Top of chapter </a></li> <li title="When to use a Sub-agent"><a href="snmp_advanced_agent.html#id158927">When to use a Sub-agent</a></li> <li title="Agent Semantics"><a href="snmp_advanced_agent.html#id159037">Agent Semantics</a></li> <li title="Sub-agents and Dependencies "><a href="snmp_advanced_agent.html#id159101">Sub-agents and Dependencies </a></li> <li title="Distributed Tables"><a href="snmp_advanced_agent.html#id159118">Distributed Tables</a></li> <li title="Fault Tolerance"><a href="snmp_advanced_agent.html#id159175">Fault Tolerance</a></li> <li title="Using Mnesia Tables as SNMP Tables"><a href="snmp_advanced_agent.html#id159249">Using Mnesia Tables as SNMP Tables</a></li> <li title="Deviations from the Standard"><a href="snmp_advanced_agent.html#id159527">Deviations from the Standard</a></li> </ul> </li> <li id="no" title="SNMP Appendix A" expanded="false">SNMP Appendix A<ul> <li><a href="snmp_app_a.html"> Top of chapter </a></li> <li title="Appendix A"><a href="snmp_app_a.html#id159675">Appendix A</a></li> </ul> </li> <li id="no" title="SNMP Appendix B" expanded="false">SNMP Appendix B<ul> <li><a href="snmp_app_b.html"> Top of chapter </a></li> <li title="Appendix B"><a href="snmp_app_b.html#id160066">Appendix B</a></li> </ul> </li> </ul> </div></div> <div id="content"> <div class="innertube"> <h1>1 SNMP Introduction</h1> <p>The SNMP development toolkit contains the following parts: </p> <ul> <li>An Extensible multi-lingual SNMP agent, which understands SNMPv1 (RFC1157), SNMPv2c (RFC1901, 1905, 1906 and 1907), SNMPv3 (RFC2271, 2272, 2273, 2274 and 2275), or any combination of these protocols. </li> <li>A multi-lingual SNMP manager. </li> <li>A MIB compiler, which understands SMIv1 (RFC1155, 1212, and 1215) and SMIv2 (RFC1902, 1903, and 1904). </li> </ul> <p>The SNMP development tool provides an environment for rapid agent/manager prototyping and construction. With the following information provided, this tool is used to set up a running multi-lingual SNMP agent/manager: </p> <ul> <li>a description of a Management Information Base (MIB) in Abstract Syntax Notation One (ASN.1) </li> <li>instrumentation functions for the managed objects in the MIB, written in Erlang. </li> </ul> <p>The advantage of using an extensible (agent/manager) toolkit is to remove details such as type-checking, access rights, Protocol Data Unit (PDU), encoding, decoding, and trap distribution from the programmer, who only has to write the instrumentation functions, which implement the MIBs. The <span class="code">get-next</span> function only has to be implemented for tables, and not for every variable in the global naming tree. This information can be deduced from the ASN.1 file. </p> <h3><a name="id136711">1.1 Scope and Purpose</a></h3> <p>This manual describes the SNMP development tool, as a component of the Erlang/Open Telecom Platform development environment. It is assumed that the reader is familiar with the Erlang Development Environment, which is described in a separate User's Guide.</p> <h3><a name="id134129">1.2 Prerequisites</a></h3> <p>The following prerequisites is required for understanding the material in the SNMP User's Guide: </p> <ul> <li>the basics of the Simple Network Management Protocol version 1 (SNMPv1) </li> <li>the basics of the community-based Simple Network Management Protocol version 2 (SNMPv2c) </li> <li>the basics of the Simple Network Management Protocol version 3 (SNMPv3) </li> <li>the knowledge of defining MIBs using SMIv1 and SMIv2 </li> <li>familiarity with the Erlang system and Erlang programming </li> </ul> <p>The tool requires Erlang release 4.7 or later. </p> <h3><a name="id131879">1.3 Definitions</a></h3> <p>The following definitions are used in the SNMP User's Guide. </p> <dl> <dt><strong>MIB</strong></dt> <dd>The conceptual repository for management information is called the Management Information Base (MIB). It does not hold any data, merely a definition of what data can be accessed. A definition of an MIB is a description of a collection of managed objects. </dd> <dt><strong>SMI</strong></dt> <dd>The MIB is specified in an adapted subset of the Abstract Syntax Notation One (ASN.1) language. This adapted subset is called the Structure of Management Information (SMI). </dd> <dt><strong>ASN.1</strong></dt> <dd>ASN.1 is used in two different ways in SNMP. The SMI is based on ASN.1, and the messages in the protocol are defined by using ASN.1. </dd> <dt><strong>Managed object</strong></dt> <dd> <p>A resource to be managed is represented by a managed object, which resides in the MIB. In an SNMP MIB, the managed objects are either:</p> <ul> <li> <strong>scalar variables</strong>, which have only one instance per context. They have single values, not multiple values like vectors or structures. </li> <li> <strong>tables</strong>, which can grow dynamically. </li> <li>a <strong>table element</strong>, which is a special type of scalar variable.</li> </ul> </dd> <dt><strong>Operations</strong></dt> <dd>SNMP relies on the three basic operations: get (object), set (object, value) and get-next (object). </dd> <dt><strong>Instrumentation function</strong></dt> <dd>An instrumentation function is associated with each managed object. This is the function, which actually implements the operations and will be called by the agent when it receives a request from the management station.</dd> <dt><strong>Manager</strong></dt> <dd>A manager generates commands and receives notifications from agents. There usually are only a few managers in a system.</dd> <dt><strong>Agent</strong></dt> <dd>An agent responds to commands from the manager, and sends notification to the manager. There are potentially many agents in a system.</dd> </dl> <h3><a name="id136976">1.4 About This Manual</a></h3> <p>In addition to this introductory chapter, the SNMP User's Guide contains the following chapters: </p> <ul> <li>Chapter 2: "Functional Description" describes the features and operation of the SNMP development toolkit. It includes topics on Sub-agents and MIB loading, Internal MIBs, and Traps. </li> <li>Chapter 3: "The MIB Compiler" describes the features and the operation of the MIB compiler. </li> <li>Chapter 4: "Running the application" describes how to start and configure the application. Topics on how to debug the application are also included. </li> <li>Chapter 5: "Definition of Agent Configuration Files" is a reference chapter, which contains more detailed information about the agent configuration files. </li> <li>Chapter 6: "Definition of Manager Configuration Files" is a reference chapter, which contains more detailed information about the manager configuration files. </li> <li>Chapter 7: "Agent Implementation Example" describes how an MIB can be implemented with the SNMP Development Toolkit. Implementation examples are included. </li> <li>Chapter 8: "Instrumentation Functions" describes how instrumentation functions should be defined in Erlang for the different operations. </li> <li>Chapter 9: "Definition of Instrumentation Functions" is a reference chapter which contains more detailed information about the instrumentation functions. </li> <li>Chapter 10: "Definition of Agent Net if" is a reference chapter, which describes the Agent Net if function in detail. </li> <li>Chapter 11: "Definition of Manager Net if" is a reference chapter, which describes the Manager Net if function in detail. </li> <li>Chapter 12: "Advanced Agent Topics" describes sub-agents, agent semantics, audit trail logging, and the consideration of distributed tables. </li> <li>Appendix A describes the conversion of SNMPv2 to SNMPv1 error messages. </li> <li>Appendix B contains the RFC1903 text on <span class="code">RowStatus</span>. </li> </ul> <h3><a name="id138752">1.5 Where to Find More Information</a></h3> <p>Refer to the following documentation for more information about SNMP and about the Erlang/OTP development system: </p> <ul> <li>Marshall T. Rose (1991), "The Simple Book - An Introduction to Internet Management", Prentice-Hall </li> <li>Evan McGinnis and David Perkins (1997), "Understanding SNMP MIBs", Prentice-Hall </li> <li>RFC1155, 1157, 1212 and 1215 (SNMPv1) </li> <li>RFC1901-1907 (SNMPv2c) </li> <li>RFC1908, 2089 (coexistence between SNMPv1 and SNMPv2) </li> <li>RFC2271, RFC2273 (SNMP std MIBs) </li> <li>the Mnesia User's Guide </li> <li>the Erlang 4.4 Extensions User's Guide </li> <li>the Reference Manual </li> <li>the Erlang Embedded Systems User's Guide </li> <li>the System Architecture Support Libraries (SASL) User's Guide </li> <li>the Installation Guide </li> <li>the Asn1 User's Guide </li> <li>Concurrent Programming in Erlang, 2nd Edition (1996), Prentice-Hall, ISBN 0-13-508301-X. </li> </ul> </div> <div class="footer"> <hr> <p>Copyright © 1997-2011 Ericsson AB. All Rights Reserved.</p> </div> </div> </div></body> </html>