1 / 27

SNMP Extra Lecture and examples

SNMP Extra Lecture and examples. Outline. Reading Columnar Objects SNMP PDU messages GetRequest Example GetNextRequest Example Lexicographic Ordring- example GetBulkRequest Example SNMP Decentralized management Message Encapsulation and UDP Port. Two Kinds of Managed Objects.

gali
Download Presentation

SNMP Extra Lecture and examples

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 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 (1.3.6.1.2.1.2.2.1.1) .ifTable.ifEntry.2 (1.3.6.1.2.1.2.2.1.2) .ifTable.ifEntry.3 (1.3.6.1.2.1.2.2.1.3) ifIndex ifDescr ifType . . . 1 le0 6 . . . 6 llc0 1 . . . 7 lo0 24 . . . 9 le1 6 . . . 1.3.6.1.2.1.2.2.1.2.6 1.3.6.1.2.1.2.2.1.3.7

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

  6. system (mib-2 1) sysDescr (1) sysServices (7) sysObjectId (2) sysLocation (6) sysUpTime (3) sysName (5) sysContact (4) GetRequest PDU • 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. .0 indicates that the scalar value should be retrieved (scalar objects only) 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) GetRequest PDU Agent Manager Process Process 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 • 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! • 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)

  9. GetRequest PDU 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 • GetRequest (ipRouteDest.9.1.2.3, ipRouteMetric1.9.1.2.3, ipRouteNextHop. 9.1.2.3 ) Index of table

  10. system (mib-2 1) sysDescr (1) sysServices (7) sysObjectId sysLocation (6) (2) sysUpTime (3) sysName (5) sysContact (4) GetNextRequest PDU • 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. 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) Error message: no object next to sysServices GetNextRequest PDU Agent Manager Process Process Get-Next-Request Operation for System Group

  12. 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 A B T Z E 1.1 2.1 3.1 1.2 2.2 3.2 Generalized Case

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

  14. Generalized Case A Manager Agent Process Process B GetRequest ( A ) GetResponse ( A ) T GetRequest ( B ) GetResponse ( B ) GetRequest (T.E.1.1) E GetResponse ( T.E.1.1 ) 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) T.E.1.2 T.E.2.2 T.E.3.2 GetResponse ( T.E.2.2 ) GetRequest (T.E.3.1 ) GetResponse ( T.E.3.1 ) Z GetRequest (T.E.3.2 ) GetResponse ( T.E.3.2 ) GetRequest (Z ) GetResponse ( Z )

  15. 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 Generalized Case 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. 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 Lexicographic Convention

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

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

  19. 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 Agent Manager Process Process 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 ) GetNextRequest PDU

  20. 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 Additional Messages

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

  22. GetRequest ( A,B ) Manager Agent GetResponse (A,B) Process Process 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) GetNextRequest (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) GetNextRequest (T.E.1.4,T.E.2.4,T.E.3.4) GetResponse (T.E.2.1,T.E.3.1,Z) GetBulkRequest-PDU Operation

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

  24. GetBulkRequest-PDU Operation

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

  26. version community data Message Encapsulation • 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 161 - SNMP Messages • UDP Port 162 - SNMP Trap Messages • Size of SNMP message: 1472 bytes

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

More Related