snmp - instituto superior de engenharia do...
Post on 14-Mar-2020
17 Views
Preview:
TRANSCRIPT
SNMP 20-11-2017
1
SNMP Simple Network Management Protocol
Miguel Leitão Nov 2012
Introduction
NMS (Network Management System) Hardware and software used to monitor and administer
computer networks.
SNMP (Simple Network Management Protocol) Application-layer protocol for managing TCP/IP based networks.
Runs over UDP, which runs over IP.
SNMP Agent Device (e.g. Router) running software that understands SNMP
language.
MIB (Management Information Base) Database of info conforming to SMI.
SMI (Structure of Management Information)
Standard that defines how to create a MIB.
SNMP 20-11-2017
2
SNMP Overview
Defines mechanism for remote management of network
devices (routers, bridges, etc.)
Fundamental principle: all device management done by
simple variable value manipulation.
Approach:
standard means for specifying quantities recognized by devices.
protocol for requesting, returning, notifying of changes of values.
SNMP Message Protocol
Messages use UDP
port 161 (requests/responses)
port 162 (notifications)
Message types:
GetRequest: request values of variables from device
GetNextRequest: request value of variable following
the one supplied
GetResponse: return values
SetRequest: instruct device to set values of variables
Trap: from device - notify monitor / manager of value
change
SNMP 20-11-2017
3
SNMP encapsulation
Ethernet
Frame IP Packet
UDP Datagram SNMP Message CRC
SNMP Environment
13
TCP/IP Protocol Suite
Agents: usually routers or servers to monitor and control.
Manager: usually a host, that controls and monitors a set of agents.
SNMP 20-11-2017
4
Management overview
15
1
2
3
Get Request
SNMP packet
4
ResponseSNMP packet
5
6
MIB
MIB: Management Information Base
Related to a managed device.
Description of a collection of
Management Objects
Can be specified using MIB Modules
Specified in Structure of Management
Information (SMI),
set of rules for specifying management information
adapted subset of the Abstract Syntax Notation One
(ASN.1)
SNMP 20-11-2017
5
Managed Objects
Objects may be defined from instances of Object-Types.
Each objects is identified by:
Object IDentifier (OID): Machine recognizable
Name: Human readable
Example
(Name of the Object) OBJECT-TYPE
Property 1
Property 2
..............
::= OBJECT IDENTIFIER
OID
OID: Object IDentifier
Hierachical structure managed by ISO
mgmt object is identified as:
{ iso(1) org(3) dod(6) internet(1) mgmt(2) }
or simply:
{1.3.6.1.2}
SNMP 20-11-2017
6
MIB – Management Information Base
MIB Format
OBJECT-TYPE
String that describes the MIB object.
Object IDentifier (OID).
SYNTAX Defines what kind of info is stored in
the MIB object.
ACCESS READ-ONLY, READ-WRITE.
STATUS State of object in regards the SNMP
community.
DESCRIPTION Reason why the MIB object exists.
Standard MIB Object:
sysUpTime OBJECT-TYPE
SYNTAX Time-Ticks
ACCESS read-only
STATUS mandatory
DESCRIPTION
“Time since the
network management
portion of the system
was last re-initialised.
::= {system 3}
SNMP Commands
SNMP has 5 different functions referred to as
Protocol Data Units (PDU’s), which are:
(1) GetRequest, aka Get
(2) GetNextRequest, aka GetNext
(3) GetResponse, aka Response
(4) SetRequest, aka Set
(5) Trap
SNMP 20-11-2017
7
SNMP Commands [Get]
GetRequest [Get]
Most common PDU.
Used to ask SNMP agent for value of a particular
MIB agent.
NMS sends out 1 Get PDU for each instance,
which has a unique OID string.
SNMP Commands [GetNext]
GetNextRequest [GetNext]
NMS application uses GetNext to ‘walk’ down a table within a MIB.
Designed to ask for the OID and value of the MIB instance that comes after the one asked for.
Once the agent responds the NMS application can increment its count and generate a GetNext.
This can continue until the NMS application detects that the OID has changed, i.e. it has reached the end of the table.
SNMP 20-11-2017
8
SNMP Commands [GetResponse]
GetResponse [Response]
Response to a Get, GetNext or Set.
SNMP agent responds to all requests or
commands via this PDU.
SNMP Commands [SetRequest]
SetRequest [Set]
Issued by an NMS application to change the
value of a MIB variable.
NMS must provide the correct permissions when
using the set PDU.
SNMP 20-11-2017
9
SNMP Commands [Trap]
Trap
Asynchronous notification.
SNMP agents can be programmed to send a trap
when a certain set of circumstances arise.
Circumstances can be view as thresholds, i.e. a
trap may be sent when the temperature of the
core breaches a predefined level.
SNMP PDUs
27
TC
P/IP
Pro
toco
l S
uite
SNMP 20-11-2017
10
SNMP message
28
TC
P/I
P P
roto
co
l S
uite
PDU format
29
TC
P/IP
Pro
toco
l S
uite
SNMP 20-11-2017
11
PDU types
30
TCP/IP Protocol Suite
Errors
31
TCP/IP Protocol Suite
SNMP 20-11-2017
12
Value Encoding
32
TC
P/I
P P
roto
co
l S
uite
Data Types
33
TCP/IP Protocol Suite
Tag filed identifies the Data Type
SNMP 20-11-2017
13
Value examples
34 TCP/IP Protocol Suite
Integer: 14
String: “HI”
Value examples
35 TCP/IP Protocol Suite
ObjectIndentifier: 1.3.6.1
IPv4 Addr: 131.21.14.8
SNMP 20-11-2017
14
Message example
36 TC
P/I
P P
roto
co
l S
uite
OID
NULL
GetRequest
SNMPv2
SNMPv2 added two new PDUs
1. GETBULK REQUEST
2. INFORM
SNMP 20-11-2017
15
SNMPv3
SNMPv3 added two new features:
• Security
• Message authentication,
• Confidentiality
• Integrity.
• Remote administration.
SNMP Tools
Command Line Interface
snmpwalk
…
Graphical User Interface
iReasoning’s MIB Browser
www.ireasoning.com
SNMP 20-11-2017
16
iReasoning MIB Browser
MIB structure
Details of MIB structure.
iReasoning MIB Browser
Values
top related