Internet Engineering Task Force | H. Shen |
Internet-Draft | B. Liu, Ed. |
Intended status: Standards Track | Huawei Technologies |
Expires: June 24, 2016 | D. Bannister |
M. Abrahamsson | |
T-Systems | |
December 22, 2015 |
A YANG Data Model for L2TPv3 Tunnel
draft-shen-l2tpext-l2tpv3-yang-model-03
This document defines a YANG data model for managing L2TPv3 tunnels.
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 June 24, 2016.
Copyright (c) 2015 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.
This document defines a YANG [RFC6020] [RFC6021] data model for L2TPv3 tunnels.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119] when they appear in ALL CAPS. When these words are not in ALL CAPS (such as "should" or "Should"), they have their usual English meanings, and are not to be interpreted as [RFC2119] key words.
Terminology:
The L2TPv3 YANG model mainly includes two objects. One (l2tpv3CtrlInstances) is for the L2TPv3 control plane configuration. The other one (l2tpv3TunnelInstances) is for managing the tunnels.
The overall structure of the model is dicpicted as the following.
module: ietf-l2tpv3 +--rw l2tpv3CtrlInstances | +--rw l2tpv3CtrlInstance* [ctrlName] | +-- rw ctrlName string | +-- rw hostName string | +-- rw routerID uint16 | +-- rw rcvWinSize? uint16 | +-- rw helloInterval? uint16 | +-- rw digestType? enum | +-- rw authenNonce? password +--rw l2tpv3TunnelInstances +--rw l2tpv3TunnelInstance* [tunnelName] +-- rw tunnelName string +-- rw sourceIfName if:interface-ref +-- rw sourceIP inet:ip-address +-- rw destIP inet:ip-address +-- rw tunnelType enum | +-- rw static: | | +-- rw localSessionId? uint32 | | +-- rw remoteSessionId? uint32 | | +-- rw localCookieAutoMode? enum | | | +-- rw authNone: | | | +-- rw authPlain: | | | +-- rw localCookieLength enum | | | +-- rw localHighCookie hexBinary | | | +-- rw localLowCookie hexBinary | | | +-- rw authCipher: | | | +--rw localCookieCipher password | | +-- rw remoteCookieAutoMode? enum | | +-- rw authNone: | | +-- rw authPlain: | | +--rw remoteCookieLength enum | | +--rw remoteHighCookie hexBinary | | +--rw remoteLowCookie hexBinary | | +-- rw authCipher: | | +--rw remoteCookieCipher password | +-- rw auto: | +-- rw ctrlName string | +-- rw encapType enum +-- ro sendPacket uint64 +-- ro sendByte uint64 +-- ro rcvPacket uint64 +-- ro receiveByte uint64 +-- ro recvDropPacket uint64 +-- ro cookieMisDropPacket uint64 +-- ro state enum
The l2tpv3CtrlInstance container is a template used for configuring the control plane of L2TPv3 tunnels. The leaves under the container are the parameters of the control signaling datagram processing.
One l2tpv3CtrlInstance could be binding to a specific l2tpv3TunnelInstances through the key "ctrlName" defined in auto mode of the tunnel. One l2tpv3CtrlInstance could also be shared among multiple l2tpv3TunnelInstances.
This container is to manage the L2TPv3 tunnels. Two tunnel modes are supported: one is static tunnel, the other is automatic tunnel.
The basic information of a tunnle contains following elements:
The tunnelType node is to distinguish statically configured tunnels and dynamically configured tunnels. For static tunnels, the relevant session and cookie information is included. For dynamic tunnels, only the corresponding control instance is referenced as a key there.
At the end, some stastic elements were defined to represent the running state of the tunnels.
<CODE BEGINS> file "ietf-l2tpv3@2015-12-23.yang" module ietf-l2tpv3 { namespace "urn:ietf:params:xml:ns:yang:ietf-l2tpv3"; prefix "l2tpv3"; import ietf-interfaces { prefix "if"; } /* import ietf-yang-types { prefix yang; } */ import ietf-inet-types { prefix "inet"; } organization "ietf l2tpv3 working group"; contact "shenhaoxing@huawei.com leo.liubing@huawei.com"; description "The module for implementing l2tpv3 protocol"; revision 2015-12-23 { description "version-03, lots of grammar revision to pass pyang compiler"; reference "draft-shen-l2tpext-l2tpv3-yang-model-02"; } typedef hexBinary { type string { length "1..127"; pattern "0[xX][0-9a-fA-F]+"; } description "This is a hexadecimal variable."; } typedef password { type string { length "1..127"; } description "This is a dedicated password variable."; } container l2tpv3CtrlInstances { description "This is some general configuration of an l2tpv3 tunnel."; list l2tpv3CtrlInstance { key "ctrlName"; description "There could be multiple control instances, each of them is mapping to a tunnel instance."; leaf ctrlName { type "string"{ length "1..19"; } description "The name of the control instance."; } leaf hostName { type "string"; mandatory "true"; description "The name of the host."; } leaf routerID { type "uint16"; mandatory "true"; description "Router ID."; } leaf rcvWinSize { type "uint16"; description "Receiving window size."; } leaf helloInterval { type "uint16"; description "Hello interval time."; } leaf digestType{ type enumeration { enum "HMAC_MD5" { description "HMAC_MD5 algorithm."; } enum "HMAC_SHA_1" { description "HMAC_SHA_1 algorithm."; } } description "Digest algorithm selection."; } leaf authenNonce{ type password { length "1..16"; } description "The authentication Nonce is in the password format."; } } } container l2tpv3TunnelInstance { description "In contrast to the above control instance, this configuration is regarding to the tunnel interface itself."; list l2tpv3TunnelInstance { key "tunnelName"; description "There could be multiple tunnel instance."; leaf tunnelName { type "string"{ length "1..19"; } description "The tunnel name."; } leaf sourceIfName { type if:interface-ref; description "Interface name as defined by ietf-interfaces"; } leaf sourceIP { type inet:ip-address; mandatory "true"; description "Source IP address."; } leaf destIP { type inet:ip-address; mandatory "true"; description "Destination IP address."; } leaf tnlType { type enumeration { enum "static" { description "Static tunnel."; } enum "auto" { description "Automatic IP address."; } } mandatory "true"; description "Tunnel type."; } choice tunnelType { mandatory "true"; description "Each tunnel can be configured to only one type."; case static{ when "tnlType = 'static'"; leaf localSessionId { type uint32 { range "1..4294967295"; } default "4294967295"; description "Local session ID of the tunnel."; } leaf remoteSessionId { type uint32 { range "1..4294967295"; } default "4294967295"; description "Remote session ID of the tunnel."; } leaf localCookieAutoMode { type enumeration { enum "authNone" { description "No authentication."; } enum "authPlain" { description "Plain text authentication."; } enum "authCipher" { description "Ciper authentication."; } } mandatory "true"; description "Local cookie authentication mode."; } choice localCookieMode { default authNone; description "Each tunnel can be configured to only one local cookie mode."; case authNone { when "localCookieAutoMode = 'authNone'"; } case authPlain { when "localCookieAutoMode = 'authPlain'"; leaf localCookieLength { type enumeration { enum "4" { description "4 byte cookie."; } enum "8" { description "8 byte cookie."; } } default "4"; description "Local cookie length."; } leaf localHighCookie { type "hexBinary"{ length "3..6"; } description "Local high cookie."; } leaf localLowCookie { type "hexBinary"{ length "3..6"; } description "Local low cookie."; } } case authCipher { when "localCookieAutoMode = 'authCipher'"; leaf localCookieCipher { type password { length "1..8"; } description "Local cookie cipher."; } } } leaf remoteCookieAutoMode { type enumeration { enum "authNone" { description "No authentication."; } enum "authPlain" { description "Plain text authentication."; } enum "authCipher" { description "Plain text authentication."; } } mandatory "true"; description "Remote Cookie AutoMode."; } choice remoteCookieMode { default authNone; description "Choosing one remote cookie mode."; case authNone { when "remoteCookieAutoMode = 'authNone'"; } case authPlain { when "remoteCookieAutoMode = 'authPlain'"; leaf remoteCookieLength { type enumeration { enum "4" { description "Cookie length is 4 byte."; } enum "8" { description "Cookie length is 4 byte."; } } default "4"; description "Remote Cookie length."; } leaf remoteHighCookie { type "hexBinary"{ length "3..6"; } description "Remote high Cookie."; } leaf remoteLowCookie { type "hexBinary"{ length "3..6"; } description "Remote low Cookie."; } } case authCipher { when "remoteCookieAutoMode = 'authCipher'"; leaf remoteCookieCipher { type password { length "1..8"; } description "Remote Cookie cipher."; } } } } case auto{ when "tnlType = 'auto'"; leaf ctrlName { type string{ length "1..19"; } mandatory "true"; description "Relevant control instance name."; } leaf encapType { type enumeration { enum "HDLC" { description "HDLC encapsulation."; } enum "Ethernet" { description "Ethernet encapsulation."; } enum "VLAN" { description "VLAN encapsulation."; } enum "ATM" { description "ATM encapsulation."; } } mandatory "true"; description "Encapsulation type."; } } } leaf sendPacket { type "uint64"; config "false"; description "Sent packet count."; } leaf sendByte { type "uint64"; config "false"; description "Sent byte count."; } leaf rcvPacket { type "uint64"; config "false"; description "Received packet count."; } leaf receiveByte { type "uint64"; config "false"; description "Received byte count."; } leaf recvDropPacket { type "uint64"; config "false"; description "Drop packet count among the received packets."; } leaf cookieMisDropPacket { type "uint64"; config "false"; description "Cookie mis-drop packet count."; } leaf state { type enumeration { enum "down" { value "0"; description "down:"; } enum "up" { value "1"; description "up:"; } } config "false"; description "Tunnel running state."; } } } } <CODE ENDS>
TBD.
This draft does not request any IANA action.
Gang Yan made significant contribution to design the YANG model. Valuable comment was received from Xianping Zhang to improve the draft.
This document was produced using the xml2rfc tool [RFC2629].
[RFC2119] | Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997. |
[RFC2629] | Rose, M., "Writing I-Ds and RFCs using XML", RFC 2629, DOI 10.17487/RFC2629, June 1999. |
[RFC3931] | Lau, J., Townsley, M. and I. Goyret, "Layer Two Tunneling Protocol - Version 3 (L2TPv3)", RFC 3931, DOI 10.17487/RFC3931, March 2005. |
[RFC6020] | Bjorklund, M., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, DOI 10.17487/RFC6020, October 2010. |
[RFC6021] | Schoenwaelder, J., "Common YANG Data Types", RFC 6021, DOI 10.17487/RFC6021, October 2010. |