< draft-shen-l2tpext-l2tpv3-yang-model-02.txt   draft-shen-l2tpext-l2tpv3-yang-model-03.txt >
Internet Engineering Task Force H. Shen Internet Engineering Task Force H. Shen
Internet-Draft B. Liu, Ed. Internet-Draft B. Liu, Ed.
Intended status: Standards Track Huawei Technologies Intended status: Standards Track Huawei Technologies
Expires: June 18, 2016 D. Bannister Expires: June 24, 2016 D. Bannister
M. Abrahamsson M. Abrahamsson
T-Systems T-Systems
December 16, 2015 December 22, 2015
A YANG Data Model for L2TPv3 Tunnel A YANG Data Model for L2TPv3 Tunnel
draft-shen-l2tpext-l2tpv3-yang-model-02 draft-shen-l2tpext-l2tpv3-yang-model-03
Abstract Abstract
This document defines a YANG data model for managing L2TPv3 tunnels. This document defines a YANG data model for managing L2TPv3 tunnels.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on June 18, 2016. This Internet-Draft will expire on June 24, 2016.
Copyright Notice Copyright Notice
Copyright (c) 2015 IETF Trust and the persons identified as the Copyright (c) 2015 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 13 skipping to change at page 2, line 13
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Requirements Language and Terminology . . . . . . . . . . . . 2 2. Requirements Language and Terminology . . . . . . . . . . . . 2
3. L2TPv3 YANG Model Overview . . . . . . . . . . . . . . . . . 2 3. L2TPv3 YANG Model Overview . . . . . . . . . . . . . . . . . 2
3.1. l2tpv3CtrlInstance . . . . . . . . . . . . . . . . . . . 4 3.1. l2tpv3CtrlInstance . . . . . . . . . . . . . . . . . . . 4
3.2. l2tpv3TunnelInstances . . . . . . . . . . . . . . . . . . 4 3.2. l2tpv3TunnelInstances . . . . . . . . . . . . . . . . . . 4
4. L2TPv3 YANG Module . . . . . . . . . . . . . . . . . . . . . 4 4. L2TPv3 YANG Module . . . . . . . . . . . . . . . . . . . . . 4
5. Security Considerations . . . . . . . . . . . . . . . . . . . 11 5. Security Considerations . . . . . . . . . . . . . . . . . . . 12
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 12
7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 11 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 13
8. Normative References . . . . . . . . . . . . . . . . . . . . 11 8. Normative References . . . . . . . . . . . . . . . . . . . . 13
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 12 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 13
1. Introduction 1. Introduction
This document defines a YANG [RFC6020] [RFC6021] data model for This document defines a YANG [RFC6020] [RFC6021] data model for
L2TPv3 tunnels. L2TPv3 tunnels.
2. Requirements Language and Terminology 2. Requirements Language and Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
skipping to change at page 4, line 42 skipping to change at page 4, line 42
The tunnelType node is to distinguish statically configured tunnels The tunnelType node is to distinguish statically configured tunnels
and dynamically configured tunnels. For static tunnels, the relevant and dynamically configured tunnels. For static tunnels, the relevant
session and cookie information is included. For dynamic tunnels, session and cookie information is included. For dynamic tunnels,
only the corresponding control instance is referenced as a key there. only the corresponding control instance is referenced as a key there.
At the end, some stastic elements were defined to represent the At the end, some stastic elements were defined to represent the
running state of the tunnels. running state of the tunnels.
4. L2TPv3 YANG Module 4. L2TPv3 YANG Module
<CODE BEGINS> file "ietf-l2tpv3@2015-12-15.yang" <CODE BEGINS> file "ietf-l2tpv3@2015-12-23.yang"
module ietf-l2tpv3 { module ietf-l2tpv3 {
namespace "urn:ietf:params:xml:ns:yang:ietf-l2tpv3"; namespace "urn:ietf:params:xml:ns:yang:ietf-l2tpv3";
prefix "l2tpv3"; prefix "l2tpv3";
import ietf-interfaces { import ietf-interfaces {
prefix if; prefix "if";
} }
/*
import ietf-yang-types { /* import ietf-yang-types {
prefix yang; prefix yang;
} }
*/ */
import ietf-inet-types { import ietf-inet-types {
prefix inet; prefix "inet";
} }
organization "ietf l2tpv3 working group"; organization "ietf l2tpv3 working group";
contact "shenhaoxing@huawei.com contact "shenhaoxing@huawei.com
leo.liubing@huawei.com leo.liubing@huawei.com";
David.Bannister@t-systems.com
mikael.abrahamsson@t-systems.se";
description "The module for implementing l2tpv3 protocol"; description "The module for implementing l2tpv3 protocol";
revision 2015-12-15 {description "version-01, minor grammar revision to pass pyang compiler";} 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 { typedef hexBinary {
type string { type string {
length "1..127"; length "1..127";
pattern "0[xX][0-9a-fA-F]+"; pattern "0[xX][0-9a-fA-F]+";
} }
description "This is a hexadecimal variable.";
} }
typedef password { typedef password {
type string { type string {
length "1..127"; length "1..127";
} }
description "This is a dedicated password variable.";
} }
container l2tpv3CtrlInstances { container l2tpv3CtrlInstances {
description "This is some general configuration of an l2tpv3 tunnel.";
list l2tpv3CtrlInstance { list l2tpv3CtrlInstance {
key "ctrlName"; key "ctrlName";
min-elements "0"; 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 ctrlName {
config "true";
type "string"{
length "1..19";
}
} }
leaf hostName { leaf hostName {
config "true";
type "string"; type "string";
mandatory "true"; mandatory "true";
description "The name of the host.";
} }
leaf routerID { leaf routerID {
config "true";
type "uint16"; type "uint16";
mandatory "true"; mandatory "true";
description "Router ID.";
} }
leaf rcvWinSize { leaf rcvWinSize {
config "true";
type "uint16"; type "uint16";
description "Receiving window size.";
} }
leaf helloInterval { leaf helloInterval {
config "true";
type "uint16"; type "uint16";
description "Hello interval time.";
} }
leaf digestType{ leaf digestType{
config "true";
type enumeration { type enumeration {
enum "HMAC_MD5"; enum "HMAC_MD5" {
enum "HMAC_SHA_1"; description "HMAC_MD5 algorithm.";
} }
enum "HMAC_SHA_1" {
description "HMAC_SHA_1 algorithm.";
}
}
description "Digest algorithm selection.";
} }
leaf authenNonce{ leaf authenNonce{
config "true";
type password { type password {
length "1..16"; length "1..16";
} }
description "The authentication Nonce is in the password format.";
} }
} }
} }
container l2tpv3TunnelInstance { container l2tpv3TunnelInstance {
description "In contrast to the above control instance,
this configuration is regarding to the
tunnel interface itself.";
list l2tpv3TunnelInstance { list l2tpv3TunnelInstance {
key "tunnelName";
description "There could be multiple tunnel instance.";
key "tunnelName"; leaf tunnelName {
min-elements "0";
leaf tunnelName {
config "true";
type "string"{ type "string"{
length "1..19"; length "1..19";
} }
description "The tunnel name.";
} }
leaf sourceIfName { leaf sourceIfName {
config "true";
type if:interface-ref; type if:interface-ref;
description description
"Interface name as defined by ietf-interfaces"; "Interface name as defined by ietf-interfaces";
} }
leaf sourceIP { leaf sourceIP {
config "true";
mandatory "true";
type inet:ip-address; type inet:ip-address;
mandatory "true";
description "Source IP address.";
} }
leaf destIP { leaf destIP {
config "true";
mandatory "true";
type inet:ip-address; type inet:ip-address;
mandatory "true";
description "Destination IP address.";
} }
leaf tnlType { leaf tnlType {
config "true"; type enumeration {
mandatory "true"; enum "static" {
type enumeration { description "Static tunnel.";
enum "static"; }
enum "auto"; enum "auto" {
description "Automatic IP address.";
}
} }
mandatory "true";
description "Tunnel type.";
} }
choice tunnelType { choice tunnelType {
mandatory "true"; mandatory "true";
description "Each tunnel can be configured to only one type.";
case static{ case static{
when "tnlType = 'static'"; when "tnlType = 'static'";
leaf localSessionId { leaf localSessionId {
config "true";
default "4294967295";
type uint32 { type uint32 {
range "1..4294967295"; range "1..4294967295";
} }
default "4294967295";
description "Local session ID of the tunnel.";
} }
leaf remoteSessionId { leaf remoteSessionId {
config "true";
default "4294967295";
type uint32 { type uint32 {
range "1..4294967295"; range "1..4294967295";
} }
default "4294967295";
description "Remote session ID of the tunnel.";
} }
leaf localCookieAutoMode { leaf localCookieAutoMode {
config "true";
mandatory "true";
type enumeration { type enumeration {
enum "authNone"; enum "authNone" {
enum "authPlain"; description "No authentication.";
enum "authCipher"; }
enum "authPlain" {
description "Plain text authentication.";
}
enum "authCipher" {
description "Ciper authentication.";
}
} }
mandatory "true";
description "Local cookie authentication mode.";
} }
choice localCookieMode { choice localCookieMode {
default authNone; default authNone;
config true; description "Each tunnel can be configured to only one local cookie mode.";
case authNone { case authNone {
when "localCookieAutoMode = 'authNone'"; when "localCookieAutoMode = 'authNone'";
} }
case authPlain { case authPlain {
when "localCookieAutoMode = 'authPlain'"; when "localCookieAutoMode = 'authPlain'";
leaf localCookieLength { leaf localCookieLength {
config "true";
default "4";
type enumeration { type enumeration {
enum "4"; enum "4" {
enum "8"; description "4 byte cookie.";
}
enum "8" {
description "8 byte cookie.";
}
} }
default "4";
description "Local cookie length.";
} }
leaf localHighCookie { leaf localHighCookie {
config "true";
type "hexBinary"{ type "hexBinary"{
length "3..6"; length "3..6";
} }
description "Local high cookie.";
} }
leaf localLowCookie { leaf localLowCookie {
config "true";
type "hexBinary"{ type "hexBinary"{
length "3..6"; length "3..6";
} }
description "Local low cookie.";
} }
} }
case authCipher { case authCipher {
when "localCookieAutoMode = 'authCipher'"; when "localCookieAutoMode = 'authCipher'";
leaf localCookieCipher { leaf localCookieCipher {
config "true";
type password { type password {
length "1..8"; length "1..8";
} }
description "Local cookie cipher.";
} }
} }
} }
leaf remoteCookieAutoMode { leaf remoteCookieAutoMode {
config "true";
mandatory "true";
type enumeration { type enumeration {
enum "authNone"; enum "authNone" {
enum "authPlain"; description "No authentication.";
enum "authCipher"; }
enum "authPlain" {
description "Plain text authentication.";
}
enum "authCipher" {
description "Plain text authentication.";
}
} }
mandatory "true";
description "Remote Cookie AutoMode.";
} }
choice remoteCookieMode { choice remoteCookieMode {
default authNone; default authNone;
config true; description "Choosing one remote cookie mode.";
case authNone { case authNone {
when "remoteCookieAutoMode = 'authNone'"; when "remoteCookieAutoMode = 'authNone'";
} }
case authPlain { case authPlain {
when "remoteCookieAutoMode = 'authPlain'"; when "remoteCookieAutoMode = 'authPlain'";
leaf remoteCookieLength { leaf remoteCookieLength {
config "true";
default "4";
type enumeration { type enumeration {
enum "4"; enum "4" {
enum "8"; description "Cookie length is 4 byte.";
}
enum "8" {
description "Cookie length is 4 byte.";
}
} }
default "4";
description "Remote Cookie length.";
} }
leaf remoteHighCookie { leaf remoteHighCookie {
config "true";
type "hexBinary"{ type "hexBinary"{
length "3..6"; length "3..6";
} }
description "Remote high Cookie.";
} }
leaf remoteLowCookie { leaf remoteLowCookie {
config "true";
type "hexBinary"{ type "hexBinary"{
length "3..6"; length "3..6";
} }
description "Remote low Cookie.";
} }
} }
case authCipher { case authCipher {
when "remoteCookieAutoMode = 'authCipher'"; when "remoteCookieAutoMode = 'authCipher'";
leaf remoteCookieCipher { leaf remoteCookieCipher {
config "true";
type password { type password {
length "1..8"; length "1..8";
} }
description "Remote Cookie cipher.";
} }
} }
} }
} }
case auto{ case auto{
when "tnlType = 'auto'"; when "tnlType = 'auto'";
leaf ctrlName { leaf ctrlName {
config "true";
type string{ type string{
length "1..19"; length "1..19";
} }
mandatory "true"; mandatory "true";
description "Relevant control instance name.";
} }
leaf encapType { leaf encapType {
config "true";
mandatory "true";
type enumeration type enumeration
{ {
enum "HDLC"; enum "HDLC" {
enum "Ethernet"; description "HDLC encapsulation.";
enum "VLAN"; }
enum "ATM"; enum "Ethernet" {
description "Ethernet encapsulation.";
}
enum "VLAN" {
description "VLAN encapsulation.";
}
enum "ATM" {
description "ATM encapsulation.";
}
} }
mandatory "true";
description "Encapsulation type.";
} }
} }
} }
leaf sendPacket { leaf sendPacket {
config "false";
type "uint64"; type "uint64";
config "false";
description "Sent packet count.";
} }
leaf sendByte { leaf sendByte {
config "false";
type "uint64"; type "uint64";
config "false";
description "Sent byte count.";
} }
leaf rcvPacket { leaf rcvPacket {
config "false";
type "uint64"; type "uint64";
config "false";
description "Received packet count.";
} }
leaf receiveByte { leaf receiveByte {
config "false";
type "uint64"; type "uint64";
config "false";
description "Received byte count.";
} }
leaf recvDropPacket { leaf recvDropPacket {
config "false";
type "uint64"; type "uint64";
config "false";
description "Drop packet count among the received packets.";
} }
leaf cookieMisDropPacket { leaf cookieMisDropPacket {
config "false";
type "uint64"; type "uint64";
config "false";
description "Cookie mis-drop packet count.";
} }
leaf state { leaf state {
config "false";
type enumeration { type enumeration {
enum "down" { enum "down" {
value "0"; value "0";
description "down:"; description "down:";
} }
enum "up" { enum "up" {
value "1"; value "1";
description "up:"; description "up:";
} }
} }
config "false";
description "Tunnel running state.";
} }
} }
} }
} }
<CODE ENDS> <CODE ENDS>
5. Security Considerations 5. Security Considerations
TBD. TBD.
 End of changes. 94 change blocks. 
99 lines changed or deleted 176 lines changed or added

This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/