SNMP Management Information
Download
Report
Transcript SNMP Management Information
SNMP Management Information
Prof. Choong Seon HONG
Kyung Hee
University
1
SNMP Management Information
Database contains information about the elements to be managed : MIB
Each resource to be managed is represented by object
MIB : structured collection of such object having the form of tree
Structure of Management Information (SMI)
Specified in RFC 1155
Providing a standardized technique for defining the structure of a particular
MIB
Providing a standardized technique for defining individual objects, including
the syntax and the value of each object
Providing a standardized technique for encoding object values
SMI Data Type Additions To Structure of Management Information Version 2
(SMIv2) And Structure of Management Information Version 1 (SMIv1) : draftperkins-smi-addition-00.txt
The new data types are Integer64, Unsigned64, Float, Double, and DiscUnion
(discriminated union)
Kyung Hee
University
2
Defining objects
MIB (Management Information Base)
a precise definition of the information accessible through a network
management protocol
each device must use the format for displaying information that is
defined by the MIB
RFC 1052
define an extended MIB for use with SNMP and CMIS/CMIP
is no longer realistic
RFC 1065: “Structure and Identification of Management Information
for TCP/IP based Internets (SMI)”
describe the syntax and type of information available in the MIB for TCP/IP
networks
RFC 1066
use the rules of the SMI
present the first version of the MIB for TCP/IP
known as MIB-I
Kyung Hee
University
3
Defining objects
RFC 1155 (SMI)
RFC 1065 later was adopted by the IAB as a full standard
four primitive data type
– INTEGER
• 32bit value in two’s complement representation
• -2147483648 ~ 2147483647
– OCTET STRING
• zero or more octets
• 0 ~ 255
• represent a text string
– OBJECT IDENTIFIER
• a sequence of integers
• traverse a hierarchical MIB tree
– NULL
Kyung Hee
University
4
MIB Structure
Leaf objects of the tree to be actual managed objects to represent
some resource, activity, or related information
Object identifier : a unique identifier for particular object type
Serving as name the object
internet OBJECT IDENTIFIER :: = { iso (1) org(3) dod (6) 1}
therefore, internet node’s object ID : 1.3.6.1
four nodes under the internet node
directory
mgmt ----> mib-1, mib-2
experimental
private
MIB tree (see fig. 5.1)
Kyung Hee
University
5
Object Syntax
Universal types
UNIVERSAL class of ASN.1 consisting of application-independent data
types for defining MIB objects
integer (UNIVERSAL 2)
octetstring (UNIVERSAL 4)
null (UNIVERSAL 5)
object identifier (UNIVERSAL 6)
sequence, sequence-of (UNIVERSAL 16)
Object ID consisting of sequence of integers
for example : object ID for tcpConnTable : 1.3.6.1.2.1.6.13
iso org dod internet mgmt mib-2
tcp
1
6
3
Kyung Hee
University
6
1
2
1
tcpConnTable
13
6
Object Syntax
Application-wide Types
APPLICATION class of ASN.1 consisting of data types that are relevant
to a particular application
application wide data types defined in RFC 1155
networkaddress : defined using CHOICE construct, ex) IP Address
ipaddress : 32-bit address using the format specified in IP
counter : non-negative integer that may be increamented but not
decremented with maximum value of 2 23 - 1. If the counter reaches its
maximum, it wraps around and starts from zero
gauge : non-negative integer that may increase or decrease with maximum
value of 2 23 -1. If the counter reaches its maximum, it remains its value.
Timeticks : counting the time since some epoch in second (relative timer
to some event such as startup or reinitialization)
opaque : supporting the capability to pass arbitrary data : specifying
octets of binary information, no limit to maximum number of octets :
encoded as OCTET STRING
Kyung Hee
University
7
Macro object definition
Object : having a type (syntactic description) and value
To extend ASN.1 to define new types and their values
Macro definition : specifying the syntax of a set of related types
Macro instance : an instance generated from a specific macro
definition
Macro instance value : representing a specific entity with a specific
value
Macro used for the SNMP MIBs : RFC1155 for MIB-I, RC 1212
(concise MIB definitions) for MIB-II (Fig. 5.3)
Kyung Hee
University
8
MIB Object Definition Format
SYNTAX : ASN.1 syntax for object’s abstract data structure
ACCESS : defining the way in which an instance of the object may be
accessed, via SNMP or another protocol - read-only or read-write or writeonly or not-accessible
STATUS : current implementation status - mandatory or optional, or
deprecated or obsolete
DescrPart : a textual description of the semantics of the object type
(optional)
ReferPart : a textual cross-reference to an object defined in some other
MIB module (optional)
IndexPart : used in defining tables
DefValPart : defining an acceptable default value that may be used when
an object instance is created (optional)
Kyung Hee
University
9
MIB Object Definition Format
OBJECT-TYPE macro (see Fig. 5.3)
A formal template for defining the objects that will consists MIB
ASN.1 module syntax (refer Fig. 5.4)
module : containing specific RFC
<< module>> DEFINITIONS :: = BEGIN
<<linkage>>
<<declarations>>
END
Structure of Management Information (RFC 1155, see Fig. 5.4)
An Example of an Object Type Definition (Figure 5.5)
Kyung Hee
University
10
Defining Tables
The SMI supports only one form of structuring of data: a simple
two-dimensional table with scalar-valued entries.
Definition of tables involves the use of the sequence and
sequence-of ASN.1 types and the IndexPart of the OBJECT-TYPE
macro.
Object type tcpConnTable (Figure 5.7) (See APPENDIX 5A)
consisting of a SEQUENCE OF TcpConnEntry
each row consists of a SEQUENCE
MIB specification of TCP connection table (RFC 1213)
See Figure 5.6
The overall table consists of a SEQUENCE OF TcpConnEntry
Each row consists of a SEQUENCE that includes five scalar elements
Kyung Hee
University
11
TCP Entity State Summary
Kyung Hee
University
12
TCP Entity State Summary (cont’d)
Server
Client
Unusual
Input / Output
Kyung Hee
University
Now connection is closed in one direction.
13
Defining Tables
The entire table represents a single instance of the object type
tcpConnTable.
Each row is an instance of the object type tcpConnEntry.
Kyung Hee
University
14
Private MIBs
MIB has been designed to accommodate growth and to provide
flexibility for adding new objects.
Private extensions can be added to the private subtree (Figure 5.1)
The management station must be loaded with the private MIB
structure
The potential for difficulty arises when the two are from different
vendors
Most vendors supply both a text version and a formal description of
their MIB extensions
But, vendors can use different formats as follows
- The original SNMP SMI specification, RFC 1155
- The newer Concise MIB Format, RFC 1212
- The OSI SMI specification
Kyung Hee
University
15
SNMP V2
SNMPv2
Additional types
Integer32
Counter32
Gauge32
Unsigned32
Counter64
Kyung Hee
University
16
SNMP Overview
RFC 1156
allow for expansion of the MIB for vendor specific enhancement
RFC 1158
propose a second MIB (MIB-II)
extend the information base defined in MIB-I
Note: most network devices have software agent that support MIB-II and their own
private extensions
Each MIB would focus on a specific technology
RFC 1743: IEEE 802.5 Token Ring Interface type MIB
RFC 1757: Remote Network Monitoring MIB (RMON)
RFC 1513: FDDI Interface type MIB
RFC 1493: Bridge MIB
Kyung Hee
University
17
SNMP Overview
Object Identifier
ISO ASN.1 (Abstract Syntax Notation One) Syntax
a subset of ASN.1 defines the syntax for the MIB
use the tree architecture to organize all available information
–
labeled node
–
object identifier (OID) and sort text description
Root
Node (1)
Node (2)
Subtree
Node (1)
Node (2)
Node A (1)
Object (2)
Object (1)
Kyung Hee
University
Object A (1)
OID: 1.2.1.1 or
{node A 1}
18
SNMP Overview
Traversal of the MIB tree
root node
–
itu-t (0), administered by the ITU-T
–
iso (1), administered by the ISO
–
joint-iso-itu-t (2), jointly administered by ISO and ITU-T
•
internet: OID= 1.3.6.1 or {iso org(3) dod(6), 1}
ITU-T(0)
ISO(1)
joint-ISO-ITU-T (2)
…. org(3) …..
….. dod(6) …..
….. internet (1) …..
directory(1)
……
mgmt(2) ….
mib(1)
Kyung Hee
University
Experimental(3)
private(4)
enterprises(1)
19
SNMP Overview
directory (1)
–
reserved for future use
mgmt(2)
–
MIB-I originally assigned OID 1.3.6.1.2.1 or {mib 1}
–
MIB-I has been superseded by MIB-II
–
system(1): network device operating system
–
interfaces(2): network interface specific
–
address translation(3): address mappings
–
ip(4): Internet protocol specific
–
icmp(5): ICMP specific
–
tcp(6): transmission protocol specific
–
udp(7): user datagram protocol specific
–
egp(8): exterior gateway protocol specific
–
cmot(9): CMIP on TCP specific
–
transmission(10): transmission media specific
–
snmp(11): SNMP specific
Kyung Hee
University
20
SNMP Overview
experimental (3)
–
experimental protocols and MIB development intended to enter the standards
track
private(4)
–
used to specify objects defined unilaterally
–
enterprises(1) or {private 1}
•
•
•
an organization that has registered its own specific extensions to the MIB
vendor-specific MIBs are found
OID (1.3.6.1.4.1)
OIDs represent each manageable object with a unique sequence of numbers
and names
SNMP uses the number as an abbreviated form of the name
–
to make requests for data values
–
to identify each response that carries the values
Kyung Hee
University
21
SNMP Overview
The five SNMPv1message types (RFC1157)
Get-Request: retrieve information from device
Get-Response: agent responds to the Get-Request
Get-Next-Request: ask for the next specific object
Set-Request: for remote configuration parameter
Trap: an unsolicited message
Data Network
Managing host
station
MS-DOS
agent
agent
Host
Kyung Hee
University
agent
Terminal server
Router
agent
agent
Device
22
SNMP Overview
Format of SNMP
Version
Version
Version
Kyung Hee
University
Community
Community
Community
PDU
Request
0
Name X
0
type
ID
Get-Request, Get-Next-Request, Set-Request
PDU
type
PDU
type
Request Error
ID
status
Get-Response
Enterprise
Error
index
Agent Generic
addr
trap
Trap
Layer 7
SNMP
Layer 6
ISO presentation
Layer 5
ISO session
Layer 4
UDP
Layer 3
IP
Layer 2
ISO data link
Layer 1
Physical
Name X
Value X
……..
Value X
……...
Specific Time Name X Value X
trap
23
SNMP Overview
SNMP trap
an unsolicited message an agent sends to a station
inform the server about the occurrence of specific event
seven types of SNMP traps (MIB-II)
–
coldstart of a system: reinitialing itself such that its configuration or protocol
has changed
–
warmstart of a system: reinitialing itself such that its configuration or protocol
has not changed
–
link down: a specific link has failed
Managing host
Data Network
station
Device
agent
Link failure
Trap: interface #2, link down
Kyung Hee
University
24
SNMP Overview
–
link up: a specific link has come up
–
failure of authentication: a request does not provide proper authentication
–
EGP (Exterior Gateway Protocol) neighbor loss
• EGP is a reachability protocol used between data networks
–
enterprise specific
• a vendor to provide additional functionality that complements the generic traps
security
community string
–
station sends a particular password with each message
–
the password is referred to as the SNMP community string
Kyung Hee
University
25
SNMP Overview
Examples of an SNMP query
Managing host
station
Device
agent
Community
string: blee
SNMP Get, community string = blee
Communication string validated, SNMP Get-Response
Community string: blee
Managing host
Data Network
station
Device
agent
SNMP Set, community string= public
SNMP Trap, authentication failure
Kyung Hee
University
26