Professional Documents
Culture Documents
NMS 1N02 PDF
NMS 1N02 PDF
NMS 1N02 PDF
SESSION NMS-1N02
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 1
Objectives
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 2
Introduction
SNMPv1Everybody Should Know It
SNMPv2cThe De Facto Standard
All You Need to Know about MIBs
Exercise
SNMPv3The Official Standard
Notifications
SNMP Summary
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 3
INTRODUCTION
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 4
SNMP SNMP
Manager Agent
DB MIB
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 5
The Manager
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 6
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 7
The MIB
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 8
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 9
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 10
Response Response
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 11
Version = SNMPv1
Community string = clear text
SNMP Operation = Get, GetNext, Set,
SNMP SNMP
Manager Version = SNMPv1 Agent
Community string= clear text
SNMP Operation = GetResponse, Trap
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 13
Advice:
Do not use public and/or private as community strings
Do not use cisco
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 14
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 16
INTEGER
Length is 32 bits, can be negative
Gauge
Length is 32 bits, an unsigned integer reflecting a
current value
Counter
Length is 32 bits, an unsigned counts something until it
reaches its maximum value, then wraps
TimeTicks
A measurement of time in hundredths of a second
OctetString
0 or more bytes of printable characters
IpAddress
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 17
Gauge
Like a speedometer
Used for rates like load (CPU, interface)
Counter
Like an odometer
ATTENTION
Counters do not necessarily start at zero, per standard
Counter can not be reset, per standard
Counters are not for direct human consumption
Require a DELTA function to compute rate
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 18
No security in SNMPv1
SNMPv1 uses Community Strings
SNMPv1 includes MIB View concept
SNMPv1 supports five operations
SNMPv1 is supported on all the Cisco devices
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 19
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 20
Version = SNMPv2c
Community string = clear text
SNMP PDU = Get, GetNext, Set, GetBulk
SNMP SNMP
Manager Agent
Version = SNMPv2c
Community string= clear text
SNMP PDU = GetResponse, Trap, Inform
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 22
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 23
Response
PDU Type requestID errStatus errIndex variableBindings
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 25
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 26
MIB Structure
iso(1)
org(3)
dod(6)
internet(1)
directory(1)
mgmt(2)
MIB II(1)
experimental(3)
private(4)
enterprise(1)
cisco(9)
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 29
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 30
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 31
sysDescr OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..255))
ACCESS read-only
STATUS mandatory
DESCRIPTION
"A textual description of the entity. This
value should include the full name and version identification
of the system's hardware type, software operating-system, and
networking software. It is mandatory that this only contain
printable ASCII characters."
::= { system 1 }
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 33
object OBJECT-TYPE
SYNTAX
ACCESS
STATUS
DESCRIPTION
text
::= { parent object-oid }
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 34
OCTET STRING,
OBJECT IDENTIFIER,
object OBJECT-TYPE INTEGER, IpAddress,
SYNTAX Counter, Gauge,
ACCESS TimeTicks, etc
STATUS
DESCRIPTION
text
::= { parent object-oid }
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 35
OCTET STRING,
OBJECT IDENTIFIER,
object OBJECT-TYPE INTEGER, IpAddress,
SYNTAX Counter, Gauge,
ACCESS TimeTicks, etc
STATUS
read-only
DESCRIPTION read-write
text write-only
::= { parent object-oid } not-accessible
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 36
OCTET STRING,
OBJECT IDENTIFIER,
object OBJECT-TYPE INTEGER, IpAddress,
SYNTAX Counter, Gauge,
ACCESS TimeTicks, etc
STATUS
read-only
DESCRIPTION read-write
text write-only
::= { parent object-oid } not-accessible
mandatory
optional
obsolete
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 37
INTEGER
Length is 32 bits, can be negative
Gauge
Length is 32 bits, an unsigned integer reflecting a
current value
Counter
Length is 32 bits, an unsigned counts something until it
reaches its maximum value, then wraps
TimeTicks
A measurement of time in hundredths of a second
OctetString
0 or more bytes of printable characters
IpAddress
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 38
sysDescr OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..255))
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"A textual description of the entity. This value
should include the full name and version identification of the
system's hardware type, software operating-system, and
networking software."
::= { system 1 }
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 39
object OBJECT-TYPE
SYNTAX
MAX-ACCESS
STATUS
DESCRIPTION
text
::= { parent object-oid }
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 40
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 41
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 42
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 43
Integer32
Length is 32 bits, can be negative
UInteger32
Still 32 bits, but non-signed
Gauge32
An integer reflecting a current value
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 44
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 45
ifTable OBJECT-TYPE
SYNTAX SEQUENCE OF IfEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A list of interface entries. The number of entries is given
by the value of ifNumber."
::= { interfaces 2 }
ifEntry OBJECT-TYPE
SYNTAX IfEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"An interface entry containing objects at the subnetwork
layer and below for a particular interface."
INDEX { ifIndex }
::= { ifTable 1 }
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 46
IfEntry ::=
SEQUENCE {
ifIndex
INTEGER,
ifDescr
DisplayString,
ifType
IANAifType
}
ifIndex OBJECT-TYPE
SYNTAX InterfaceIndex
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"A unique value for each interface. Its value ranges
between 1 and the value of ifNumber. The value for each interface must
remain constant at least from one re-initialization of the entity's
network management system to the next re-initialization."
::= { ifEntry 1 }
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 47
No persistence by default
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 48
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 49
interfaces
ifTable
ifEntry(1)
SNMPWALK
ifDescr(2) GET-NEXT
ifDescr.1
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 50
interfaces
ifTable
ifEntry(1)
SNMPWALK
ifDescr(2) GET-NEXT
ifDescr.1 GET-NEXT
ifDescr.2
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 51
interfaces
ifTable
ifEntry(1)
SNMPWALK
ifDescr(2) GET-NEXT
ifDescr.1 GET-NEXT
ifDescr.2 GET-NEXT
ifDescr.3
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 52
interfaces
ifTable
ifEntry(1)
SNMPWALK
ifDescr(2) GET-NEXT
ifDescr.1 GET-NEXT
ifDescr.2 GET-NEXT
ifDescr.3 GET-NEXT
ifDescr.4 GET-NEXT
ifDescr.5 GET-NEXT
ifDescr.6 GET-NEXT
ifDescr.7
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 53
interfaces
ifTable
ifEntry(1)
SNMPWALK
ifDescr(2)
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 54
interfaces
ifTable
ifEntry(1)
SNMPWALK
ifDescr(2) GETBULK
ifDescr.1
ifDescr.2
ifDescr.3
ifDescr.4
ifDescr.5
ifDescr.6
ifDescr.7
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 55
Polling an Object
Need to specify
IP address of agent
Community string
to gain access
OID of attribute
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 56
Need to specify
IP address of agent 1
Community string Load IF-MIB
to gain access
OID of attribute
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 57
Polling an Object
2 Find Object Instance
SNMP GET request 1: ifDescr.1 Ethernet0/0
2: ifDescr.2 Serial0/0
Same idea for SET
request 3: ifDescr.3 Serial0/1
4: ifDescr.4 Loopback0
Need to specify
IP address of agent 1 SNMP WALK
IF-MIB
Community string Load IF-MIB
to gain access
OID of attribute
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 58
3
GET 1.3.6.1.2.1.2.2.1.10.2
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 59
Polling an Object
2 Find Object Instance
SNMP GET request 1: ifDescr.1 Ethernet0/0
2: ifDescr.2 Serial0/0
Same idea for SET
request 3: ifDescr.3 Serial0/1
4: ifDescr.4 Loopback0
Need to specify
IP address of agent 1 SNMP WALK
IF-MIB
Community string Load IF-MIB
to gain access Instance 2
OID of attribute Serial0/0
OID for
ifInOctets
3
GET 1.3.6.1.2.1.2.2.1.10.2
ifInOctets.2 3
5 GET 1.3.6.1.2.1.2.2.1.10.2
Polling an Object
FTP site:
ftp://ftp.cisco.com/pub/mibs
External site:
http://jaguar.ir.miami.edu/%7Emarcus/snmptrans.html
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 63
http://www.cisco.com/go/mibs
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 64
MIB Locator
Which MIBs are supported for my platform?
Which MIBs are supported for my Cisco IOS train?
Which MIBs are supported for my specific image?
Where (platform, Cisco IOS, image) is this MIB supported?
Important MIBs
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 66
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 67
EXERCISES
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 68
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 69
Exercise 1: Response
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 72
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 73
Exercise 2
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 74
Exercise 2: Response
tcpConnState.20.0.0.1.179.20.0.0.2.22138 = established(5)
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 76
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 77
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 78
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 79
SNMPv3 Framework
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 81
AuthNoPriv NoAuthNoPriv
AuthPriv NoAuthPriv
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 82
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 83
SNMPv3
View-Based Access Control Model Logic
what which
object-type object-instance
variableName
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 84
variableName
vacmSecurityToGroupTable
groupName
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 85
SNMPv3
View-Based Access Control Model Logic
variableName
vacmSecurityToGroupTable
groupName
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 86
viewType variableName
vacmSecurityToGroupTable
groupName
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 87
SNMPv3
View-Based Access Control Model Logic
viewType variableName
vacmSecurityToGroupTable
groupName
vacmAccessTable
viewName
vacmViewTreeFamilyTable
yes
no
reject
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 88
contextName
securityModel securityName securityModel securityLevel object-type object-instance
vacmContextTable
viewType variableName
vacmSecurityToGroupTable
groupName
vacmAccessTable
viewName
vacmViewTreeFamilyTable
yes
no
reject
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 89
SNMPv3
View-Based Access Control Model Logic
contextName
securityModel securityName securityModel securityLevel object-type object-instance
vacmContextTable
viewType variableName
vacmSecurityToGroupTable
Read or Write
groupName
vacmAccessTable
Group viewName
vacmViewTreeFamilyTable
View yes
no
reject
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 90
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 91
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 92
The default Views restrict the access to the USM, VACM and
COMMUNITY MIBS
Pay attention not to enable a security holes when playing with
views in SNMPv3!
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 93
NOTIFICATIONS
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 94
On a Cisco Router:
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 95
SNMP SNMP
Agent Manager
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 96
1
Load MIB
SNMP SNMP
Agent Manager
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 97
Remote 1
Device
Load MIB
Goes Down
SNMP SNMP
Agent Manager
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 98
SNMP Notication
Instance 4
SNMP SNMP
Serial 1/2
Agent Manager
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 99
SNMP Notication
Instance 4
SNMP SNMP
Serial 1/2
Agent Manager
OID for
linkDown
4
SNMP Notication
Instance 4
SNMP SNMP
Serial 1/2
Agent Manager
OID for
linkDown
4
With IF-MIB
Installed,
Descriptions Have
Replaced the String
of Numbers
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 102
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 103
SNMP Versions
What
Level Auth Encryption
Happens
Community Uses a Community String
SNMPv1 noAuthNoPriv
String Match for Authentication
Community Uses a Community String
SNMPv2c noAuthNoPriv
String Match for Authentication
Uses a Username
SNMPv3 noAuthNoPriv Username (*)
Match for Authentication
Provides Authentication
SNMPv3 authNoPriv MD5 or SHA Based on HMAC-MD5 or
HMAC-SHA Algorithms
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 105
Conclusion
NMS-1N02
9588_04_2004_c4 2004 Cisco Systems, Inc. All rights reserved. 106