SNMP



   SNMP provides a distributed model that uses managed-object schema definitions (MIBs) on remote devices. Instances of managed objects can be retrieved from agents on remote network elements.

SNMP Network management consists of 3 pieces:

  • A Management Information base (MIB)
  • That specifies what variables the network element maintains:
    • RFC 1066 - Management Information Base for Network Management of TCP/IP-based internets
    • RFC 1156 - Management Information Base for Network Management of TCP/IP-based internets: a re-release of RFC 1066
    • RFC 1212 - Concise MIB Definitions
    • RFC 1213 - Management Information Base for Network Management of TCP/IP-based internets: MIB-II
  • A set of common structures and an identification scheme used to reference the variable in MIB.
  • This is called the Structure of Management Information (SMI). Abstract Syntax Notation 1 (ASN.1) is a formal language for describing data and the properties of the data.
    • RFC 1065 - Structure and Identification of Management Information for TCP/IP-based internets
    • RFC 1155 - Structure and Identification of Management Information for TCP/IP-based Internets: a re-release of RFC 1065
  • The protocol between the manager and the element
  • This is called the SNMP:
    • RFC 1067 - A Simple Network Management Protocol
    • RFC 1157 - A Simple Network Management Protocol (SNMP)


The principal components of SNMP are:
  • Agents
  • Managers
  • MIBs
  • A communications protocol

The MIB defines the syntax (type and structure) and semantics of the managed objects. SNMP managers and agents exchange managed object instances using the SNMP protocol.

The SNMPv3 standard replaces the terms agent and manager with entity.

The MIB



Managed objects are accessed via a virtual information store, termed the Management Information Base or MIB.
A MIB is simply a managed-object data description.

ASN.1

ASN.1 is the acronym for Abstract Syntax Notation One, a language for describing structured information; typically, information intended to be conveyed across some interface or communication medium.

Abstract Syntax Notation One (ASN.1) Recommendations:

  • X.680 (11/08) Information technology - Abstract Syntax Notation One (ASN.1): Specification of basic notation
  • X.681 (11/08) Information technology - Abstract Syntax Notation One (ASN.1): Information object specification
  • X.682 (11/08) Information technology - Abstract Syntax Notation One (ASN.1): Constraint specification
  • X.683 (11/08) Information technology - Abstract Syntax Notation One (ASN.1): Parameterization of ASN.1 specifications
  • X.690 (11/08) Information technology - ASN.1 encoding rules: Specification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) and Distinguished Encoding Rules (DER)
  • X.691 (11/08) Information technology - ASN.1 encoding rules: Specification of Packed Encoding Rules (PER)
  • X.692 (11/08) Information technology - ASN.1 encoding rules - Specification of encoding control notation (ECN)
  • X.693 (11/08) Information technology - ASN.1 encoding rules: XML encoding rules (XER)
  • X.694 (11/08) Information technology - ASN.1 encoding rules: Mapping W3C XML schema definitions into ASN.1
  • X.695 (11/08) Information technology - ASN.1 encoding rules: Registration and application of PER encoding instructions

ASN.1 notation is recognisable as a high level definition language.

The notation provides a certain number of pre-defined basic types such as:

  • integers (INTEGER),
  • booleans (BOOLEAN),
  • character strings (IA5String, UniversalString...),
  • bit strings (BIT STRING),
  • etc.,
and makes it possible to define constructed types such as:
  • structures (SEQUENCE),
  • lists (SEQUENCE OF),
  • choice between types (CHOICE),
  • etc.

RFC 1212, the Concise MIB Definition, which defines how MIB files are written.


SMI


The Structure of Management Information Version 1 (SMIv1, RFC 1155)  defines precisely how managed objects are named and specifies their associated datatypes.
The Structure of Management Information Version 2 (SMIv2, RFC 2578) provides enhancements for SNMPv2.

Every object definition has the following format:

OBJECT-TYPE

              SYNTAX

              ACCESS

              STATUS

              DESCRIPTION

                        "Textual description describing this particular managed object."

              ::= { }

Here’s the syntax of an object definition for SMIv2. The changed parts are in bold:

OBJECT-TYPE

               SYNTAX

                UnitsParts

                MAX-ACCESS

                STATUS

                DESCRIPTION

                         "Textual description describing this particular managed object."

                AUGMENTS { }

                 ::= { }

Managed objects may be defined using what are called textual conventions.

All SMIv2 MIB objects have a number of common attributes, including:

  • SYNTAX: The SYNTAX attribute provides for definitions of managed objects. The supported datatypes for SMIv1:
    • INTEGER
    • OCTET STRING
    • Counter
    • OBJECT IDENTIFIER
    • NULL
    • SEQUENCE
    • SEQUENCE OF
    • IpAddress
    • NetworkAddress
    • Gauge
    • TimeTicks
    • Opaque


  • MAX-ACCESS: This specifies the accessibility of the object. For example, read-only means that the object can only be read (but not written) by managers.
  • STATUS: This is the state of support for the object in the MIB. For example, current means that the object is relevant and can or should be supported.
  • DESCRIPTION: This is a text description of the object.
  • DEFVAL: This is a default value that the agent can use when the object instance is first created.
  • OBJECT IDENTIFIER: This is the unique name for a MIB object. An object ID is made up of a series of integers based on the nodes in the tree, separated by dots (.).

All MIB objects have unique names called object identifiers (OIDs). An OID is a sequence of 32-bit

unsigned integers that represents a node within a tree-based structure (with a single root).

Only an instance of a MIB object can be retrieved from an agent. An instance of a MIB object is

identified by an OID concatenated with the instance value. The instance value is a sequence of

one or more 32-bit unsigned integers.

All objects can be traced from the root in a process called walking the MIB. During a walk, each branch of the MIB tree is traversed from left to right starting at the root.

MIBs are plain-text files. They are compiled into the agent source code and become part of the

executable file.

The SNMP Agent

SNMP agents are the entities that reside on managed devices. They listen on UDP port 161 for incoming SNMP messages; they use UDP port 162 for sending notification messages. Agents are the workhorses of management and provide the following functionality:
  • Implementing and maintaining MIB objects
  • Responding to management operations such as requests
  • Generating notifications, both traps (unacknowledged) and informs (acknowledged)
  • Implementing security-SNMPv1 and SNMPv2c support community-based security with clear-text passwords; stronger security (authentication and encryption) is available with SNMPv3
  • Setting the access policy for external managers

The SNMP Manager


SNMP managers are the entities that interact with agents.

They provide the following functionality:

  • Getting and setting the values of MIB object instances on agents
  • Receiving notifications from agents
  • Exchanging messages with other managers

留言

熱門文章