SNMP
SNMP
COE4310
Simple Network Management Protocol (SNMP)
SNMP is a framework for managing devices in an internet using the TCP/IP protocol
suite.
It provides a set of fundamental operations for monitoring and maintaining an internet.
How?
SNMP uses the concept of manager and agent.
A manager is usually a host that controls and monitors a set of agents, usually routers
or servers.
SNMP is an application-level protocol in which a few manager stations control a set of
agents.
Simple Network Management Protocol (SNMP)
Role of SNMP
SNMP defines the format of the packet to be sent from a manager to an agent and
vice versa.
It also interprets the result and creates statistics.
The packets exchanged contain the object (variable) names and their status
(values). SNMP is responsible for reading and changing these values.
Role of SMI
To use SNMP, we need rules for naming objects because the objects in SNMP form a
hierarchical structure. So, part of a name can be inherited from the parent.
We also need rules to define the type of the objects.
What types of objects are handled by SNMP?
Can SNMP handle simple types or structured types?
What are the sizes of these types and What is the range of these types?
In addition, how are each of these types encoded?
SMI is a protocol that defines these rules. But, it does not define how many objects
are managed in an entity or which object uses which type.
Role of MIB
MIB define the number of objects, name them according to the rules defined by SMI,
and associate a type to each named object.
Simple Network Management Protocol (SNMP)
The objects that are used in SNMP are located under the mib-2 object, so their
identifiers always start with 1.3.6.1.2.1.
Object identifier
Simple Network Management Protocol (SNMP)
Type
The second attribute of an object is the type of data stored in it.
SMI has two broad categories of data type: simple and structured.
Simple Type
The simple data types are atomic data types.
Simple Network Management Protocol (SNMP)
Structured Type
By combining simple and structured data types, we can make new structured
data types.
SMI defines two structured data types:
Sequence: A sequence data type is a combination of simple data types, not
necessarily of the same type.
Sequence of: A sequence of data type is a combination of simple data types all of
the same type or a combination of sequence data types all of the same type.
a conceptual view of data types:
Simple Network Management Protocol (SNMP)
Encoding Method
SMI uses Basic Encoding Rules (BER), to encode data to be transmitted over
the network.
BER specifies that each piece of data be encoded in triplet format: tag, length,
and value
Encoding format
Simple Network Management Protocol (SNMP)
Tag: The tag is a 1-byte field that defines the type of data .
Example 1: INTEGER 14
GetRequest: The GetRequest PDU is sent from the manager (client) to the agent
(server) to retrieve the value of a variable or a set of variables.
GetNextRequest: The GetNextRequest PDU is sent from the manager to the
agent to retrieve the value of a variable. The retrieved value is the value of the
object following the defined ObjectId in the PDU. It is mostly used to retrieve the
values of the entries in a table.
The manager use GetNextRequest and define the ObjectId of the table, and as a
respone the value of the first entry of the table is returned.
GetBulkRequest: The GetBulkRequest PDU is sent from the manager to the
agent to retrieve a large amount of data. It can be used instead of multiple
GetRequest and GetNextRequest PDUs.
SetRequest: The SetRequest PDU is sent from the manager to the agent to set
(store) a value in a variable.
Response: The Response PDU is sent from an agent to a manager in response to
GetRequest or GetNextRequest. It contains the value(s) of the variable(s)
requested by the manager.
Trap: 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
reeboting.
Simple Network Management Protocol (SNMP)
*GetBulkReques
t
PDU differs
from the others
in two areas
Simple Network Management Protocol (SNMP)
Request ID: This field is a sequence number used by the manager in a request
PDU and repeated by the agent in a response. It is used to match a request to a
response.
It is used to distinguish between different requests.
Simple Network Management Protocol (SNMP)
Error status: This is an integer that is used only in response PDUs to show the
types of errors reported by the agent. Its value is 0 in request PDUs.
Non-repeaters: This field is used only in GetBulkRequest and replaces the error
status field, which is empty in request PDUs.
This tells the agent how many OIDs in the request should be treated as GetRequest
variables.
Error index: The error index is an offset that tells the manager which variable
caused the error.
Simple Network Management Protocol (SNMP)
Max-repetition: This field is also used only in GetBulkRequest and replaces the
error index field, which is empty in request PDUs.
This tells the agent how many GetNext operations to perform on each variable
(that is not covered by non-repeaters option) and return the values in a single
reply.
VarBind list: This is a set of variables with the corresponding values the
manager wants to retrieve or set. The values are null in GetRequest and
GetNextRequest.
Var1 00
4-byte
(II) A5 sequence 01 15
no. Var2 00