Presentation is loading. Please wait.

Presentation is loading. Please wait.

Extra Lecture and examples

Similar presentations


Presentation on theme: "Extra Lecture and examples"— Presentation transcript:

1 Extra Lecture and examples
SNMP Extra Lecture and examples

2 Outline Reading Columnar Objects SNMP PDU messages GetRequest Example
GetNextRequest Example Lexicographic Ordring- example GetBulkRequest Example SNMP Decentralized management Message Encapsulation and UDP Port

3 Two Kinds of Managed Objects
Type-Specific Objects: sysDescr OBJECT-TYPE SYNTAX DisplayString (SIZE(0..255)) ::= {system 1} OID: mib-2.system.1.0 Columnar Objects OID: mib-2.interface.ifTable.ifEntry.ifDescr.2 mib-2.interface.ifTable.ifEntry.ifDescr.6 mib-2.interface.ifTable.ifEntry.ifType.2 mib-2.interface.ifTable.ifEntry.ifType.6

4 Columnar Objects .ifTable.ifEntry.1 ( ) ifTable.ifEntry.2 ( ) .ifTable.ifEntry.3 ( ) ifIndex ifDescr ifType le llc lo le

5 SNMP PDU messages . . . error-status error-index name value PDU type
request-id variable-bindings GetRequest, GetNextRequest, SetRequest PDU type request-id error-status error-index variable-bindings GetResponse error-status INTEGER { noError (0), tooBig (1), noSuchName(2), badValue (3), readOnly (4), genErr (5) }, error-index INTEGER, variable-bindings name value var-bind 1 var-bind 2 var-bind n . . .

6 GetRequest PDU Sender includes the following fields:
sysServices (7) sysLocation (6) sysDescr (1) system (mib-2 1) sysObjectId (2) sysUpTime (3) sysName (5) sysContact (4) Sender includes the following fields: PDU Type request-id Variable-bindings A list of object instances whose values are requested SNMP dictates that a scalar object is identified by its OBJECT-IDENTIFIER concatenated with 0 e.g., sysDescr.0: distinguishes between the object type and an instance of the object

7 GetRequest PDU .0 indicates that the scalar value should be retrieved (scalar objects only) Manager Agent Process Process GetRequest (sysDescr.0) GetResponse (sysDescr .0= "SunOS" ) GetRequest (sysObjectID.0) GetResponse ( sysObjectID.0=enterprises ) GetRequest (sysUpTime.0) GetResponse (sysUpTime.0= ) 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) A managed object should implement the system group. The manager by detecting the object, it will poll the new object to learn the values of objects in the system group The manager could have used only one message to obtain the values of all objects under system group: using “variable binding list”

8 GetRequest PDU Get Request is atomic
Either all values (of all variables provided in the binding list) retrieved or none error message is generated if at least one of the variables could not be found/returned; error- status: noSuchName tooBig genErr error-index: indicate the problem object (i.e., variable in binding list that caused the problem) With SNMP, only leaf objects in the MIB can be retrieved e.g. it is not possible to retrieve an entire row of a table by simply accessing the Entry Object (e.g., ipRouteEntry)  the management stations has to include each object instance (in the row) in the binding list By including the complete object identifier and respecting the rule of indexing!

9 GetRequest PDU ipRouteDest ipRouteMetric1 ipRouteNextHop
Index of table GetRequest (ipRouteDest , ipRouteMetric , ipRouteNextHop )

10 GetNextRequest PDU PDU format: Difference:
sysServices (7) sysLocation (6) sysDescr (1) system (mib-2 1) sysObjectId (2) sysUpTime (3) sysName (5) sysContact (4) PDU format: same as GetReqest Difference: each variable in the binding list refers to an object instance next in the lexicographic order GetNextRequest (sysDescr.0)  return the value of the object instance of sysObjectId Advantages: Allows a network manager to discover a MIB structure dynamically Efficient way for searching through tables whose entries are unknown

