NETCONF Working Group | R. Varga |
Internet-Draft | Pantheon Technologies SRO |
Intended status: Standards Track | October 21, 2013 |
Expires: April 24, 2014 |
Efficient XML Interchange Capability for NETCONF
draft-varga-netconf-exi-capability-01
The Network Configuration Protocol (NETCONF) provides mechanisms to install, manipulate, and delete the configuration of network devices via exchange of XML messages in textual representation. Efficient XML Interchange (EXI) is a W3C-recommended binary representation of XML Information Set, which is more efficient from both CPU and bandwidth utilization perspective. This document defines a capability-based extension to the NETCONF protocol that allows peers to agree to exchange protocol messages using EXI encoding.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."
This Internet-Draft will expire on April 24, 2014.
Copyright (c) 2013 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
The NETCONF protocol [RFC6241] is defined in terms of two peers, client and server, exchanging XML messages in an RPC pattern. These messages are encoded as XML text documents, which makes the exchange easily understandable by human operators by simply observing them on the wire. Unfortunately, this feature takes its toll on both computation and network resources, as the representation contains redundant information and verbose names.
Efficient XML Interchange [W3C.REC-exi-20110310] is a W3C Recommendation which defines a more efficient way of encoding XML Information Set than the usual text representation. This is achieved by a combination of reduced verbosity, binary encoding and, optionally, pruning of non-essential information like comments.
It seems advantageous to allow clients and servers participating on a NETCONF session to sacrifice human readability to increase processing efficiency, especially in environments with high transactional activity and/or limited computing resources.
This document uses the following terms defined in [RFC6241]:
The :exi capability indicates that the peer supports EXI message encoding and is willing to use it. The capability has no effect on data being handled by the NETCONF protocol, nor does it affect protocol message exchanges.
EXI-encoded documents are binary data, this capability may only be used when the underlying transport is 8-bit clean and preserves message boundaries in face of arbitrary binary data. Notably this requires use of Chunked Framing mechanism as described in [RFC6242] when used with SSH transport.
The EXI capability is identified by the following capability string:
urn:ietf:params:netconf:capability:exi:1.0
The identifier MAY have a the following parameters:
Examples:
Example:
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <start-exi> <alignment>pre-compression</alignment> <fidelity> <dtd/> <lexical-values/> </fidelity> </start-exi> </rpc> <rpc-reply message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <ok/> </rpc-reply>
Example:
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <stop-exi/> </rpc> <rpc-reply message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <ok/> </rpc-reply>
The following YANG module defines the new operations introduced in this document. The YANG language is defined in [RFC6020]. Every NETCONF speaker that supports the :exi capability MUST implement this YANG module.
<CODE BEGINS> file "ietf-netconf-exi@2013-10-21.yang" module ietf-netconf-exi { namespace "urn:ietf:params:xml:ns:netconf:exi:1.0"; prefix exi; organization "IETF NETCONF (Network Configuration) Working Group"; contact "Robert Varga <robert.varga@pantheon.sk>"; description "NETCONF Protocol Operations for Efficient XML Interchange."; revision 2013-10-21 { description "Initial revision"; reference "I-D.varga-netconf-exi-capability-01"; } typedef exi-alignment { type enumeration { enum bit-packed { description "Use bit-packed EXI alignment"; } enum byte-aligned { description "Use byte-aligned EXI alignment"; } enum pre-compression { description "Use pre-compression EXI alignment"; } enum compressed { description "Do not set EXI alignment, use EXI compression instead"; } } description "EXI alignment specification."; } typedef exi-fidelity { type enumeration { enum comments { description "Preserve.comments EXI Fidelity option"; } enum dtd { description "Preserve.dtd EXI Fidelity option"; } enum lexical-values { description "Preserve.lexicalValues EXI Fidelity option"; } enum pis { description "Preserve.pis EXI Fidelity option"; } enum prefixes { description "Preserve.prefixes EXI Fidelity option"; } } description "EXI fidelity options."; } rpc start-exi { description "Start encoding protocol messages in Efficient XML Interchange format."; reference "I-D.varga-netconf-exi-capability"; input { leaf alignment { type exi-alignment; default "bit-packed"; description "EXI alignment to use."; } leaf-list fidelity { type exi-fidelity; description "EXI fidelity options to use."; } } } rpc stop-exi { description "Stop encoding protocol messages in Efficient XML Interchange format. Revert back to using the usual text XML encoding."; } }
This document registers the following capability identifier URN in the 'Network Configuration Protocol (NETCONF) Capability URNs' registry: urn:ietf:params:netconf:capability:exi:1.0
The compression option present in EXI specification may increase CPU and memory requirements for encoding the response. Devices should ensure this overhead is acceptable before agreeing to using EXI encoding, such that no operational risks are introduced.
The author would like to thank Anton Tkacik, Miroslav Miklus and Stefan Kobza for their contributions to this document.
[RFC2119] | Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. |
[RFC6020] | Bjorklund, M., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, October 2010. |
[RFC6241] | Enns, R., Bjorklund, M., Schoenwaelder, J. and A. Bierman, "Network Configuration Protocol (NETCONF)", RFC 6241, June 2011. |
[RFC6242] | Wasserman, M., "Using the NETCONF Protocol over Secure Shell (SSH)", RFC 6242, June 2011. |
[W3C.REC-exi-20110310] | Schneider, J. and T. Kamiya, "Efficient XML Interchange (EXI) Format 1.0", World Wide Web Consortium Recommendation REC-exi-20110310, March 2011. |