ch23_SNMP
-
Upload
oadipphone7031 -
Category
Documents
-
view
213 -
download
0
Transcript of ch23_SNMP
-
8/12/2019 ch23_SNMP
1/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
23-1
Chapter 23
Simple Network
Management Protocol
(SNMP)
-
8/12/2019 ch23_SNMP
2/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
23-2
Components of Network Management
SNMP is a framework for managing devices in an internet using the TCP/IP
protocol suite. The framework can be used in a heterogeneous environment
made up of devices with various technologies and from various vendors.
Components of TCP/IP Network Management:
ManagementInformation Base
Structure ofManagement
Information
The protocol
-
8/12/2019 ch23_SNMP
3/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
23-3ASN.1
From the networks perspective, application programs send messages to each
other in a form of uninterpreted byte strings. From the application perspectivethese messages contain various kinds of data (arrays of integers, video frames,
lines of text, digital images, sound tracks) that have some meaning. The
problem is how to encode the data so that applications on the both sides of
network are able to see the same data, i.e. understand their meaning. Anotherproblem, is how to make this representation efficient. One way to achieve
efficiency is to remove redundancies from data by compression. In addition, the
data encoding (sometimes called: argument marshalling) must be language and
platform independent. An important aspect of argument marshalling is the issueof byte ordering.
A popular standard for data representation is Abstract Syntax Notation One
(ASN.1)
SMI module is based on ANS.1 (Abstract Syntax Notation One)
and BER (Basic Encoding rules). Therefore the following slides discuss thesetwo standards.
-
8/12/2019 ch23_SNMP
4/48McGraw-Hill The McGraw-Hill Companies, Inc., 2000
23-4
Intelligent network
GSM
UMTS (3G cell phones)
Voice over IPVideoconference (Microsoft NetMeeting )
Interactive television
Secured electronic transaction: e-commerce, m-commerce
Computer-supported telecommunications applications (CSTA)
SNMP
Some areas in telecom industry that use ANS.1:
ASN.1 (cont.)
-
8/12/2019 ch23_SNMP
5/48McGraw-Hill The McGraw-Hill Companies, Inc., 2000
23-5ASN.1 (cont.)
ASN.1 is a formal notation used for describing data transmitted by
telecommunications protocols, regardless of language implementation and
physical representation of these data.
ASN.1 is defined originally by CCITT (now ITU-T) in 1984
ISO (1985) has split the original ASN.1 into:
ASN.1 - Abstract Syntax Notation, and
BER - Basic Encoding Rules
-
8/12/2019 ch23_SNMP
6/48McGraw-Hill The McGraw-Hill Companies, Inc., 2000
23-6
Examples of some pre-defined basic types:
INTEGER (integer values),
BOOLEAN (Boolean values),
OBJECT IDENTIFIER(name of an information object)IA5String (string of US ASCII characters ),
UniversalString (character strings)
BIT STRING (bit strings of arbitrary length),
OCTET STRING (bit strings whose length is multiple of 8),NumericString (string of digits and spaces)
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
and aggregated (constructed) types:SEQUENCE (structures),
SEQUENCE OF (arrays, lists),
CHOICE (choice between types)
SET (an unordered collection of variables of different type)SET OF (an unordered collection of variables of the same type)
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
ASN.1 (cont.)In order to describe data ANS.1 uses predefined (simple and aggregated) datatypes, and syntax for construction of new types.
-
8/12/2019 ch23_SNMP
7/48McGraw-Hill The McGraw-Hill Companies, Inc., 2000
23-7
AirlineFlight ::= SEQUENCE {
airline IA5String,
flight NumericString,
seats SEQUENCE {
maximum INTEGER,
occupied INTEGER,vacant INTEGER},
airport SEQUENCE {
origin IA5String,
stop1 [0] IA5String OPTIONAL,
stop2 [1] IA5String OPTIONAL,destination IA5String},
crewsize ENUMERATED {
six (6),
eight (8),
ten (10)},cancel BOOLEAN DEFAULT FALSE
}
Example of a type assignment (new type definition):
Example of a value assignment (an instance of typeAirlineFlight):
f1106 ::= {"American","1106",{320, 107, 213},{"BWI","LAX"},10 }
ASN.1 (cont.)
The value for cancel is not
supplied, therefore the
default value (FALSE) isassumed
23 8
-
8/12/2019 ch23_SNMP
8/48McGraw-Hill The McGraw-Hill Companies, Inc., 2000
23-8
ASN.1:
PersonalInfo ::= SEQUENCE {
married BOOLEAN,
age INTEGER (123456..124000),
name PrintableString}
Would generate in C:
typedef struct PersonalInfo {
boolean married;int age;
char *name;
} PersonalInfo;
Example of decoding from ANS.1 to C:
ASN.1 (cont.)
23 9ASN 1 ( t )
-
8/12/2019 ch23_SNMP
9/48McGraw-Hill The McGraw-Hill Companies, Inc., 2000
23-9
Object Identifiers
ASN.1 (cont.)
Object identifiers are globally unique authoritatively assigned names of variables
(objects) that can be remotely referenced (retrieved, changed, monitored). Since
there are millions of such variables used in various areas (standards, internet,
variables recognizable by networking devices, etc.) the names are hierarchicallystructured (similarly as file names in a file system, or domain names in DNS).
According to ASN.1 the names are represented as sequence of integers separated
with dots, for example:
DescriptionObject NameObject Identifier
A counter that shows the total number
of received UDP datagrams for which
there was no application at thedestination port
udpNoPorts1.3.6.1.2.1.7.2
A counter that shows the total number
of input datagrams successfullydelivered to IP user protocols
ipInDelivers1.3.6.1.2.1.4.9
23 10
-
8/12/2019 ch23_SNMP
10/48McGraw-Hill The McGraw-Hill Companies, Inc., 2000
23-10
1.3.6.1.2.1.7.1
ISOISO-ident. Org.
US DoD
Internet
udpInDatagramsUDP
MIB2
management
Object Identifiers (cont.)
The numbers in OID represent authorities responsible for assigning the
subsequent numbers and names. For example:
23 11Obj Id ifi ( )
-
8/12/2019 ch23_SNMP
11/48McGraw-Hill The McGraw-Hill Companies, Inc., 2000
23-11
iso(1)
org(3)
dod(6)
mgmt(2)
ccitt(0) joint-iso-ccitt(2)
root
directory(1)experimental(3)
internet(1)
1.3.6.1
1.3.6.1.2.1
private(4)
mib(1)
enterprises(1)
system(1)
...interfaces(2)
... at(3)
...
ip(4)
...icmp(5)
...tcp(6)
...
udp(7)
...
Object Identifiers (cont.)
The ASN.1 OID hierarchy:
egp(8)
...
snmp(11)
...
23 12
-
8/12/2019 ch23_SNMP
12/48McGraw-Hill The McGraw-Hill Companies, Inc., 2000
23-12
mib(1)
udp(7)
udpInDatagrams(1)
udpNoPorts(2)udpOutDatagrams(4)
udpTable(5)
udpEntry(1)
udpLocalAddress(1) udpLocalPort(2)
1.3.6.1.2.1.7
system(1)...
snmp(11)
udpInErrors(3)
Object Identifiers (cont.)
1.3.6.1.2.1.7.5
1.3.6.1.2.1.7.5.1.1
23-13BER
-
8/12/2019 ch23_SNMP
13/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
23-13
Basic Encoding Rules (BER)
BER
In order to make the data described by ASN.1 syntax ready for transmission
over the network, they have to be encoded by the rules that can be understoodby both, sender and receiver. BER (which is part of ASN.1) specifies that
each piece of data be encoded in a triplet:
{tag, length, value}
Aggregated data types (structures, arrays) are constructed by nesting of simple
types:
{tag, length, tag, length, value,. . . , tag, length, value}
23-14BER (cont )
-
8/12/2019 ch23_SNMP
14/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
23 14BER (cont.)
50500101000NULL
. . . . . . . . .
30
06
04
02
Tag (Hex)
600110000OBJECT IDENTIFIER
4810000100SEQUENCE
. . . . . . . .. . . . . . .. . . . . . .. . . . . .. . . . . . . . . . . . . . . . . . . . .
400100000OCTET STRING
200010000INTEGER
Tag (Dec)NumberFormatClassData Type
00 Universal (ANS.1)
01 Application wide (like SMI)10 Context specific (the meaning can change from protocol to protocol)11 Private (vendor specific)
23-15BER (cont )
-
8/12/2019 ch23_SNMP
15/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
23 15
Example: INTEGER 14
Example: ObjectIdentifier 1.3.6.1
Example: OCTET STRING HI
BER (cont.)
23-16BER (cont )
-
8/12/2019 ch23_SNMP
16/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
BER (cont.)
Encoding rules are applied at the presentation layer
23-17PER
-
8/12/2019 ch23_SNMP
17/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
PER
Packet Encoding Rules
PER is very compressed encoding based on ANS.1 type information.
Like BER, PER specifies how data should be encoded for transmission,
independently of machine type, programming language, or representationwithin an application program.
Unlike BER, tags are never transmitted, while lengths and values are not
transmitted if known by both peers.
PERs reason for existence is to conserve bandwidth. It is valuable in audio
and video over the Internet, air-ground communication, radio-paging, or
wherever bandwidth is critical.
PER is used in H.323 multimedia standard.
23-18PER (cont )
-
8/12/2019 ch23_SNMP
18/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
Age ::= INTEGER (0..7)
firstGrade Age ::= 6
PER (cont.)
Application 1 Application 202 01 06
Value
Length
Tag
}Total of
24 bits
Application 1 Application 2110
total length of 3 bits
BER
PER
23-19SMI
-
8/12/2019 ch23_SNMP
19/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
SMI
ASN.1 is a huge and complex grammar mechanism. SNMP seeks to simplify to
a smaller set of types/constructs and macros in order to facilitate theinteroperability between managers/agents.
Therefore SMI defines a subset of ASN.1. The retained types are:INTEGER
OCTET STRING
OBJECT IDENTIFIER
NULL
SEQUENCE, SEQUENCE OF
SMI also adds some new types (see next slide for definitions):NetworkAddress
IpAddress
CounterGauge
TimeTicks
Opaque
SMI is recommended in RFC 1155, May 1990
23-20SMI (cont )
-
8/12/2019 ch23_SNMP
20/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
SMI (cont.)
An address from one of possibly several protocol families.
It is represented as CHOICE. Currently, only one protocol
family, the Internet family, is present in this CHOICE.
NetworkAddress
A non-negative integer, which may increase or decrease,
but which latches at a maximum value. Maximum value is2^32-1 = 4294967295.
Gauge
A non-negative integer which counts the time in 1/100th of
a second since some epoch.TimeTicks
Uninterpreted stringOpaque
Non-negative integer which monotonically increases until
it reaches a maximum value, when it wraps around andstarts increasing again from zero. (maximum value is 2^32-
1 = 4294967295).
Counter
32-bit internet address. It is represented as an OCTET
STRING of length 4, in network byte-order.IpAddress
DescriptionNew Type
Added types (in SMIv.1):
23-21SMI (cont )
-
8/12/2019 ch23_SNMP
21/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
SMI v.2 is adding new simple types:
integer32
unsigned32
counter32
counter64
gauge32
SMI (cont.)
23-22MIB
-
8/12/2019 ch23_SNMP
22/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
MIB
Administrative name of the system, name of the
contact person, the system description, etc..
The type of technology for each interface, the estimate
of current bandwidth, the interface state, statistics
about incoming and outgoing traffic ,
The Address Translation Table, contains the address
mappings (physical address, network address )
deprecated
Configurations and statistics variables relevant to
protocols IP, ICMP, TCP, UDP and EGP
Variables that count incoming and outgoing SNMPmessages (get-request, get-next-request, set-request, get-
response and trap)
MIB is a formal description of a set of network objects that
can be managed using SNMP. Each object in MIB contains aunique identifier, objects type (INTEGER,), objects
access level (read, read/write), size restrictions and range
information. Objects in MIB are divided into several groups.
23-23MIB (cont )
-
8/12/2019 ch23_SNMP
23/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
MIB (cont.)
sysService
sysLocation
sysName
sysContact
sysUpTime
sysObjectID
sysDescr
System Group (1.3.6.1.2.1.1.x)
7
6
5
4
3
2
1
atIfIndexatPhysAddressIfIndex
atNetAddress
1.1
1
AT Group (1.3.6.1.2.1.3.x)
1.1.3
1.1.21.1.1
atTable
atEntry
23-24MIB (cont.)
-
8/12/2019 ch23_SNMP
24/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
ifAdminStatus
ifOperStatus
ifLastChange
ifInOctets
ifInUcastPkts
ifPhysAddress
ifSpeedifMtu
ifType
ifDescr
ifIndex
Interface Group (1.3.6.1.2.1.2.x)
2.1.11
2.1.10
2.1.9
2.1.8
2.1.7
2.1.6
2.1.52.1.4
2.1.3
2.1.2
2.1.1
ifInNUcastPkts
ifInDiscards 2.1.13
2.1.12
ifInErrors
ifInUnknownProtos
ifOutQLen
ifSpecific
ifOutErrors
ifOutDiscardsifOutNUcastPkts
ifOutUcastPkts
ifOutOctets
2.1.22
2.1.21
2.1.20
2.1.192.1.18
2.1.17
2.1.16
2.1.15
2.1.14
ifNumber
ifTable
ifEntry 2.1
2
1
MIB (cont.)
23-25MIB (cont.)
-
8/12/2019 ch23_SNMP
25/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
ipReasmTimeout
ipReasmReqds
ipInUnknownProtos
ipInDiscards
ipInDelivers
ipOutRequests
ipOutDiscards
ipOutNoRoutes
ipReasmOKs
ipForwDatagrams
ipInAddrErrorsipInHdrErrors
ipInReceives
ipDefaultTTL
ipForwarding
IP Group (1.3.6.1.2.1.4.x)
1514
13
12
11
10
9
8
7
6
54
3
2
1
20ipAddrTable
20.1.1ipAdEntAddr
20.1.2ipAdEntIfIndex
20.1.3ipAdEntNetMask
20.1.4ipAdEntBcastAddr
20.1.5ipAdEntEntReasmMaxSize
19ipFragCreates
18ipFragFails
17ipFragOKs
16ipReasmFails
MIB (cont.)
23-26MIB (cont.)
-
8/12/2019 ch23_SNMP
26/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
22ipNetToMediaTable
22.1.4ipNetToMediaType
23ipRoutingDiscards
22.1.1ipNetToMediaIfIndex
22.1.2ipNetToMediaPhysAddress22.1.3ipNetToMediaNetAddress
IP Group (cont.)
MIB (cont.)
21.1.6ipRouteMetric4
21.1.5ipRouteMetric3
21.1.4ipRouteMetric2
21.1.3ipRouteMetric121.1.2ipRouteIfIndex
21.1.1ipRouteDest
21ipRouteTable
21.1.13ipRouteInfo
21.1.12ipRouteMetric5
21.1.11ipRouteMask
21.1.10ipRouteAge
21.1.9ipRouteProto
21.1.8ipRouteType
21.1.7ipRouteNextHop
ARP table
23-27MIB (cont.)
-
8/12/2019 ch23_SNMP
27/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
TCP Group (1.3.6.1.2.1.6.x)
13.1.2
13.1.1
12
11
10
9
8
7
6
54
3
2
1
tcpConnState
tcpConnLocalAddress
tcpAttemptFails
tcpEstabResets
tcpCurrEstab
tcpInSegs
tcpOutSegs
tcpRetransSets
tcpPassiveOpens
tcpActiveOpenstcpMaxConn
tcpRtoMax
tcpRtoMin
tcpRtoAlgorithm
15tcpOutRsts14tcpInErrs
13.1.5tcpConnRemPort
13.1.4tcpConnRemAddress
13.1.3tcpConnLocalPort
udpLocalPortudpLocalAddress
udpOutDatagrams
udpInErrors
udpNoPorts
udpInDatagrams
UDP Group (1.3.6.1.2.1.7.x)
5.1.25.1.1
4
3
2
1
(co )
13tcpConnTable udpTable 5
23-28MIB (cont.)
-
8/12/2019 ch23_SNMP
28/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
icmpInAddrMaskReps
icmpOutMsgs
icmpInRedirectsicmpInEchos
icmpInEchoReps
icmpInTimestamps
icmpInTimestampsReps
icmpInAddrMasks
icmpInSrcQuenchs
icmpInParmProbs
icmpInTimeExcds
icmpInDestUnreachs
icmpInErrors
icmpInMsgs
14
13
12
11
10
9
87
6
5
4
3
2
1
ICMP Group (1.3.6.1.2.1.5.x)
icmpOutEchosicmpOutEchoReps
icmpOutTimestampsReps
icmpOutTimestampsReps
icmpOutAddrMasks
icmpOutAddrMaskReps
icmpOutRedirects
icmpOutSrcQuenchs
icmpOutParmProbs
icmpOutTimeExcds
icmpOutDestUnreachs
icmpOutErrors
26
25
24
23
2221
20
19
18
17
16
15
( )
23-29MIB (cont.)
-
8/12/2019 ch23_SNMP
29/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .ifOutDiscards OBJECT-TYPE
SYNTAX Counter
ACCESS read-only
STATUS mandatory
DESCRIPTION
"The number of outbound packets which were chosen to be
discarded even though no errors had been detected to
prevent their being transmitted. One possible reason for
discarding such a packet could be to free up buffer space
::= { ifEntry 19 }
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ipReasmReqds OBJECT-TYPE
SYNTAX Counter
ACCESS read-only
STATUS mandatory
DESCRIPTION
"The number of IP fragments received which needed to be
reassembled at this entity."
::= { ip 14 }. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Detailed description of MIB-2 is given in RFC 1213 (1991).
Excerpt from RFC 1213:
23-30MIB (cont.)
-
8/12/2019 ch23_SNMP
30/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
Every variable listed in the MIB must be identified when SNMP is making a
reference to it (to fetch or set its value).
Only leaf nodes are referenced. SNMP does not manipulate entire rows or
columns of tables.
Referencing Simple Variables
Simple variables are referenced by appending 0 to the variables OID. For
example variable udpInDatagrams is referenced as:
udpInDatagrams.0, or
1.3.6.1.2.1.7.1.0, or
iso.org.dod.internet.mgmt.mib.udp.udpInDatagrams.0
1.3.6.1.2.1.7.1 defines the variable
1.3.6.1.2.1.7.1.0 defines the instance of the variable
( )
23-31MIB (cont.)
-
8/12/2019 ch23_SNMP
31/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
Referencing TablesIn order to reference a variable in a particular row an index should be
appended to the variable OID. MIB doesnt use conventional indices
(subscripts) to reference a row of table, it rather uses the associative
memory approach. Therefore the index for a desired row is replaced with
the value(s) of the variable(s) in that row:
variable OID.value.value.
It can use a single value or values of several fields separated by dots. For
example the second field in the first row is referenced as:
( )
1.3.6.1.2.1.7.5.1.2.181.23.45.14.23
Variable OID Value of the
first field
Value of the
second field
23-32MIB (cont.)
-
8/12/2019 ch23_SNMP
32/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
Samevariable,
differentinstances181.23.45.14
230.20.5.24
192.13.5.10
23
161
212
Values
23-33MIB (cont.)
-
8/12/2019 ch23_SNMP
33/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
Indexing of table entries
23-34
L i hi d i
MIB (cont.)
-
8/12/2019 ch23_SNMP
34/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
Lexicographic ordering
The OIDs in MIB, including the instance identifiers, are in lexicographic order.
Tables are ordered according to column-row rules. This will help inGetNextRequest command as shown later.
23-35MIB (cont.)
-
8/12/2019 ch23_SNMP
35/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
NOTICE:
MIB is not the actual database itself. It only contains a collection of
definitions which define properties of managed objects, but doesn't contain
actual variable values. Therefore the MIB is sometimes called virtualinformation base.
The SNMP client puts the SMI (ANS.1) identifier for the MIB variable it
wants to get into request message, and it sends this message to the server.The server then maps this identifier into local variable (i.e. into a memory
location where the value for this variable is stored), retrieves the current
value held in this variable, and uses BER to encode the value it sends back
to the client.
-
8/12/2019 ch23_SNMP
36/48
23-37SNMP (cont.)
-
8/12/2019 ch23_SNMP
37/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
Infrastructure for network management
agent
MIB
agent
MIB
agent
MIB
agent
MIB
managed device
managed device
manager MIB
Networkmanagement
protocol
managed devicemanaged device
Managers host runs
SNMP client
Agents runSNMP server
data
data
data
data
23-38
SNMP (cont.)
-
8/12/2019 ch23_SNMP
38/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
Devices that dont support SNMP can be managed viaproxy agents. Proxy agent
translates protocol interactions it receives from manager into whateverinteractions are supported by foreign devices.
data
data
realagent data
proxyagent
MIB
managed device
managed device
manager MIB
managed device
SNMP
Non SNMP
manageddevices
realagent
realagent
Proprietary
messages
23-39SNMP (cont.)
-
8/12/2019 ch23_SNMP
39/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
agent MIB
Managed device
Manager
response
agentMIB
Managed device
trap msg
request
request/response mode trap mode
There are two ways to convey MIB info, commands:
Manager
23-40SNMP (cont.)
-
8/12/2019 ch23_SNMP
40/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
SNMP Messages (v.3)
23-41SNMP (cont.)
SNMP M
-
8/12/2019 ch23_SNMP
41/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
GetRequest
GetNextRequest
GetBulkRequest
Mgr-to-agent: get me data
(instance, next in list, block)
Message type Function
InformRequest Mgr-to-Mgr: heres MIB value
SetRequest Mgr-to-agent: set MIB value
Response
Agent-to-mgr: value, response to
request
Trap Agent-to-mgr: inform manager
of exceptional event
SNMP Messages
NOTICE: Messages are in SNMP jargon called PDUs
23-42SNMP (cont.)
-
8/12/2019 ch23_SNMP
42/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
SNMP Messages (notices):
The GetNextRequest command is used for reading subsequent table
entries. The retrieved value is the value of the object following (in lexicographic
order) the defined OID in the message. The command is useful in case when the
manager doesn't know the table indices. However, for each piece of data aseparate request has to be made, which results in longer time and increased
traffic.
GetBulkRequest is a newer PDU that can retrieve many data items in asingle request. More efficient than GetNextRequest. Saves time and traffic.
The Trap PDU is sent from the agent to the manager to report an event. For
example, if the agent is rebooted, it informs the manager and reports the time of
rebooting. Trap is an asynchronous notification of some significant event.
InformRequest is sent from a manager for passing information to an
application running in another manager. Response PDU is used to
acknowledge the request. Used in hierarchical or distributed management wheremultiple managers are involved
23-43
(d) variable-bindings
SNMP (cont.)GetRequestGetNextRequest
-
8/12/2019 ch23_SNMP
43/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
variable-bindings00requestid
PDUtype
variable-bindingserrorindexerrorstatusrequestidPDUtype
variable-bindingsmax-repetitionsnon-repeatersrequestidPDUtype
valueNnameN. . .value2name2value1name1
( ) g
SNMP PDU Formats
Sequence IDto matchresponse withthe request
noErrortooBignoSuchNamebadValuereadOnlygenErr
GetBulkRequest
Response
GetNextRequestSetRequestInformRequest
Trap
Offset, tellswhichvariablecaused theerror
Variable bindings
23-44SNMP (cont.)
-
8/12/2019 ch23_SNMP
44/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
GetBulkRequest Example
Client Agent
(e.g, router)
Agent returns single value for X, Y, and six rows of table :
GetBulkRequest(non-repeaters=2,max-repeaters=6,X,Y,TA,TB,TC)
Manager issues request with six variable names;for the first two variable (non-repeaters=2),a single value is requested; for the remaining variablessix successive values (max-repeaters=6) are requested.
Response [X, Y, TA(1), TB(1), TC(1),
TA(2), TB(2), TC(2),
TA(3), TB(3), TC(3),
TA(4), TB(4), TC(4),
TA(5), TB(5), TC(5),
TA(6), TB(6), TC(6) ]
x Y
Table
TA TB TC
23-45SNMP (cont.)
SNMP PDU i b dd d i SNMP
-
8/12/2019 ch23_SNMP
45/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
SNMP PDU is embedded into an SNMP message.
SNMP v.3 = 3
Unique message ID,Max message size that sender can handle,Message flags (report/authentication/privacy)
Message security model (SNMPv1,v2c,USM
Used to create a message digest
Used only if PDU is encrypted
23-46
Example of an SNMP v3 message:Network manager wants to know the number of UDP
-
8/12/2019 ch23_SNMP
46/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
NULL
SEQUENCE
Length=31
udpInDatagrams
(1.3.6.1.2.1.7.1.0)
Value=0
gdatagrams a router has received
GetRequest
OBJECT IDENTIFIER
Length=9
BER encoding
has been used here
23-47
S 230 34
Example of an SNMP v3 message (cont.)
-
8/12/2019 ch23_SNMP
47/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
OCTET STRING, length=1, all flags=004 01 00
NULL, length=005 00
OBJECT IDENTIFIER, length=9, udpInDatagram
(1.3.6.1.2.1.7.1.0)
06 09 01 03 06 01
02 01 07 01 00
SEQUENCE, length 1330 0D
SEQUENCE, length 1530 0FINTEGER, length=1, Error Index=002 01 00
INTEGER, length=1, Error Status=002 01 00
INTEGER, length=4, Request ID=0x0001061102 04 00 01 06 11
GetRequest, length=29 (no encryption)A0 1D
SEQUENC, length=31 (Data)30 1F
OCTET STRING, length=0, no security parameter04 00
OCTET STRING, length=0, no security model02 00
INTEGER, length=2, max size=102402 02 04 00
INTEGER, length=1, message ID=6402 01 40
SEQUENCE, length=12 (Header)30 0C
INTEGER, length=1, version=302 01 03
Sequence length = 5230 34
23-48Port numbers for SNMP
-
8/12/2019 ch23_SNMP
48/48
McGraw-Hill The McGraw-Hill Companies, Inc., 2000
Traps
Requests
Responses