950 likes | 961 Views
Explore the structure, models, and communication of SNMPv1, SNMPv2, and SNMPv3. Learn about SNMP documents, RFCs, MIBs, and network elements in this comprehensive guide to SNMP management.
E N D
Internet SNMP Management • Internet Engineering Task Force (IETF) • 1990 SNMPv1 • 1995 SNMPv2 • 1998 SNMPv3 • Internet documents: • Request for Comments (RFC) • IETF STD Internet Standard • FYI For your information http://www.ietf.org/ http://www.ietf.org/rfc.html http://www.ietf.org/rfc/rfcNNNN.txt
` SMIv2 RFC 2578 SMIv2 Conventions RFC 2579 SMIv2 Conformances RFC 2580 SNMPv2 Protocol Ops RFC 3416 SNMP MIB RFC 3418 SNMP MIB RFC 3418 SNMP MIB RFC 3418
SNMP Model • Organization Model • Relationship between network element, agent, and manager • Hierarchical architecture • Information Model • Uses ASN.1 syntax • SMI (Structure of Management Information • MIB (Management Information Base) • Communication Model • Transfer syntax • SNMP over TCP/IP • Communication services addressed by messages • Security framework community-based model
Three-Tier Organization Model: RMON • RMON • Remote Monitoring • RMON I • RMON II
SNMP System Architecture Network Elements (NEs) Management Station Host Router Manager Agent Agent SNMP SNMP SNMP Network Management Protocol . . . UDP UDP UDP IP IP IP 網路介面 網路介面 網路介面 SNMP Network
Get, Set, GetNext Request Get Response Trap SNMP Services • Four Services • Get, Set, GetNext, Trap • Five SNMP Messages • GetRequest, SetRequest, GetNextRequest, GetResponse, Trap Manager Agent(s)
Manager Manager Manager Manager Agent Agent Agent Agent SNMP Services Get Request Get GetNext Set Trap Get Response GetNext Request Get Response Set Request Get Response Trap Request
SNMP Services (cont.) • Get Request: • Retrieve the values of objects in the MIB of an agent. • Get-Next Request: • Retrieve the values of the next objects in the MIB of an agent. • Set Request: • Update the values of objects in the MIB of an agent. • Trap Request • Report extraordinary events to the manager.
4.7 Information Model • Structure of Management Information (SMI) (RFC 1155, RFC 1212) • Managed Object • Scalar • Aggregate or tabular object • Management Information Base (RFC 1213)
Managed Object Object Type Object Instance
Managed Object: Multiple Instances Object Type Object Instance
Object Name • Object is uniquely defined by • DESCRIPTOR • OBJECT IDENTIFIER
Internet Subnodes directory OBJECT IDENTIFIER ::= {internet 1} mgmt OBJECT IDENTIFIER ::= {internet 2} experimental OBJECT IDENTIFIER ::= {internet 3} private OBJECT IDENTIFIER ::= {internet 4}
root 0 2 1 iso ccitt joint-iso-ccitt 3 0 2 1 1.3.6.1.2.1 org reg authority std member body 6 dod 1 1.3.6.1.2.1.2 1.3.6.1.4.1 internet 1 4 3 2 mgmt directory private experimental 1 1 MIB II MIB II enterprises enterprises interface system 1 interface 2 at 3 Trans. 10 SNMP 11 IP 4 ICMP 5 TCP 6 UDP 7 EGP 8
Private MIB Example http://www.iana.org/ Enterprise Number http://www.iana.org/assignments/enterprise-numbers
Primitive Data Types • subtype: • INTEGER (0..255) • OCTET STRING (SIZE 0..255) • OCTET STRING (SIZE 8)
Enumerated • Special case of INTEGER data type
Constructor or Structured Data Type:SEQUENCE • List Marker SEQUENCE { <type1>, <type2>,…, <typeN> } IpAddrEntry ::= SEQUENCE { ipAdEntAddr IpAddress, ipAdEntIfIndex INTEGER, ipAdEntNetMask IpAddress, ipAdEntBcastAddr INTEGER, ipAdEntReasmMaxSize INTEGER (0..65535) }
Constructor or Structured Data Type:SEQUENCE OF SEQUENCE OF <entry> where <entry> is a list constructor ipAddrTable OBJECT-TYPE SYNTAX SEQUENCE OF IpAddrEntry ACCESS not-accessible STATUS mandatory DESCRIPTION "The table of addressing information relevant to this entity's IP addresses." ::= { ip 20 }
Example: IP Address Table • Each row (table entry) is a sequence: IpAddrEntry. • The ipAddrTable table is a sequence of rows (entries), i.e. a sequence of ipAddrEntry.
Encoding • Basic Encoding Rules (BER) • - Type, Length, and Value (TLV)
Type Tag OBJECT IDENTIFIER UNIVERSAL 6 SEQUENCE UNIVERSAL 16 IpAddress APPLICATION 0 Counter APPLICATION 1 Gauge APPLICATION 2 TimeTicks APPLICATION 3 Opaque APPLICATION 4 SNMPData Types and Tags
SMIv1, SMIv2 • SMIv1: • SMI (RFC 1155) • Concise MIB (RFC 1212) • Trap-Type (RFC 1215) • SMIv2: • SMIv2 (RFC 2578) • Textual Conventions (RFC 2579) • Conformance Statements (RFC 2580)
Object-Type Macro (RFC 1155) OBJECT-TYPE MACRO ::= BEGIN TYPE NOTATION ::= "SYNTAX" type (TYPE ObjectSyntax) "ACCESS" Access "STATUS" Status VALUE NOTATION ::= value (VALUE ObjectName) Access ::= "read-only" | "read-write" | "write-only | "not-accessible" Status ::= "mandatory" | "optional" | "obsolete" END
OBJECT-TYPE MACRO (RFC1212) OBJECT-TYPE MACRO ::= BEGIN TYPE NOTATION ::= "SYNTAX" type(ObjectSyntax) "ACCESS" Access "STATUS" Status DescrPart ReferPart IndexPart DefValPart VALUE NOTATION ::= value (VALUE ObjectName) ObjectName ::= OBJECT IDENTIFIER
OBJECT-TYPE Example sysLocation OBJECT-TYPE SYNTAX DisplayString (SIZE (0..255)) ACCESS read-write STATUS mandatory DESCRIPTION "The physical location of this node (e.g., `telephone closet, 3rd floor')." ::= { system 6 } DisplayString ::= OCTET STRING (SIZE (0..255)) Go to Next Example
"SYNTAX" type(ObjectSyntax) ObjectSyntax ::= CHOICE { simple SimpleSyntax, application-wide ApplicationSyntax } SimpleSyntax ::= CHOICE { number INTEGER, string OCTET STRING, object OBJECT IDENTIFIER, empty NULL } ApplicationSyntax ::= CHOICE { address NetworkAddress, counter Counter, gauge Gauge, ticks TimeTicks, arbitrary Opaque } Back to OBJECT TYPE
ApplicationSyntax 0 .. 232-1 NetworkAddress ::= CHOICE { internet IpAddress } IpAddress ::= [APPLICATION 0] IMPLICIT OCTET STRING (SIZE (4)) Counter ::= [APPLICATION 1] IMPLICIT INTEGER (0..4294967295) Gauge ::= [APPLICATION 2] IMPLICIT INTEGER (0..4294967295) TimeTicks ::= [APPLICATION 3] IMPLICIT INTEGER (0..4294967295) Opaque ::= [APPLICATION 4] IMPLICIT OCTET STRING Back to OBJECT TYPE
"ACCESS" Access "STATUS" Status Access ::= "read-only" | "read-write" | "write-only" | "not-accessible Status ::= "mandatory" | "optional" | "obsolete" | "deprecated" Back to OBJECT TYPE
DescrPart DescrPart ::= "DESCRIPTION" value (description DisplayString) | empty ReferPart ::= "REFERENCE" value (reference DisplayString) | empty ReferPart Back to OBJECT TYPE
DefValPart DefValPart ::= "DEFVAL" "{" value (defvalue ObjectSyntax) "}" | empty ifNumber OBJECT-TYPE SYNTAX INTEGER ACCESS read-only STATUS mandatory DEFVAL 1 DESCRIPTION "The number of network interfaces (regardless of their current state) present on this system.“ ::= { interfaces 1 } Example: Back to OBJECT TYPE
IndexPart IndexPart ::= "INDEX" "{" IndexTypes "}" IndexTypes ::= IndexType | IndexTypes "," IndexType IndexType ::= value (indexobject ObjectName) | type (indextype) IndexSyntax ::= CHOICE { number INTEGER (0..MAX), string OCTET STRING, object OBJECT IDENTIFIER, address NetworkAddress, ipAddress IpAddress } Back to OBJECT TYPE
instance-identifier (INDEX) • integer-valued • 3 3 • string-valued, fixed-length strings • ‘004096563c2e’H 0.64.150.86.60.46 • string-valued, variable-length strings • “IIS Admin” 9.73.73.83.32.65.100.109.105.110 • object identifier-valued • 1.3.6.1.2 5.1.3.6.1.2 • NetworkAddress-valued • 163.22.20.16 1.163.22.20.16 • IpAddress-valued • 163.22.20.16 163.22.20.16
Index - variable-length string svSvcTable OBJECT-TYPE SYNTAX SEQUENCE OF SvSvcEntry ACCESS not-accessible STATUS mandatory DESCRIPTION "A list of service entries describing network services installed on this server.“ ::= { server 3 } svSvcEntry OBJECT-TYPE SYNTAX SvSvcEntry ACCESS not-accessible STATUS mandatory DESCRIPTION "The names of the network services installed on this server." INDEX { svSvcName } ::= { svSvcTable 1 } Back to OBJECT TYPE
OBJECT-TYPE Example dot1dBasePortEntry OBJECT-TYPE SYNTAX Dot1dBasePortEntry ACCESS not-accessible STATUS mandatory DESCRIPTION "A list of information for each port of the bridge." REFERENCE "IEEE 802.1D-1990: Section 6.4.2, 6.6.1" INDEX { dot1dBasePort } ::= { dot1dBasePortTable 1 }
Table of Objects List of Objects Objects Aggregate Object • A group of objects • Also called tabular objects • Can be represented by a table with • Columns of objects • Rows of instances
Aggregate M.O. Macro: Table Object ipAddrTable OBJECT-TYPE SYNTAX SEQUENCE OF IpAddrEntry ACCESS not-accessible STATUS mandatory DESCRIPTION "The table of addressing information relevant to this entity's IP addresses." ::= {ip 20}
Aggregate M.O. Macro: Entry Object ipAddrEntry OBJECT-TYPE SYNTAX IpAddrEntry ACCESS not-accessible STATUS mandatory DESCRIPTION "The addressing information for one of this entity's IP addresses." INDEX { ipAdEntAddr } ::= { ipAddrTable 1 } ipAddrEntry: OBJECT-TYPE IpaddrEntry: SYNTAX
Aggregate M.O. Macro: Entry Object IpAddrEntry ::= SEQUENCE { ipAdEntAddrIpAddress, ipAdEntIfIndex INTEGER, ipAdEntNetMask IpAddress, ipAdEntBcastAddr INTEGER, ipAdEntReasmMaxSize INTEGER (0..65535) }
Aggregate M.O. Macro: Columnar Objects • ipAdEntAddr OBJECT-TYPE • SYNTAX IpAddress • ACCESS read-only • STATUS mandatory • DESCRIPTION • "The IP address to which this entry's • addressing information pertains.” • ::= { ipAddrEntry 1 }