Snmpv1 Communication and Functional Models: by Dr. Angelito F. Argete 2 Sem 2019-2020
Snmpv1 Communication and Functional Models: by Dr. Angelito F. Argete 2 Sem 2019-2020
Snmpv1 Communication and Functional Models: by Dr. Angelito F. Argete 2 Sem 2019-2020
by
Dr. Angelito F. Argete
1
Introduction
2
Communication Model
Communicate mgnt information between network
mgnt stations and managed elements
Goals:
Management functions maintained by agents are kept
simple
Protocol flexibility (addition of new aspects of operation
and management)
Transparency (should not be affected by the architecture
of particular hosts and gateways)
Operation: 5 messages
get-request, get-next request, set-request
get-response, trap
SNMP messages are exchanged using UDP (connection
less) transport protocol
Message Format
3 different versions:
SNMPv1, SNMPv2, SNMPv3
Message Format-Set/Get PDU
GetRequest (sysDescr.0)
GetResponse (sysDescr .0= "SunOS" )
GetRequest (sysObjectID.0)
GetResponse ( sysObjectID.0=enterprises.11.2.3.10.1.2 )
GetRequest (sysUpTime.0)
GetResponse (sysUpTime.0=2247349530)
GetRequest (sysContact.0)
GetResponse (sysContact.0=" ")
GetRequest (sysName.0)
GetResponse (sysName.0="noc1 ")
GetRequest (sysLocation.0)
GetResponse (sysLocation.0=" ")
GetRequest (sysServices.0)
GetResponse (sysServices.0=72)
9.1.2.3 3 99.0.0.3
10.0.0.51 5 89.1.1.42
10.0.0.99 5 89.1.1.42
Index of table
GetRequest (ipRouteDest.9.1.2.3,
ipRouteMetric1.9.1.2.3, ipRouteNextHop. 9.1.2.3 )
GetNextRequest PDU
system
PDU format: (mib-2 1)
same as GetReqest
Difference:
each variable in the binding list refers
to an object instance next in the
lexicographic order sysDescr (1) sysServices (7)
GetNextRequest (sysDescr.0) sysObjectId
sysLocation (6)
(2)
return the value of the object sysUpTime (3) sysName (5)
instance of sysObjectId
sysContact (4)
Advantages:
Allows a network manager to discover
a MIB structure dynamically
Efficient way for searching through
tables whose entries are unknown
GetNextRequest PDU
Manager Agent
Process Process
GetRequest (sysDescr.0)
GetResponse (sysDescr .0= "SunOS" )
GetNextRequest (sysDescr.0)
GetResponse ( sysObjectID.0=enterprises.11.2.3.10.1.2 )
GetNextRequest (sysObjectID.0)
GetResponse (sysUpTime.0=2247349530)
GetNextRequest (sysUpTime.0)
GetResponse (sysContact.0=" ")
GetNextRequest (sysContact.0)
GetResponse (sysName.0="noc1 ")
GetNextRequest (sysName.0)
GetResponse (sysLocation.0=" ")
GetNextRequest (sysLocation.0)
GetResponse (sysServices.0=72)
GetNextRequest (sysServices.0)
GetResponse (noSuchName)
A B T Z
B
GetRequest ( A )
GetResponse ( A )
GetRequest ( B ) T
GetResponse ( B )
GetRequest (T.E.1.1)
GetResponse ( T.E.1.1 ) E
GetRequest (T.E.1.2)
GetResponse ( T.E.1.2 )
GetRequest (T.E.2.1) T.E.1.1 T.E.2.1 T.E.3.1
GetResponse ( T.E.2.1 )
GetRequest (T.E.2.2)
GetResponse ( T.E.2.2 ) T.E.1.2 T.E.2.2 T.E.3.2
GetRequest (T.E.3.1 )
GetResponse ( T.E.3.1 )
GetRequest (T.E.3.2 ) Z
GetResponse ( T.E.3.2 )
GetRequest (Z )
GetResponse ( Z )
Generalized Case
Observations:
A
1)- we need to know all the elements in the MIB, including
the # of columns and rows in a table
B
2)- a MIB is traversed from top to bottom (i.e., from left to
right in the tree structure)
T
3)- data in tables is retrieved by traversing all instances of a
columnar object
E
NOTES:
1)- dynamic table: # rows may not be known to manager
T.E.1.1 T.E.2.1 T.E.3.1
A request to T.E.1.3 results in error message
3)- GetNextRequest could avoid this! T.E.1.2 T.E.2.2 T.E.3.2
start end
1
1.1
1.1.5
1.1.18
1.2 1 2 3 9
1.2.6
2
2.2
2.10
2.10.9 2 2 10 4 21
1
3
3.4
3.21
9
6 9
5 18
Advantages of Get-Next-
Request GetResponse ( A )
GetRequest ( A )
GetNextRequest ( A )
Index of table
ipRouteEntry
1.3.6.1.2.1.4.21.1 = x
ipRouteDest.9.1.2.3 ipRouteMetric1.9.1.2.3
ipRouteNextHop.9.1.2.3
x.1.9.1.2.3 x.3.9.1.2.3
x.7.9.1.2.3
ipRouteDest.10.0.0.99
ipRouteMetric1.10.0.0.99 ipRouteNextHop.10.0.0.99
x.1.10.0.0.99
x.3.10.0.0.99 x.7.10.0.0.99
Accessing Table Values
The agent will respond with the values from the first row
Object names in the list in the response does not match those in the request
MS knows it has reached the end of the table
SetRequest-PDU
Write a value rather than reading a variable
The operation is atomic:
o either all variables in binding list are updated or none
Procedure receive-SetRequest:
begin
if object not available for set then
issue getresponse (noSuchName, index)
else if inconsistent object value then
issue getresponse (badValue, index)
else if generated PDU too big then
issue getresponse (tooBig)
else if value not settable for some other reason then
issue getresponse (genErr, index)
else issue getresponse (variable bindings)
end;
SetRequest-PDU-example
ipRouteDest ipRouteMetric1 ipRouteNextHop
9.1.2.3 3 99.0.0.3
10.0.0.51 5 89.1.1.42
10.0.0.99 5 89.1.1.42
Three ways for the agent to handle the request: If only this argument is passed,
1)- reject the operation with error-status =then the agent may accept or not;
noSuchName
if it accepts to create the row,
2)- recognize the operation (as creation of a new thenrow) and objects
the other check are
whether
assigned
the operation can be accepted (i.e., all values are correct,
default values no syntax
error, etc..)
2.1)- if NO, then return error-status = badValue
2.2)- if YES, then new row is created and
GetResponse ((ipRouteDest.11.3.3.12 = 11.3.3.12),
(ipRouteMetric1.11.3.3.12 = 9),
(ipRouteNextHop.11.3.3.12 = 91.0.0.5))
SetRequest-PDU-example
Row Deletion:
SetRequest (ipRouteMetric1.7.3.5.3 = invalid)
GetResponse (ipRouteMetric1. 7.3.5.3 = invalid)
Some other tables may/may not allow any operation to be done on its
columnar objects – check RFCs for more details
Performing an action:
SNMP can read and set values of objects. SNMP can also issue
commands to perform certain actions: example, a device may have a
flag “reBoot”, if it is set by the manager, then the device will reboot.
Sniffer Data
13:55:47. 445936 noc3.btc.gatech.edu.164 > noc1.btc.gatech.edu.snmp:
Community = public
GetRequest(111)
Request ID = 1
system.sysObjectID.0
system.sysUpTime.0
system.sysContact.0
system.sysName.0
system.sysLocation.0
system.sysServices.0
N (T/)
N: number of agents T
T: desired polling interval
: average time required to perform a single poll
Polling Frequency
depends on multiple factors:
Processing time to generate a request at the MS
Network delay from MS to agent
Processing time at the agent to interpret the received message
Processing time at the agent to generate response
Network delay from agent to manager
Processing time at the manager to interpret the message
Number of request/response transactions to obtain all desired info.
Example
Devices on a LAN; each device is to be polled every 15 minutes
Processing times = 50ms;
Network delay = 1ms (no network congestion)
N (1560/) = 4,500
Where = 50 + 1+ 50+ 50+ 1+ 50 = 202 ms
Polling Frequency
In WAN, network delays are significantly large (order of
0.5s)
Data rates on WANs are less than LANs
Distances are greater (delays are higher, e.g. 0.5 seconds)
Delays introduced by bridges and routers
N (1560/) = 750
Where = (4 0.05) + (20.5)
Summary: 4 critical parameters
# agents
Processing time of a message
Network delays
Polling interval
Some Limitations of SNMPv1
SNMP may not be suitable for the mgmt of truly large networks because of the
performance limitations of polling
SNMP is not well suited for retrieving large volumes of data, such as an entire
routing table
SNMP traps are unacknowledged & may not be delivered
SNMP provides only trivial authentication
i.e. it is suitable for monitoring rather than control
(C2 - C1 ) 8
Utilization (%) = 100%
(t2 - t1) Bandwidth
41
Internet Traffic of Sharif University
42
SNMP MIB Group Page 223~224
snmp
(mib-2 11)