Lecture 23 - SNMP
Lecture 23 - SNMP
Simple Network
Management Protocol
(SNMP)
1
©The McGraw-Hill Companies, Inc., 2000 1 © Adapted for use at JMU by Mohamed Aboutabl, 2003
CONTENTS
• CONCEPT
• MANAGEMENT COMPONENTS
• SMI
• MIB
• SNMP
• MESSAGES
• UDP PORTS
• SECURITY
2
©The McGraw-Hill Companies, Inc., 2000 2 © Adapted for use at JMU by Mohamed Aboutabl, 2003
23.1 Concept
3
©The McGraw-Hill Companies, Inc., 2000 3 © Adapted for use at JMU by Mohamed Aboutabl, 2003
23.2 Components of network management on the Internet
4
©The McGraw-Hill Companies, Inc., 2000 4 © Adapted for use at JMU by Mohamed Aboutabl, 2003
We can compare the task of network
management to the task of writing
a program.
1. Both tasks need rules. In network
management this is handled by SMI.
2. Both tasks need variable declarations.
In network management this is handled
by MIB.
3. Both tasks have actions performed by
statements.In network management this is
handled by SNMP.
5
©The McGraw-Hill Companies, Inc., 2000 5 © Adapted for use at JMU by Mohamed Aboutabl, 2003
23.3 SMI
6
©The McGraw-Hill Companies, Inc., 2000 6 © Adapted for use at JMU by Mohamed Aboutabl, 2003
Object Identifiers
7
©The McGraw-Hill Companies, Inc., 2000 7 © Adapted for use at JMU by Mohamed Aboutabl, 2003
Data Types
8
©The McGraw-Hill Companies, Inc., 2000 8 © Adapted for use at JMU by Mohamed Aboutabl, 2003
Simple Data Types
Size (in
Type Description
bytes)
INTEGER 4 An integer -231 to 231 - 1
Integer32 4 Same as INTEGER
Unsigned32 4 0 to 232 - 1
OCTET STRING Variable Byte-string up to 64K Bytes long
OBJECT Variable An object identifier
IDENTIFIER
IPAddress 4 An IP address
Counter32 4 An integer whose value can be incremented from 0 to 232 – 1
then wraps back to 0
Counter64 8 A 64-bit counter
Gauge32 4 Same as Counter32 but remains at its maximum value
(without wrapping) until it is reset
TimeTicks 4 A counting value that records time in 1/100ths of a second
BITS A string of bits
Opaque Variable Uninterpreted string
9
©The McGraw-Hill Companies, Inc., 2000 9 © Adapted for use at JMU by Mohamed Aboutabl, 2003
Structured Data Types
10
©The McGraw-Hill Companies, Inc., 2000 10 © Adapted for use at JMU by Mohamed Aboutabl, 2003
TLV Encoding Format
Tag Tag
Type Type
(Hex) (Hex)
INTEGER 02 IPAddress 40
NULL 05 TimeTicks 43
11
©The McGraw-Hill Companies, Inc., 2000 11 © Adapted for use at JMU by Mohamed Aboutabl, 2003
Length Format
12
©The McGraw-Hill Companies, Inc., 2000 12 © Adapted for use at JMU by Mohamed Aboutabl, 2003
Example 1: The 32-bit INTEGER 14
13
©The McGraw-Hill Companies, Inc., 2000 13 © Adapted for use at JMU by Mohamed Aboutabl, 2003
Example 2: OCTET STRING “HI”
14
©The McGraw-Hill Companies, Inc., 2000 14 © Adapted for use at JMU by Mohamed Aboutabl, 2003
Example 3: The ObjectIdentifier 1.3.6.1
15
©The McGraw-Hill Companies, Inc., 2000 15 © Adapted for use at JMU by Mohamed Aboutabl, 2003
Example 4: The IPAddress 131.21.14.8
16
©The McGraw-Hill Companies, Inc., 2000 16 © Adapted for use at JMU by Mohamed Aboutabl, 2003
23.4 Management Information Base (MIB ver. 2)
Each agent (i.e. managed network device) has its own MIB2, a
collection of all manageable objects inside the agent.
MIB2 classifies the objects into 10 groups
17
©The McGraw-Hill Companies, Inc., 2000 17 © Adapted for use at JMU by Mohamed Aboutabl, 2003
Accessing MIB Variable.
Example: UDP MIB2
udpInDatagram : 1.3.6.1.2.1.7.1
The value (instance)
1.3.6.1.2.1.7.1.0
udpLocalPort: 1.3.6.1.2.1.7.5.1.2
18
©The McGraw-Hill Companies, Inc., 2000 18 © Adapted for use at JMU by Mohamed Aboutabl, 2003
udp variables and tables
19
©The McGraw-Hill Companies, Inc., 2000 19 © Adapted for use at JMU by Mohamed Aboutabl, 2003
Indexes for udpTable
20
©The McGraw-Hill Companies, Inc., 2000 20 © Adapted for use at JMU by Mohamed Aboutabl, 2003
Lexicographic ordering
21
©The McGraw-Hill Companies, Inc., 2000 21 © Adapted for use at JMU by Mohamed Aboutabl, 2003
23.5 SNMP PDUs (8 PDUs)
A0
A1
A5
A3
A2
A7
A6
A8
22
©The McGraw-Hill Companies, Inc., 2000 22 © Adapted for use at JMU by Mohamed Aboutabl, 2003
SNMP PDU format
23
©The McGraw-Hill Companies, Inc., 2000 23 © Adapted for use at JMU by Mohamed Aboutabl, 2003
23.6 SNMP
message
24
©The McGraw-Hill Companies, Inc., 2000 24 © Adapted for use at JMU by Mohamed Aboutabl, 2003
GetRequest
message
25
©The McGraw-Hill Companies, Inc., 2000 25 © Adapted for use at JMU by Mohamed Aboutabl, 2003
23.7 Port numbers for SNMP
26
©The McGraw-Hill Companies, Inc., 2000 26 © Adapted for use at JMU by Mohamed Aboutabl, 2003