Roopavathy.S
Sep,2008
The SNMP Architecture
2 | Presentation Title | Month 2006 All Rights Reserved © Alcatel-Lucent 2006, #####
SNMP PROTOCOL
UDP UDP
IP IP
LINK LINK
3 | Presentation Title | Month 2006 All Rights Reserved © Alcatel-Lucent 2006, #####
SNMP Communities
4 | Presentation Title | Month 2006 All Rights Reserved © Alcatel-Lucent 2006, #####
SNMP Port
SNMP uses the UDP port 161 for sending and receiving requests
5 | Presentation Title | Month 2006 All Rights Reserved © Alcatel-Lucent 2006, #####
The structure of Management Information
The Structure of Management Information Version 1 (SMIv1, RFC 1155) does exactly that: it defines precisely how
managed objects are named and specifies their associated data types. The Structure of Management Information
The definition of managed objects can be broken down into three attributes:
Name
A managed object's datatype is defined using a subset of Abstract Syntax Notation One (ASN.1).
Encoding
A single instance of a managed object is encoded into a string of octets using the Basic Encoding Rules (BER). BER
defines how the objects are encoded and decoded so they can be transmitted over a transport medium such as
Ethernet.
6 | Presentation Title | Month 2006 All Rights Reserved © Alcatel-Lucent 2006, #####
OVERVIEW OF PDUs
7 | Presentation Title | Month 2006 All Rights Reserved © Alcatel-Lucent 2006, #####
MESSAGE & PDU STRUCTURE
variable bindings:
SNMP PDU:
* REQUEST ERROR ERROR
PDU TYPE ID STATUS INDEX VARIABLE BINDINGS
SNMP message:
8 | Presentation Title | Month 2006 All Rights Reserved © Alcatel-Lucent 2006, #####
GET
response
POSSIBLE ERRORS:
• noSuchName Object does not exist / Object is not a leaf
9 | Presentation Title | Month 2006 All Rights Reserved © Alcatel-Lucent 2006, #####
EXAMPLE MIB
1
10 | Presentation Title | Month 2006 All Rights Reserved © Alcatel-Lucent 2006, #####
GET EXAMPLES
get(1.1.0) response(1.1.0 => 130.89.16.2)
get(1.2.0)response(error-status = noSuchName)
get(1.1)response(error-status = noSuchName)
get(1.3.1.3.5.1)response(1.3.1.3.5.1 => 2)
get(1.3.1.1.5.1)response(1.3.1.1.5.1 => 5)
11 | Presentation Title | Month 2006 All Rights Reserved © Alcatel-Lucent 2006, #####
SET
response
• TABLE ROWS
POSSIBLE ERRORS:
• noSuchName
• badValue
• tooBig
• 12genErr
| Presentation Title | Month 2006 All Rights Reserved © Alcatel-Lucent 2006, #####
SET EXAMPLES
13 | Presentation Title | Month 2006 All Rights Reserved © Alcatel-Lucent 2006, #####
GET-NEXT
response
RETRIEVES THE INSTANCE NAME AND VALUE OF THE NEXT MIB ELEMENT
POSSIBLE ERRORS:
• tooBig
• genErr
14 | Presentation Title | Month 2006 All Rights Reserved © Alcatel-Lucent 2006, #####
GET-NEXT EXAMPLES
getNext(1.1.0)
getNext(1.2.1.0)
getNext(1)
response(1.1.0 => 130.89.16.2)
getNext(1.3.1.3.5.1)
response(1.3.1.3.5.2 => 3)
getNext(1.1.0)
getNext(1.2.1.0)
getNext(1)
response(1.1.0 => 130.89.16.2)
getNext(1.3.1.3.5.1)
response(1.3.1.3.5.2 => 3)
1.1.0 130.89.16.2
1.2.1.0 printer-1
1.2.2.0 123456
1.3.1.1.2.1 2
1.3.1.1.3.1 3
1.3.1.1.5.1 5
... ...
1.3.1.1.9.1 9
1.3.1.2.2.1 1
1.3.1.2.3.1 1
... ...
1.3.1.2.9.1 1
1.3.1.3.2.1 2
... ...
17 | Presentation Title | Month 2006 All Rights Reserved © Alcatel-Lucent 2006, #####
TRAP
manager agent
trap
TO SIGNAL AN EVENT
TRAP RECEPTION IS NOT CONFIRMED
(THUS UNRELIABLE)
POLLING REMAINS NECESSARY
AGENTS MAY BE CONFIGURED SUCH THAT:
• NO TRAPS WILL BE TRANSMITTED
18 | Presentation Title | Month 2006 All Rights Reserved © Alcatel-Lucent 2006, #####
DEFINED TRAPS
• COLDSTART
• WARMSTART
• LINKDOWN
• LINKUP
• AUTHENTICATION FAILURE
• EGPNEIGHBOURLOSS
• ENTERPRISESPECIFICTRAP
19 | Presentation Title | Month 2006 All Rights Reserved © Alcatel-Lucent 2006, #####
TRAP - PDU FORMAT
ENTERPRISE
AGENT-ADDRESS
GENERIC-TRAP
SPECIFIC-TRAP
TIME-STAMP
VARIABLE-BINDINGS
20 | Presentation Title | Month 2006 All Rights Reserved © Alcatel-Lucent 2006, #####
SNMPv2 PROTOCOL OPERATIONS
get set
MIB MIB
response response
getNext trap
MIB
response MIB
getBulk inform
MIB
response response MIB
21 | Presentation Title | Month 2006 All Rights Reserved © Alcatel-Lucent 2006, #####
GET
response
POSSIBLE EXCEPTIONS:
• noSuchObject
• noSuchInstance
22 | Presentation Title | Month 2006 All Rights Reserved © Alcatel-Lucent 2006, #####
GET EXAMPLES
get(1)
get(1.1)
get(1.1.9)
get(1.2)
response
POSSIBLE EXCEPTIONS:
• endOfMibView
EXAMPLE
getNext(1.4.0)
24 | Presentation Title | Month 2006 All Rights Reserved © Alcatel-Lucent 2006, #####
GET-BULK
response
NEW IN SNMPv2
IMPROVES PERFORMANCE!
25 | Presentation Title | Month 2006 All Rights Reserved © Alcatel-Lucent 2006, #####
GET-BULK
• non-repeators
• max-repetitions
26 | Presentation Title | Month 2006 All Rights Reserved © Alcatel-Lucent 2006, #####
GET-BULK
REQUEST(non-repeaters = N; max-repetitions = M;
VariableBinding-1; ... ; VariableBinding- N; VariableBinding- (N+1); ... ; VariableBinding- (N+R)
)
N-TIMES
RESPONSE(
VariableBinding-1; ... ; VariableBinding- N; VariableBinding-(N+1); ... ; VariableBinding- (N+R)
1st LEXICOGRAPHICAL SUCCESSOR VariableBinding- (N+1); ... ; VariableBinding- (N+R)
2nd LEXICOGRAPHICAL SUCCESSOR
VariableBinding- (N+1); ... ; VariableBinding- (N+R) M-TIMES
27 | Presentation Title | Month 2006 All Rights Reserved © Alcatel-Lucent 2006, #####
GET-BULK EXAMPLE
getBulk(max-repetitions = 4; 1.1)
response(
1.3.1.1.2.1 => 2 )
response(
)
28 | Presentation Title | Month 2006 All Rights Reserved © Alcatel-Lucent 2006, #####
SET
response
SIMILAR TO SNMPv1
29 | Presentation Title | Month 2006 All Rights Reserved © Alcatel-Lucent 2006, #####
NEW ERROR CODES FOR SETS
SNMPv1 SNMPv2
PHASE 1: badValue wrongValue
badValue wrongEncoding
badValue wrongType
badValue wrongLength
badValue inconsistentValue
noSuchName noAccess
noSuchName notWritable
noSuchName noCreation
noSuchName inconsistentName
genErr resourceUnavailable
genErr genErr
30 | Presentation Title | Month 2006 All Rights Reserved © Alcatel-Lucent 2006, #####
TRAP
SNMPv1:
• COLD START• WARM START• LINK DOWN• LINK UP• AUTHETICATION FAILURE
SNMPv2:
• MIBs MAY NOW INCLUDE NOTIFICATION TYPE MACROS
31 | Presentation Title | Month 2006 All Rights Reserved © Alcatel-Lucent 2006, #####
EXAMPLE OF NOTIFICATION TYPE MACRO
linkUp NOTIFICATION-TYPE
OBJECTS {ifIndex}
STATUS current
DESCRIPTION "A linkUp trap signifies that the entity
has detected that
the ifOperStatus
object has
changed to Up"
::= {snmpTraps 4}
32 | Presentation Title | Month 2006 All Rights Reserved © Alcatel-Lucent 2006, #####
INFORM
Response
CONFIRMED TRAP
33 | Presentation Title | Month 2006 All Rights Reserved © Alcatel-Lucent 2006, #####
REPORT
manager agent
report
34 | Presentation Title | Month 2006 All Rights Reserved © Alcatel-Lucent 2006, #####