NETWORK AND SERVICES MANAGEMENT AND CONTROL MSc MODULE Prof. George Pavlou Centre for Communication Systems Research http://www.ee.surrey.ac.uk/ccsr/networks/ G.Pavlou@eim.surrey.ac.uk Appendix to Lectures 8-18: Management Technologies And Examples Managed Object Specifications in SNMP-SMI, OSI-SM GDMO and CORBA IDL
eem.nsm 2
1. Example Specification of a Single Instanced Managed Object We present here the specification of a single-instanced managed object in SNMP-SMI, OSI-SM GDMO and CORBA IDL. Note in fact that the SNMP specification is a set of objects in the SNMP-SMI sense that constitute an object group; this is roughly equivalent to the OSI-SM GDMO object class and the CORBA IDL interface. The example given is a trivial one, modelling minimal management functionality of the UNIX operating system, including also demonstrative toy aspects such as a settable string and an echo method/action. No inheritance is used to keep things simple; in reality though a UNIX class should be derived from a generic operating system class. The purpose of the following specification is to demonstrate formal aspects of object specification in the three frameworks. The specification is complete, apart from imported generic features. eem.nsm 3
1.1 SNMP-SMI Specification unissnmp OBJECT IDENTIFIER ::= joint-iso-itu(2) mgmt(37) unis(2) 11) } uxobj OBJECT IDENTIFIER ::= unissnmp 50 } -- the uxobjid attribute is not necessary in SNMP since -- the naming architecture does not require it uxsystime OBJECT-TYPE SYNTAX DisplayString DESCRIPTION The time at that UNIX system as perceived by the local clock ::= uxobj 2 } uxwisesaying OBJECT-TYPE SYNTAX DisplayString ACCESS read-write DESCRIPTION A toy settable object that has no special meaning ::= uxobj 3 } -- Gauge is defined as ASN.1 INTEGER in SNMP; this is in contrast -- to GDMO/ASN.1 and IDL where it can be either an integer or real: -- such "union" types are not allowed in SNMP uxnusers OBJECT-TYPE SYNTAX Gauge -- defined as INTEGER in RFC 1155 DESCRIPTION This object shows the numbers of users currently logged into that UNIX system ::= uxobj 4 } -- the following emulates the echo action using the SNMP set operation uxechoarg OBJECT-TYPE SYNTAX DisplayString ACCESS read-write DESCRIPTION This object is the argument of a toy echo action; a newly set value is copied to the uxechores object ::= uxobj 5 } uxechores OBJECT-TYPE SYNTAX DisplayString DESCRIPTION This object is the result of a toy echo action ::= uxobj 6 } -- note that there is no genetic attributevaluechange notification in SNMP eem.nsm 4
1.2 OSI-SM GDMO Specification -- the X.721 "top" and "system" classes are referenced -- but their specification is not included below -- Class and Package Templates uxobj MANAGED OBJECT CLASS DERIVED FROM top; CHARACTERIZED BY uxobjpackage; -- no conditional packages are defined for this class REGISTERED AS unismanagedobjectclass 50 uxobjpackage PACKAGE BEHAVIOUR uxobjbehaviour DEFINED AS This mandatory package models minimal manageable functionality of the UNIX operating system plus some additional toy functionality such as a settable string and an echo action ;; ATTRIBUTES uxobjid systime wisesaying GET-REPLACE REPLACE-WITH-DEFAULT, nusers GET; ACTIONS echo; NOTIFICATIONS attributevaluechange; -- when wisesaying changes value REGISTERED AS unispackage 50 -- Attribute Templates uxobjid ATTRIBUTE WITH ATTRIBUTE SYNTAX UniSAttribute-ASN1Module.SimpleNameType; MATCHES FOR EQUALITY, SUBSTRINGS, ORDERING; BEHAVIOUR uxobjidbehaviour DEFINED AS The naming attribute for instances of this class ;; REGISTERED AS unisattributeid 501 systime ATTRIBUTE WITH ATTRIBUTE SYNTAX UniSAttribute-ASN1Module.Time; MATCHES FOR EQUALITY, ORDERING; BEHAVIOUR systimebehaviour DEFINED AS The time at that UNIX system as perceived by the local clock ;; REGISTERED AS unisattributeid 502 wisesaying ATTRIBUTE WITH ATTRIBUTE SYNTAX UniSAttribute-ASN1Module.String; MATCHES FOR EQUALITY, SUBSTRINGS; BEHAVIOUR wisesayingbehaviour DEFINED AS A toy settable attribute that has no special meaning ;; REGISTERED AS unisattributeid 503 nusers ATTRIBUTE DERIVED FROM X721:gauge; BEHAVIOUR nusersbehaviour DEFINED AS This attribute shows the numbers of users currently logged into that UNIX system ;; REGISTERED AS unisattributeid 504 -- Action Templates echo ACTION BEHAVIOUR echobehaviour DEFINED AS This action receives a string and echoes it back across the network; it is a toy action just to demonstrate the concept ;; MODE CONFIRMED; WITH INFORMATION SYNTAX eem.nsm 5
UniSAttribute-ASN1Module.String; WITH REPLY SYNTAX UniSAttribute-ASN1Module.String; REGISTERED AS unisaction 501 -- note that the gauge attribute and the attributevaluechange notification -- are imported from the X.721 Definition of Management Information -- recommendation, so they do not need to be (re-)defined -- Name Binding Template, positions uxobj instances in the MIT -- The class system (and subclasses) is at the top of the MIT uxobj-system NAME BINDING SUBORDINATE OBJECT CLASS uxobj AND SUBCLASSES; NAMED BY SUPERIOR OBJECT CLASS system AND SUBCLASSES; WITH ATTRIBUTE uxobjid; REGISTERED AS unisnamebinding 50 -- this is the end of the GDMO part of the specification, -- the ASN.1 module follows with the data types used in the attributes, -- actions and also declares the object identifiers UniS-ASN1Module DEFINITIONS ::= BEGIN unismanagedobjectclass OBJECT IDENTIFIER ::= joint-iso-itu(2) mgmt(37) unis(2) unissmi(1) 3} unisnamebinding OBJECT IDENTIFIER ::= joint-iso-itu(2) mgmt(37) unis(2) unissmi(1) 6} unispackage OBJECT IDENTIFIER ::= joint-iso-itu(2) mgmt(37) unis(2) unissmi(1) 4} unisattributeid OBJECT IDENTIFIER ::= joint-iso-itu(2) mgmt(37) unis(2) unissmi(1) 7} unisaction OBJECT IDENTIFIER ::= joint-iso-itu(2) mgmt(37) unis(2) unissmi(1) 9} unisnotification OBJECT IDENTIFIER ::= joint-iso-itu(2) mgmt(37) unis(2) unissmi(1) 10} -- The following is a typical type used for naming attributes SimpleNameType ::= CHOICE num INTEGER, str GraphicString } -- GraphicString and UTCTime are ASN.1 types String ::= GraphicString Time ::= UTCTime -- for comparison to IDL, the X.721:ObservedValue type is included -- which is used as the syntax type for gauges (nusers here) ObservedValue ::= CHOICE integer INTEGER, real REAL } END eem.nsm 6
1.3 CORBA IDL Specification // the X.721 i_top interface is referenced through inheritance but // its specification is not included here // the argument types for operations are required first in IDL, // in a similar fashion to programming languages // (one defines a type first and uses it later) // SimpleNameType: integer or string enum SimpleNameTypeChoice numberchoice, stringchoice union SimpleNameType switch (SimpleNameTypeChoice) case numberchoice: long num; case stringchoice: string str; // ObservedValue: integer or real enum ObservedValueChoice integerchoice, realchoice union ObservedValue_t switch (ObservedValueChoice) case integerchoice: long integer; case realchoice: double real; interface i_uxobj : i_top SimpleNameType uxobjid_get (); string systime_get (); string wisesaying_get (); void wisesaying_set (in string); string wisesaying_setdefault (); ObservedValue nusers_get (); string echo (in string); // no notifications are a part of the interface: in CORBA a notification // is defined as an operation in the interface of the receiving object; // there should be a i_uxobjnotif interface for the i_uxobj notifications; // this is not included here // note there is no name binding since there is no MIT in CORBA // note also that there are no behaviour defs as in GDMO or SNMP-SMI eem.nsm 7
2. Example Specification of Both Single and Multiple Instanced Managed Objects In this section, a more realistic example is presented which covers both single and multiple instanced managed objects. The example used is roughly the same with the one in the notes: the single instanced object models the operation of a (connection-oriented) transport protocol entity while the multiple instanced objects model transport connections established through that transport entity. (Note that the OSI-SM example in the notes uses a x25protocolentity and x25vc instead, these can be thought as analogous to a tpentity and tpconnection respectively). The specification is more elaborate than the previous example since this is relatively close to the real-world. As such, inheritance is used and generic aspects of protocol entities and connections are modelled first, from which transport specific classes are derived. (This of course is not possible in SNMP-SMI where a monolithic specification approach is followed). Another feature not shown in the previous example is object deletion: all connections could be deleted by management means and this is reflected in all three frameworks. The SNMP specification is complete while the GDMO and IDL specifications are incomplete in the sense that no types for attributes, operation arguments etc. are included. This is deliberate to keep the example relatively concise and simple. eem.nsm 8
1.1 SNMP-SMI Specification tp OBJECT IDENTIFIER ::= unissnmp 60 } tpinpkts OBJECT-TYPE SYNTAX Counter -- defined as INTEGER in RFC 1155 DESCRIPTION The total numbers of packets received correctly ::= tp 1 } tpinerrorpkts OBJECT-TYPE SYNTAX Counter DESCRIPTION The total numbers of packets received in error ::= tp 2 } tpoutpkts OBJECT-TYPE SYNTAX Counter DESCRIPTION The total numbers of packets sent, excluding those retransmitted ::= tp 3 } tpoutretranspkts OBJECT-TYPE SYNTAX Counter DESCRIPTION The total numbers of retransmitted packets ::= tp 4 } tpcurrentconnections OBJECT-TYPE SYNTAX Gauge -- defined as INTEGER in RFC 1155 DESCRIPTION The total numbers of retransmitted packets ::= tp 5 } tpconntable OBJECT-TYPE SYNTAX SEQUENCE OF TpConnEntry ACCESS not-accessible -- the table as a whole is not accesible DESCRIPTION A table containing connection-specific information ::= tp 6 } tpconnentry OBJECT-TYPE SYNTAX TpConnEntry ACCESS not-accessible -- the entry/row as a whole is not accesible DESCRIPTION Information about a particular TP connection INDEX tpconnsrcaddr, tpconndestaddr} ::= tpconntable 1 } TpConnEntry ::== SEQUENCE tpconnsrcaddr tpconndestaddr tpconnstate tpconnuptime tpconnrowstatus TpAddress, TpAddress, INTEGER, TimeTicks, RowStatus} TpAddress ::= GraphicString eem.nsm 9
tpconnsrcaddr OBJECT-TYPE SYNTAX TpAddress DESCRIPTION The transport address at the local system ::= tpconnentry 1 } tpconndestaddr OBJECT-TYPE SYNTAX TpAddress DESCRIPTION The transport address at the remote system ::= tpconnentry 2 } tpconnstate OBJECT-TYPE SYNTAX INTEGER opening(1), closing(2), established(3)} DESCRIPTION The state of this connection ::= tpconnentry 3 } tpconnuptime OBJECT-TYPE SYNTAX TimeTicks -- defined as INTEGER in RFC 1155; -- counts hundreds of a second DESCRIPTION The time since this connection has been established ::= tpconnentry 4 } tpconnrowstatus OBJECT-TYPE SYNTAX RowStatus -- an INTEGER defined in SNMP-SMI ACCESS read-write DESCRIPTION The status of this row. Since creation is not allowed, the value can only be set to destroy(6) which results in terminating the underlying connection. Normally the value is active(1) ::= tpconnentry 5 } eem.nsm 10
1.2 OSI-SM GDMO Specification protentity MANAGED OBJECT CLASS DERIVED FROM top; CHARACTERIZED BY protentitypackage; REGISTERED AS unismanagedobjectclass 50 protentitypackage PACKAGE ATTRIBUTES protentityid inpkts inerrorpkts outpkts GET; REGISTERED AS unispackage 50 protentity-subsystem NAME BINDING SUBORDINATE OBJECT CLASS protentity AND SUBCLASSES; NAMED BY SUPERIOR OBJECT CLASS subsystem AND SUBCLASSES; WITH ATTRIBUTE protentityid; REGISTERED AS unisnamebinding 50 tpentity MANAGED OBJECT CLASS DERIVED FROM protentity; CHARACTERIZED BY tpentitypackage; REGISTERED AS unismanagedobjectclass 50 tpentitypackage PACKAGE ATTRIBUTES outretranspkts currentconnections GET; REGISTERED AS unispackage 50 connection MANAGED OBJECT CLASS DERIVED FROM top; CHARACTERIZED BY connectionpackage; REGISTERED AS unismanagedobjectclass 50 connectionpackage PACKAGE ATTRIBUTES connectionid connuptime GET; REGISTERED AS unispackage 50 connection-protentity NAME BINDING SUBORDINATE OBJECT CLASS connection AND SUBCLASSES; NAMED BY SUPERIOR OBJECT CLASS protentity AND SUBCLASSES; WITH ATTRIBUTE connectionid; -- note the following clause that allows connection deletion DELETE DELETES-CONTAINED-OBJECTS; REGISTERED AS unisnamebinding 50 tpconnection MANAGED OBJECT CLASS DERIVED FROM connection; CHARACTERIZED BY tpconnectionpackage; REGISTERED AS unismanagedobjectclass 50 tpconnectionpackage PACKAGE ATTRIBUTES tpsrcaddr tpdestaddr tpconnstate GET; REGISTERED AS unispackage 50 eem.nsm 11
1.3 CORBA IDL Specification interface i_protentity : i_top SimpleNameType protentityid_get (); Counter inpkts_get (); Counter inerrorpkts_get (); Counter outpkts_get (); interface i_tpentity : i_protentity Counter outretranspkts_get (); Gauge inerrorpkts_get (); // the I_connection interface inherits also from the i_lifecycle one // in order to be deletable note that multiple inheritance is used interface i_connection : i_top, i_lifecycle SimpleNameType connectionid_get (); TimeTicks connuptime_get (); interface i_tpconnection : i_connection TpAddress tpsrcaddr_get (); TpAddress tpdestaddr_get (); TpConnState tpconnstate_get (); eem.nsm 12