Network Working Group Y. Liu Internet Draft A. Foldes Intended status: Proposed Standard Ericsson Expires: January 20, 2016 July 20, 2015 Yang Data Model for IPIPv4 Tunnel draft-liu-rtgwg-ipipv4-tunnel-yang-01.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 January 20, 2009. 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 This document defines a YANG data model for the management of IPv4 or IPv6 over IPv4 tunnels. The data model covers configuration data, operational state data and RPC execution commands. Liu&Foldes Expires January 20, 2016 [Page 1] Internet-Draft Yang Data Model for IPIP Tunnel July 2015 Table of Contents 1. Introduction...................................................2 1.1. Terminology...............................................2 1.2. Tree Diagrams.............................................2 2. IPv4 Tunnel Data Model.........................................3 3. IPv4 Tunnel YANG Model.........................................7 4. Security Considerations.......................................22 5. IANA Considerations...........................................22 6. Acknowledgements..............................................22 7. References....................................................22 7.1. Normative References.....................................22 7.2. Informative References...................................22 1. Introduction This document defines a YANG [RFC6020] data model for the management of IPv6/4-in-IPv4 tunnels. It covers the following types. o IPv4 in IPv4, related concepts are defined in [RFC1853] o IPv6 in IPv4 manual tunnel, related concepts are defined in [RFC2003] o IPv6 to IPv4 tunnel, related concepts are defined in [RFC3056] 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. Liu&Foldes Expires January 2520, 2016 [Page 2] Internet-Draft Yang Data Model for IPIP Tunnel July 2015 o Parentheses enclose choice and case nodes, and case nodes are also marked with a colon (":"). o Ellipsis ("...") stands for contents of subtrees that are not shown. 2. IPv4 Tunnel Data Model This document defines the YANG model "ietf-ipipv4-tunnel", which includes two modules, one for configuration and one for state. The data model has the following tree diagram for the IPv4 tunnels: module: ietf-ipipv4-tunnel +--rw tunnels | +--rw ip-in-ip* [name] | | +--rw name string | | +--rw description? string | | +--rw bind-interface? if:interface-ref | | +--rw clear-df? empty | | +--rw shutdown? empty | | +--rw mtu? uint16 | | +--rw mirror-destination? string | | +--rw hop-limit? uint32 | | +--rw tos? int32 | | +--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 | +--rw ipv6to4* [name] | | +--rw name string Liu&Foldes Expires January 2520, 2016 [Page 3] Internet-Draft Yang Data Model for IPIP Tunnel July 2015 | | +--rw description? string | | +--rw bind-interface? if:interface-ref | | +--rw clear-df? empty | | +--rw shutdown? empty | | +--rw mtu? uint16 | | +--rw mirror-destination? string | | +--rw hop-limit? uint32 | | +--rw tos? int32 | | +--rw peer-end-point | | +--rw local? inet:ipv4-address-no-zone | +--rw ipv6v4-manual* [name] | +--rw name string | +--rw description? string | +--rw bind-interface? if:interface-ref | +--rw clear-df? empty | +--rw shutdown? empty | +--rw mtu? uint16 | +--rw mirror-destination? string | +--rw hop-limit? uint32 | +--rw tos? int32 | +--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&Foldes Expires January 2520, 2016 [Page 4] Internet-Draft Yang Data Model for IPIP Tunnel July 2015 +--ro tunnel-state +--ro ip-in-ip* | +--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 user-configured? boolean | +--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? uint32 | +--ro tos? int32 +--ro ipv6to4* | +--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 user-configured? boolean | +--ro routing-instance? rt:routing-instance-ref Liu&Foldes Expires January 2520, 2016 [Page 5] Internet-Draft Yang Data Model for IPIP Tunnel July 2015 | +--ro mtu? uint16 | +--ro clear-df? empty | +--ro tunnel-id? uint32 | +--ro down-reason? string | +--ro resolved-interface-name? string | +--ro hop-limit? uint32 | +--ro tos? int32 +--ro ipv6v4-manual* +--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 user-configured? boolean +--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? uint32 +--ro tos? int32 augment /if:interfaces-state/if:interface: +--ro tunnel? tunnel-type Liu&Foldes Expires January 2520, 2016 [Page 6] Internet-Draft Yang Data Model for IPIP Tunnel July 2015 3. IPv4 Tunnel YANG Model module ietf-ipipv4-tunnel { namespace "urn:ietf:params:xml:ns:yang:ietf-ipipv4-tunnel"; prefix "v4tln"; import ietf-interfaces { prefix "if"; } import ietf-inet-types { prefix inet; } import ietf-routing { prefix "rt"; } organization "Ericsson."; contact "Mandy.Liu@ericsson.com Liu&Foldes Expires January 2520, 2016 [Page 7] Internet-Draft Yang Data Model for IPIP Tunnel July 2015 Adam.Foldes@ericsson.com"; description "This YANG model defines the configuration data and operational state data for generic IPv4/6-in-IPv4 tunnel. It includes the IPv4 in IPv4, IPv6 to IPv4 auto and IPv6 over IPv4 manual tunnels."; revision 2015-07-20 { description "This version adds the following new items: - hop-limit - tos - tunnel-type This version changes 'ipv6to4-auto' to 'ipv6to4'"; reference "RFC XXXX: A YANG Data Model for IPv4 Tunnel."; } revision 2015-05-27 { description "Initial revision."; reference "RFC XXXX: A YANG Data Model for IPv4 Tunnel."; Liu&Foldes Expires January 2520, 2016 [Page 8] Internet-Draft Yang Data Model for IPIP Tunnel July 2015 } /* Typedefs */ typedef tunnel-type { type enumeration { enum ip-ip { description "IPv4-in-IPv4 tunnel interface."; } enum ipv6v4-manual { description "IPv6v4-manual tunnel interface."; } enum ipv6to4 { description "The 6to4 tunnel interface."; } } description "Indicate the type of the IP tunnel."; } /* Grouping for tunnel */ grouping tunnel-components { Liu&Foldes Expires January 2520, 2016 [Page 9] Internet-Draft Yang Data Model for IPIP Tunnel July 2015 description "Specify the IP addresses of the local and remote tunnel endpoint interfaces. Bind the tunnel circuit interface to the tunnel. Enable the tunnel."; leaf name { type string { length "1..50"; } description "Name of the tunnel."; } leaf description { type string { length "1..255"; } 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 Liu&Foldes Expires January 2520, 2016 [Page 10] Internet-Draft Yang Data Model for IPIP Tunnel July 2015 "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."; } leaf shutdown { type empty; description "Disable/enable the tunnel."; } leaf mtu { 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."; } Liu&Foldes Expires January 2520, 2016 [Page 11] Internet-Draft Yang Data Model for IPIP Tunnel July 2015 leaf mirror-destination { type string { length "1..39"; } description "Designate the name of a tunnel as a circuit mirror destination. "; } leaf hop-limit { type uint32 { 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 calue is copied from the payload's header."; } leaf tos { type int32 { 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 Liu&Foldes Expires January 2520, 2016 [Page 12] Internet-Draft Yang Data Model for IPIP Tunnel July 2015 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 tunnels { description "Configuration data for tunnels."; list ip-in-ip { key "name"; description "Configuration of ip-in-ip tunnel."; uses tunnel-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."; } Liu&Foldes Expires January 2520, 2016 [Page 13] Internet-Draft Yang Data Model for IPIP Tunnel July 2015 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 ipv6to4 { key "name"; description "Configuration of the 6to4 model tunnel."; uses tunnel-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."; Liu&Foldes Expires January 2520, 2016 [Page 14] Internet-Draft Yang Data Model for IPIP Tunnel July 2015 } } } list ipv6v4-manual { key "name"; description "Configuration of IPv6-over-v4 manual model tunnel."; uses tunnel-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 Liu&Foldes Expires January 2520, 2016 [Page 15] Internet-Draft Yang Data Model for IPIP Tunnel July 2015 "Name of the reference routing instance. "; } } } } /*Operational state data*/ grouping tunnel-state-components { description "The basic tunnel information to be displayed."; leaf name { type string { length "1..50"; } description "Name of the tunnel."; } leaf local-ip { type inet:ipv4-address-no-zone; description "IP address of the local end of the tunnel."; } Liu&Foldes Expires January 2520, 2016 [Page 16] Internet-Draft Yang Data Model for IPIP Tunnel July 2015 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."; } } description "Indicate the state of the tunnel."; } leaf bind-interface { Liu&Foldes Expires January 2520, 2016 [Page 17] Internet-Draft Yang Data Model for IPIP Tunnel July 2015 type if:interface-state-ref; description "Bind to an interface."; } leaf user-configured { type boolean; description "Indicate the tunnel is user-configured or dynamic. False is for dynamic."; } leaf routing-instance { type rt:routing-instance-ref; description "Name of the reference routing instance. "; } leaf mtu { type uint16; description "The Maximum Transmission Unit (MTU) size for packets sent in a tunnel."; } leaf clear-df { type empty; description Liu&Foldes Expires January 2520, 2016 [Page 18] Internet-Draft Yang Data Model for IPIP Tunnel July 2015 "Indicate that the DF bit is cleared."; } leaf tunnel-id { type uint32; description "Tunnel id."; } leaf down-reason { type string; description "The reason of the tunnel is down."; } leaf resolved-interface-name{ type string; description "The egress interface name of the tunnel."; } leaf hop-limit { type uint32; 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."; } Liu&Foldes Expires January 2520, 2016 [Page 19] Internet-Draft Yang Data Model for IPIP Tunnel July 2015 leaf tos { type int32; 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."; list ip-in-ip { description "Operational state data of ip-in-ip tunnel."; uses tunnel-state-components; } list ipv6to4 { description "Operational state data of the 6to4 tunnel."; Liu&Foldes Expires January 2520, 2016 [Page 20] Internet-Draft Yang Data Model for IPIP Tunnel July 2015 uses tunnel-state-components; } list ipv6v4-manual { description "Operational state data of IPv6v4-manual tunnel."; uses tunnel-state-components; } } //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 tunnel { type tunnel-type; description "Indicate the type of the IP tunnel interface."; } } }// end of module ietf-ipipv4-tunnel Liu&Foldes Expires January 2520, 2016 [Page 21] Internet-Draft Yang Data Model for IPIP Tunnel July 2015 4. Security Considerations This document does not introduce any new security risk. 5. IANA Considerations This document makes no request of IANA. 6. Acknowledgements The authors would like to thank Xufeng Liu, Samuel Chen, In-Wher Chen for their contributions to this work. 7. References 7.1. Normative References [RFC1853] W. Simpson, "IP in IP Tunneling", RFC 1853, October 1995. [RFC2003] C. Perkins, "IP Encapsulation within IP", RFC 2003, October 1996. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC3056] B. Carpenter, K. Moore, "Connection of IPv6 Domains via IPv4 Clouds", RFC 3056, February 2001. [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&Foldes Expires January 2520, 2016 [Page 22] Internet-Draft Yang Data Model for IPIP Tunnel July 2015 Authors' Addresses Ying Liu Ericsson No.5 Lize East Street Beijing, 100102 China Email: Mandy.Liu@ericsson.com Adam Mate Foldes Ericsson 300 Holger Way San Jose, CA 95134 USA Email: Adam.Foldes@ericsson.com Liu&Foldes Expires January 2520, 2016 [Page 23]