11 GetNextRequest PDU Error message: no object next to sysServices
Manager Agent Process Process GetRequest (sysDescr.0) GetResponse (sysDescr .0= "SunOS" ) GetNextRequest (sysDescr.0) GetResponse ( sysObjectID.0=enterprises ) GetNextRequest (sysObjectID.0) GetResponse (sysUpTime.0= ) 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) Error message: no object next to sysServices Get-Next-Request Operation for System Group

12 Generalized Case A sample MIB that contains both scalar values and aggregate objects Retrieving scalar as well as aggregate objects using get- request and get-next-request T Z A B 1.1 E 2.1 3.1 1.2 2.2 3.2

13 Get-Next Request MIB Tree : * In SNMP, Only leaf objects have values.
1 2 3 4 5 6 MIB Tree : In SNMP, Only leaf objects have values. :Non-Leaf Object :Leaf Object

14 Generalized Case A Manager Agent Process Process 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 )

15 Generalized Case Observations:
1)- we need to know all the elements in the MIB, including the # of columns and rows in a table 2)- a MIB is traversed from top to bottom (i.e., from left to right in the tree structure) 3)- data in tables is retrieved by traversing all instances of a columnar object NOTES: 1)- dynamic table: # rows may not be known to manager A request to T.E.1.3 results in error message 3)- GetNextRequest could avoid this! 4)- A convention is required for the definition of the next object in a MIB  SNMP uses lexicographic convention A B T E T.E.1.1 T.E.2.1 T.E.3.1 T.E.1.2 T.E.2.2 T.E.3.2 Z

16 Lexicographic Convention
Procedure for ordering Start with leftmost digit as first position Before increasing the order in the first position, select the lowest digit in the second position Continue the process till the lowest digit in the last position is captured Increase the order in the last position until all the digits in the last position are captured Move back to the last but one position and repeat the process Continue advancing to the first position until all the numbers are ordered Tree structure for the above process

17 Lexicographic Ordring- example
start end 3 9 1 2 18 5 6 10 21 4 MIB example of lexicographic ordering

18 GetNextRequest PDU T.E.1.1 is next object to scalar B GetRequest ( A )
GetResponse ( A ) GetNextRequest ( A ) GetResponse ( B ) GetNextRequest ( B ) GetResponse ( T.E.1.1 ) GetNextRequest (T.E.1.1 ) GetResponse ( T.E.1.2 ) GetNextRequest (T.E.1.2 ) GetResponse ( T.E.2.1 ) GetNextRequest (T.E.2.1 ) GetResponse ( T.E.2.2 ) GetNextRequest (T.E.2.2 ) GetResponse ( T.E.3.1 ) GetNextRequest (T.E.3.1 ) GetResponse ( T.E.3.2 ) GetNextRequest (T.E.3.2 ) GetResponse ( Z ) GetNextRequest ( Z ) GetResponse ( noSuchName ) Manager Process Agent T.E.1.1 T.E.2.1 T.E.3.1 T.E.1.2 T.E.2.2 T.E.3.2 E T Z A B T.E.1.1 is next object to scalar B

19 GetNextRequest PDU Advantages of Get-Next-Request
GetRequest ( A ) GetResponse ( A ) GetNextRequest ( A ) GetResponse ( B ) GetNextRequest ( B ) GetResponse ( T.E.1.1 ) GetNextRequest (T.E.1.1 ) GetResponse ( T.E.1.2 ) GetNextRequest (T.E.1.2 ) GetResponse ( T.E.2.1 ) GetNextRequest (T.E.2.1 ) GetResponse ( T.E.2.2 ) GetNextRequest (T.E.2.2 ) GetResponse ( T.E.3.1 ) GetNextRequest (T.E.3.1 ) GetResponse ( T.E.3.2 ) GetNextRequest (T.E.3.2 ) GetResponse ( Z ) GetNextRequest ( Z ) GetResponse ( noSuchName ) Manager Process Agent Advantages of Get-Next-Request 1)- no need to know the object ID of the next entity to retrieve its value 2)- issues with dynamic table resolved 3)- allows NMS to discover the structure of a MIB view dynamically 4)- provides an efficient mechanism for searching a table whose entries are unknown

