Presentation is loading. Please wait.

Presentation is loading. Please wait.

IETF69 BOF XSD for accessing SMIv2 data models

Similar presentations


Presentation on theme: "IETF69 BOF XSD for accessing SMIv2 data models"— Presentation transcript:

1 IETF69 BOF XSD for accessing SMIv2 data models
Yan Li

2 Outline Datatypes for Netconf Data Models
Using Smidump to Convert MIB to XSD Accessing MIBs using NETCONF

3 Datatypes for Netconf Data Models
Using Smidump to Convert MIB to XSD Accessing MIBs using NETCONF

4 Background RFC 4181 “Guidelines for Authors and Reviewers of MIB Documents” lists an initial set of commonly used Textual Conventions. Their semantics and syntax could be reused by NETCONF and other XML-based management protocols

5 Mapping of Datatypes and Textual Conventions
SMI / TC XSD TruthValue Boolean Enumerated INTEGER String (with an enumeration constrain) Numeric Integer (Integer32, Counter, Gauge) Integer and its derivant (int, unsignedInt, long, unsignedLong) Timeticks, TimeInterval, TimeStamp Duration DateAndTime dateTime String (OctetString, DisplayString) String and its derivant Address (IpAddress, MacAddress, InetAddress) String (with a specific pattern)

6 Mapping of Datatypes and Textual Conventions (cont.)
SMI / TC XSD BITS A list of enumerated string OBJECT IDENTIFIER anyURI String representing an XPath expression

7 Open Issues Is the EnabledStatus (P-BRIDGE-MIB) needed?
SNMP-Specific TCs - TestAndIncr - RowStatus - StorageType

8 Next Step Discuss case by case to identify which TCs are needed.

9 Datatypes for Netconf Data Models
Using Smidump to Convert MIB to XSD Accessing MIBs using NETCONF

10 Mapping of Datatypes Used by Smidump
SMI / TC XSD Integer32 int OctetString hexBinary (with restriction of length) Unsigned32, Counter32, Gauge32 unsignedInt Counter64 unsignedLong Enumerated INTEGER NMTOKEN (with restriction of enumeration) TimeTicks, TimeStamp TimeInterval DateAndTime String (with a specific pattern)

11 Mapping of Datatyes Used by Smidump (cont.)
SMI / TC XSD OBJECT IDENTIFIER string (with restriction of length and pattern) BITS A list of enumerated NMTOKEN (The list is restricted by maxLength)

12 Structure of the XML Instance Documents invented by Smidump
Smidump invents a "flattened" structure of the XML instance documents <snmp-data> | +--<context> +--A container of scalar elements (one or more) | | | +--scalar objects +--An instance of table entry (one or more) +--columnar objects

13 Example of IF-MIB <snmp-data xmlns=" <context ipaddr=“…” hostname=“…” port=“…” community=“…” time=“…”> <interfaces> <ifNumber>…</ifNumber> </interfaces> <ifMIBObjects> <ifTableLastChange>…</ifTableLastChange> <ifStackLastChange>…</ifStackLastChange> </ifMIBObjects> <ifEntry ifIndex="1"> <ifType>…</ifType> </ifEntry> <ifXEntry>…</ifXEntry> <ifStackEntry>…</ifStackEntry> <ifTestEntry>…</ifTestEntry> <ifRcvAddressEntry>…</ifRcvAddressEntry> </context> </snmp-data>

14 The Output XSD of Smidump
<xsd:element name="ifDescr" minOccurs="0"> <xsd:annotation> <xsd:appinfo> <maxAccess>read-only</maxAccess> <oid> </oid> <status>current</status> </xsd:appinfo> <xsd:documentation>…</xsd:documentation> </xsd:annotation> <xsd:simpleType> <displayHint>255a</displayHint> <xsd:restriction base="xsd:string"> <xsd:pattern value="((((\p{IsBasicLatin})){0,255})){0,1}"/> </xsd:restriction> </xsd:simpleType> </xsd:element>

15 Datatypes for Netconf Data Models
Using Smidump to Convert MIB to XSD Accessing MIBs using NETCONF

16 Motivation There is no data model for NETCONF, even a data modeling language at this time. But operators expect device vendors support NETCONF right now. What data models should device vendors provide? The proprietary data models impair interoperability between devices and applications from different vendors. Actually it is another version of CLI. The standard data models for NETCONF are destined to replace the proprietary data models in the near future. So device vendors will gain little return from developing proprietary data models There is a need for standard data models for transiting toward NETCONF, the SMI MIB is an alternative - SMI MIB is widely used for a long time, there are over 200 standard MIB modules -There is an open source tool, libsmi, which can convert SMI MIB into XSD conveniently A standard approach for accessing MIB may be used by not only NETCONF, but other XML-based NM protocols as well.

17 Approach for Accessing MIB
Use the XSD converted by smidump as data model Add a capability for NETCONF The capability contains two SNMP-specific operations - <mib-get>, has a optional “max-repetitions” attribute for retrieving table entries. - <mib-set>, has a optional “operation” attribute for creating or deleting a table entry.

18 Example of <mib-get>
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:mib="urn:ietf:params:xml:ns:netconf:mib:1.0"> <mib:mib-get> <filter type="subtree"> <snmp-data xmlns=" <context ipaddr=" " port="830" community="public" time=" T08:08:08Z"> <ifEntry ifIndex="1"> <ifType/> <ifMtu/> </ifEntry> </context> </snmp-data> </filter> </mib:mib-get> </rpc>

19 Example of <mib-set>
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:mib="urn:ietf:params:xml:ns:netconf:mib:1.0"> <mib:mib-set> <snmp-data xmlns=" <context ipaddr=" " port="830" community="public" time=" T08:08:08Z"> <ifStackEntry ifStackHigherLayer="1" ifStackLowerLayer="2" mib:operation="create"/> </context> </snmp-data> </mib:mib-set> </rpc>

20 Open Issues <mib-get> vs. <get>
Should the “max-repetitions” attribute be inherited from SNMP? Is the set functionality needed?

21 Thank You Questions? Contact info Yan Li –


Download ppt "IETF69 BOF XSD for accessing SMIv2 data models"

Similar presentations


Ads by Google