Internet DRAFT - draft-liu-intarea-gre-tunnel-yang
draft-liu-intarea-gre-tunnel-yang
Network Working Group Y. Liu
Q. Chen
Internet Draft A. Foldes
Intended status: Proposed Standard Ericsson
Expires: April 13, 2016 October 13, 2015
Yang Data Model for GRE Tunnel
draft-liu-intarea-gre-tunnel-yang-00.txt
Status of this Memo
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 13, 2016.
Copyright Notice
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.
Abstract
Liu&Foldes Expires April 13, 2016 [Page 1]
Internet-Draft Yang Data Model for GRE Tunnel October 2015
This document defines a YANG data model for the management of GRE
tunnels. The data model covers configuration data and operational
state data.
Table of Contents
1. Introduction...................................................2
1.1. Terminology...............................................2
1.2. Tree Diagrams.............................................2
2. GRE Tunnel Data Model..........................................3
3. GRE Tunnel YANG Model..........................................6
4. Security Considerations.......................................20
5. IANA Considerations...........................................21
6. Acknowledgements..............................................21
7. References....................................................21
7.1. Normative References.....................................21
7.2. Informative References...................................21
1. Introduction
This document defines a YANG [RFC6020] data model for the management
of GRE tunnels. It covers the following types.
1.1. Terminology
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].
1.2. Tree Diagrams
A simplified graphical representation of the data model is used in
this document. The meaning of the symbols in these diagrams is as
follows:
o Brackets "[" and "]" enclose list keys.
o Abbreviations before data node names: "rw" means configuration
(read-write), and "ro" means state data (read-only).
o Symbols after data node names: "?" means an optional node, "!"
means a presence container, and "*" denotes a list and leaf-list.
o Parentheses enclose choice and case nodes, and case nodes are
also marked with a colon (":").
Liu Expire April 13, 2016 [Page 2]
Internet-Draft Yang Data Model for GRE Tunnel October 2015
o Ellipsis ("...") stands for contents of subtrees that are not
shown.
2. GRE Tunnel Data Model
This document defines the YANG model "ietf-gre-tunnel", which
includes two modules, one for configuration and one for state. The
data model has the following tree diagram for the GRE tunnels:
module: ietf-gre-tunnel
+--rw gre-tunnels
| +--rw gre* [name]
| +--rw name string
| +--rw description? string
| +--rw bind-interface? if:interface-ref
| +--rw clear-df? empty
| +--rw keepalive
| | +--rw interval? uint32
| | +--rw retry-num? uint32
| +--rw mirror-destination? string
| +--rw mtu? uint16
| +--rw shutdown? empty
| +--rw hop-limit? uint8
| +--rw tos? int8
| +--rw peer-end-point
| | +--rw local? inet:ipv4-address-no-zone
| | +--rw remote? inet:ipv4-address-no-zone
| | +--rw routing-instance? rt:routing-instance-ref
Liu Expire April 13, 2016 [Page 3]
Internet-Draft Yang Data Model for GRE Tunnel October 2015
| +--rw tunnel-circuits* [key-id]
| +--rw key-id uint32
| +--rw description? string
| +--rw bind-interface? if:interface-ref
| +--rw clear-df? empty
| +--rw keepalive
| | +--rw interval? uint32
| | +--rw retry-num? uint32
| +--rw mirror-destination? string
| +--rw mtu? uint16
| +--rw shutdown? empty
| +--rw hop-limit? uint8
| +--rw tos? int8
+--ro tunnel-state
+--ro gre*
+--ro name? string
+--ro local-ip? inet:ipv4-address-no-zone
+--ro remote-ip? inet:ipv4-address-no-zone
+--ro state? enumeration
+--ro bind-interface? if:interface-state-ref
+--ro routing-instance? rt:routing-instance-ref
+--ro mtu? uint16
+--ro clear-df? empty
+--ro tunnel-id? uint32
Liu Expire April 13, 2016 [Page 4]
Internet-Draft Yang Data Model for GRE Tunnel October 2015
+--ro down-reason? string
+--ro resolved-interface-name? string
+--ro hop-limit? uint8
+--ro tos? int8
+--ro keepalive
| +--ro interval? uint32
| +--ro retry-num? uint32
+--ro tunnel-circuits*
+--ro key-id? uint32
+--ro name? string
+--ro local-ip? inet:ipv4-address-no-
zone
+--ro remote-ip? inet:ipv4-address-no-
zone
+--ro state? enumeration
+--ro bind-interface? if:interface-state-ref
+--ro routing-instance? rt:routing-instance-ref
+--ro mtu? uint16
+--ro clear-df? empty
+--ro tunnel-id? uint32
+--ro down-reason? string
+--ro resolved-interface-name? string
+--ro hop-limit? uint8
+--ro tos? int8
+--ro keepalive
Liu Expire April 13, 2016 [Page 5]
Internet-Draft Yang Data Model for GRE Tunnel October 2015
+--ro interval? uint32
+--ro retry-num? uint32
augment /if:interfaces-state/if:interface:
+--ro gre-tunnel-enabled? boolean
3. GRE Tunnel YANG Model
<CODE BEGINS>
module ietf-gre-tunnel {
namespace "urn:ietf:params:xml:ns:yang:ietf-gre-tunnel";
prefix "gretln";
import ietf-interfaces {
prefix "if";
}
import ietf-inet-types {
prefix inet;
}
import ietf-routing {
prefix "rt";
}
organization
Liu Expire April 13, 2016 [Page 6]
Internet-Draft Yang Data Model for GRE Tunnel October 2015
"Ericsson.";
contact
"Mandy.Liu@ericsson.com
Adam.Foldes@ericsson.com";
description
"This YANG model defines the configuration data
and operational state data for GRE tunnel.";
revision 2015-10-13 {
description
"Initial revision.";
reference
"RFC XXXX: A YANG Data Model for GRE Tunnel.";
}
grouping tunnel-gre-components {
description
"This grouping provides common attributes for
GRE tunnels and tunnel circuits.";
leaf description {
type string;
Liu Expire April 13, 2016 [Page 7]
Internet-Draft Yang Data Model for GRE Tunnel October 2015
description
"Textual description for a tunnel. Can be any
alphanumeric string, including spaces, not to
exceed 255 ASCII characters.";
}
leaf bind-interface {
type if:interface-ref;
description
"Bind to an interface.";
}
leaf clear-df {
type empty;
description
"If clear-df is absent, it means that fragmentation
of tunnel packets are permitted. If clear-df is
present, it means that fragmentation of tunnel packets
are not permitted.";
}
container keepalive {
description
"Enables sending keepalive packets on GRE tunnels,
and specifies the interval and number of retries.";
leaf interval {
type uint32 {
Liu Expire April 13, 2016 [Page 8]
Internet-Draft Yang Data Model for GRE Tunnel October 2015
range "5..40";
}
units "seconds";
default "10";
description
"Number of seconds between sending keepalive packets.";
}
leaf retry-num {
type uint32 {
range "2..255";
}
default "4";
description
"Number of times a keepalive packet is sent without
response before the tunnel is brought down.";
}
}
leaf mirror-destination {
type string;
description
"Designate the name of a tunnel as a circuit
mirror destination. ";
}
leaf mtu {
Liu Expire April 13, 2016 [Page 9]
Internet-Draft Yang Data Model for GRE Tunnel October 2015
type uint16 {
range "256..16384";
}
description
"Sets the Maximum Transmission Unit (MTU) size for
packets sent in a tunnel. The default MTU is the MTU
for the interface to which the tunnel is bound.";
}
leaf shutdown {
type empty;
description
"Disable/enable the tunnel.";
}
leaf hop-limit {
type uint8 {
range "0|1..255";
}
description
"The IPv4 TTL or IPv6 Hop Limit which is used in the outer IP
header. A value of 0 indicates that the value is copied from
the payload's header.";
}
leaf tos {
type int8 {
Liu Expire April 13, 2016 [Page 10]
Internet-Draft Yang Data Model for GRE Tunnel October 2015
range "-1..63";
}
description
"The method used to set the high 6 bits (the differentiated
services codepoint) of the IPv4 TOS or IPv6 Traffic Class in
the outer IP header. A value of -1 indicates that the bits are
copied from the payload's header. A value between 0 and 63
inclusive indicates that the bit field is set to the indicated
value.";
}
}
/*Configuration Data*/
container gre-tunnels {
description
"Configuration data for tunnels.";
list gre {
key "name";
description
"Configuration of GRE tunnel.";
leaf name {
type string;
description
Liu Expire April 13, 2016 [Page 11]
Internet-Draft Yang Data Model for GRE Tunnel October 2015
"Name of the tunnel.";
}
uses tunnel-gre-components;
container peer-end-point {
description
"Assigns IP addresses to tunnel endpoints.";
leaf local {
type inet:ipv4-address-no-zone;
description
"IP address of the local end of the tunnel.";
}
leaf remote {
type inet:ipv4-address-no-zone;
description
"IP address of the remote end of the tunnel.";
}
leaf routing-instance {
type rt:routing-instance-ref;
description
"Name of the reference routing instance.";
}
}
list tunnel-circuits {
key "key-id";
Liu Expire April 13, 2016 [Page 12]
Internet-Draft Yang Data Model for GRE Tunnel October 2015
description
"Configuration of GRE tunnel circuit.";
leaf key-id {
type uint32;
description
"Specifies a key ID in the current GRE tunnel.";
}
uses tunnel-gre-components;
}
}
}
/*Operational state data*/
grouping tunnel-gre-states {
description
"The basic tunnel information to be displayed.";
leaf name {
type string;
description
"Name of the tunnel.";
}
leaf local-ip {
type inet:ipv4-address-no-zone;
description
Liu Expire April 13, 2016 [Page 13]
Internet-Draft Yang Data Model for GRE Tunnel October 2015
"IP address of the local end of the tunnel.";
}
leaf remote-ip {
type inet:ipv4-address-no-zone;
description
"IP address of the remote end of the tunnel.";
}
leaf state {
type enumeration {
enum Down {
description
"Tunnel down state.";
}
enum Up {
description
"Tunnel up state.";
}
enum Shutdown {
description
"Tunnel shutdown state.";
}
enum Keep-down {
description
"Tunnel keepalive down state.";
Liu Expire April 13, 2016 [Page 14]
Internet-Draft Yang Data Model for GRE Tunnel October 2015
}
enum Wait-on-SA {
description
"Tunnel pending SA UP state.";
}
enum Not-used {
description
"Tunnel is not in used.";
}
}
description
"Indicates the state of the tunnel.";
}
leaf bind-interface {
type if:interface-state-ref;
description
"The name of the interface to which the tunnel is bound.";
}
leaf routing-instance {
type rt:routing-instance-ref;
description
"Indicates the name of the reference routing instance.";
}
leaf mtu {
Liu Expire April 13, 2016 [Page 15]
Internet-Draft Yang Data Model for GRE Tunnel October 2015
type uint16;
description
"The Maximum Transmission Unit (MTU) size for
packets sent in a tunnel.";
}
leaf clear-df {
type empty;
description
"Indicate that the DF bit is cleared.";
}
leaf tunnel-id {
type uint32;
description
"Tunnel id.";
}
leaf down-reason {
type string;
description
"Indicate the down reason of the tunnel.";
}
leaf resolved-interface-name{
type string;
description
"The egress interface name of the tunnel.";
Liu Expire April 13, 2016 [Page 16]
Internet-Draft Yang Data Model for GRE Tunnel October 2015
}
leaf hop-limit {
type uint8;
description
"The IPv4 TTL or IPv6 Hop Limit which is used in the outer IP
header. A value of 0 indicates that the calue is copied from
the payload's header.";
}
leaf tos {
type int8;
description
"The high 6 bits (the differentiated
services codepoint) of the IPv4 TOS or IPv6 Traffic Class in
the outer IP header. A value of -1 indicates that the bits are
copied from the payload's header. A value between 0 and 63
inclusive indicates that the bit field is set to the indicated
value.";
}
}
container tunnel-state {
config "false";
description
"Contain the information currently configured tunnels.";
Liu Expire April 13, 2016 [Page 17]
Internet-Draft Yang Data Model for GRE Tunnel October 2015
list gre {
description
"Operational state data of GRE tunnel.";
uses tunnel-gre-states;
container keepalive {
description
"The interval and number of retries for
sending keepalive packets on GRE tunnels.";
leaf interval {
type uint32;
units "seconds";
description
"Number of seconds between sending keepalive packets.";
}
leaf retry-num {
type uint32;
description
"Number of times a keepalive packet is sent without
response before the tunnel is brought down.";
}
}
list tunnel-circuits {
description
Liu Expire April 13, 2016 [Page 18]
Internet-Draft Yang Data Model for GRE Tunnel October 2015
"Operational state data of GRE tunnel circuit.";
leaf key-id {
type uint32;
description
"Key ID of the GRE tunnel circuit.";
}
uses tunnel-gre-states;
container keepalive {
description
"The interval and number of retries for
sending keepalive packets on GRE tunnels.";
leaf interval {
type uint32;
units "seconds";
description
"Number of seconds between sending keepalive
packets.";
}
leaf retry-num {
type uint32;
description
"Number of times a keepalive packet is sent without
response before the tunnel is brought down.";
}
Liu Expire April 13, 2016 [Page 19]
Internet-Draft Yang Data Model for GRE Tunnel October 2015
}
}
}
}
//Augment operational state data of IP interfaces
augment "/if:interfaces-state/if:interface" {
when "if:type = 'ianaift:tunnel'" {
description
"Augment IP interface.";
}
description
"Augment operational state data of IP interfaces.";
leaf gre-tunnel-enabled {
type boolean;
description
"Indicate the type of the IP tunnel interface.
TRUE means GRE tunnel interface.";
}
}
}// end of module ietf-gre-tunnel
<CODE ENDS>
4. Security Considerations
This document does not introduce any new security risk.
Liu Expire April 13, 2016 [Page 20]
Internet-Draft Yang Data Model for GRE Tunnel October 2015
5. IANA Considerations
This document makes no request of IANA.
6. Acknowledgements
The authors would like to thank Xufeng Liu, In-Wher Chen for their
contributions to this work.
7. References
7.1. Normative References
[RFC1981] J. McCann, "Path MTU Discovery for IP version 6", RFC
1981, August 1996.
[RFC1702] S. Hanks, "Generic Routing Encapsulation over IPv4
networks", RFC 1702, October 1994.
[RFC2784] D. Farinacci, "Generic Routing Encapsulation", RFC 2784,
March 2000.
[RFC2893] R. Gilligan, "Transition Mechanisms for IPv6 Hosts and
Routers", RFC 2893, August 2000.
[RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the
Network Configuration Protocol (NETCONF)", RFC 6020,
October 2010.
7.2. Informative References
[RFC6241] Enns, R., Bjorklund, M., Schoenwaelder, J., and A.
Bierman, "Network Configuration Protocol (NETCONF)", RFC
6241, June 2011.
[RFC7223] Bjorklund, M., "A YANG Data Model for Interface
Management", RFC 7223, May 2014.
Liu Expire April 13, 2016 [Page 21]
Internet-Draft Yang Data Model for GRE Tunnel October 2015
Authors' Addresses
Ying Liu
Ericsson
No.5 Lize East Street
Beijing, 100102
China
Email: Mandy.Liu@ericsson.com
Qiang Chen
Ericsson
No.5 Lize East Street
Beijing, 100102
China
Email: Qiang.Chen@ericsson.com
Adam Mate Foldes
Ericsson
300 Holger Way
San Jose, CA 95134
USA
Email: Adam.Foldes@ericsson.com
Liu Expire April 13, 2016 [Page 22]