20 Additional Messages inform-request manager-to-manager message
The receiving manager responds with a response message Enhances interoperability get-bulk-request transfer of large data, e.g. retrieval of table data SNMPv2-trap Similar to trap messages in SNMPv1

21 GetBulkRequest-PDU Operation
Z A B 1.1 E 1.2 1.3 1.4 2.1 2.2 2.3 2.4 3.1 3.2 3.3 3.4 T.E.1.1 T.E.2.1 T.E.3.1 T.E.1.2 T.E.2.2 T.E.3.2 E T Z A B T.E.1.3 T.E.2.3 T.E.3.3 T.E.1.4 T.E.2.4 T.E.3.4

22 GetBulkRequest-PDU Operation
GetRequest ( A,B ) GetNextRequest (T.E.1,T.E.2,T.E.3) GetResponse (T.E.1.1,T.E.2.1,T.E.3.1) GetNextRequest (T.E.1.1,T.E.2.1,T.E.3.1) GetResponse (T.E.1.2,T.E.2.2,T.E.3.2) GetResponse (T.E.1.3,T.E.2.3,T.E.3.3) GetNextRequest (T.E.1.3,T.E.2.3,T.E.3.3) GetResponse (T.E.1.4,T.E.2.4,T.E.3.4) GetResponse (T.E.2.1,T.E.3.1,Z) Manager Process Agent GetResponse (A,B) GetNextRequest (T.E.1.4,T.E.2.4,T.E.3.4) GetNextRequest (T.E.1.2,T.E.2.2,T.E.3.2)

23 GetBulkRequest-PDU Operation
T.E.1.1 T.E.2.1 T.E.3.1 T.E.1.2 T.E.2.2 T.E.3.2 E T Z A B T.E.1.3 T.E.2.3 T.E.3.3 T.E.1.4 T.E.2.4 T.E.3.4 2 non repetitive objects (A, B) 3 repetitive instances Of the columnar object T.E.1, T.E.2, T.E.3 Manager Agent Process Process GetBulkRequest ( 2,3, A,B,T.E.1, T.E.2, T.E.3 ) Response ( A, B, T.E.1.1, T.E.2.1, T.E.3.1 T.E.1.2, T.E.2.2, T.E.3.2 T.E.1.3, T.E.2.3, T.E.3.3 ) 3 more rows GetBulkRequest ( 0,3, T.E.1.3, T.E.2.3, T.E.3.3 ) Response ( T.E.1.4, T.E.2.4, T.E.3.4, Z , " endOfMibView" ) Z is next in the lexicographic order

24 GetBulkRequest-PDU Operation

25 SNMP Decentralized management
Agent Element manager MIB SNMPv2 agent MIB SNMPv2 Manager/agent Management server MIB Management Applications SNMPv2 manager MIB SNMPv2 agent MIB SNMPv2 Manager/agent MIB SNMPv2 agent SNMPv2 Configuration

26 Message Encapsulation
version community data Communication between remote peer processes Message consists of : Version identifier Community name Messages are exchanged in Protocol Data Unit PDU Message encapsulated in UDP datagrams and transmitted Loss of message  time out! Like FTP, SNMP uses two well- known ports to operate: UDP Port SNMP Messages UDP Port SNMP Trap Messages Size of SNMP message: bytes

27 Default UDP Ports for SNMP
Management Station Network Elements (NEs) Manager Agent SNMP SNMP 162 Any 161 Any UDP UDP IP IP Ethernet Ethernet


Download ppt "Extra Lecture and examples"

Similar presentations


Ads by Google