Internet DRAFT - draft-liu-intarea-ipipv4-tunnel-yang

draft-liu-intarea-ipipv4-tunnel-yang



Network Working Group                                            Y. Liu
Internet Draft                                                A. Foldes
Intended status: Proposed Standard                             Ericsson
                                                               G. Zheng
                                                                Z. Wang
                                                              Y. Zhuang
                                                    Huawei Technologies
Expires: September 21, 2016                                Mar 21, 2016



                     Yang Data Model for IPIPv4 Tunnel
                draft-liu-intarea-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 September 18, 2016.

Copyright Notice

   Copyright (c) 2016 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                   Expires September 21, 2016               [Page 1]

Internet-Draft    Yang Data Model for IPIPv4 Tunnel          March 2016


   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.

Table of Contents


   1. Introduction...................................................2
      1.1. Terminology...............................................2
      1.2. Tree Diagrams.............................................3
   2. IPv4 Tunnel Model..............................................3
      2.1. Data Model................................................3
      2.2. YANG Model................................................5
   3. Security Considerations.......................................18
   4. IANA Considerations...........................................18
   5. Acknowledgements..............................................18
   6. References....................................................18
      6.1. Normative References.....................................18
      6.2. Informative References...................................19

1. Introduction

   This document defines two options for the YANG [RFC6020] data model
   for the management of IPv6/4-in-IPv4 tunnels. The two options will
   be discussed in IETF WG, only one of them will be final solution. It
   covers the following tunnel 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]

   The model option 1 is about using separate resource pool for
   different types of tunnels. The model option 2 is about use one
   resource pool for all the types of tunnels which are listed in this
   document.

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].





Liu                   Expires September 21, 2016               [Page 2]

Internet-Draft    Yang Data Model for IPIPv4 Tunnel          March 2016


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 (":").

   o  Ellipsis ("...") stands for contents of subtrees that are not
      shown.

2. IPv4 Tunnel Model

   This document defines the YANG model "ietf-ipipv4-tunnel". It
   includes two modules, one for configuration and one for state.

2.1. Data Model

   The data model has the following tree diagram for the IPv4 tunnels:

   module: ietf-ipipv4-tunnel

      +--rw Tunnels

      |  +--rw Tunnel* [name type]

      |     +--rw name                  string

      |     +--rw description?          string

      |     +--rw bind-interface?       if:interface-ref

      |     +--rw clear-df?             empty

      |     +--rw shutdown?             empty

      |     +--rw tmtu?                 uint16



Liu                   Expires September 21, 2016               [Page 3]

Internet-Draft    Yang Data Model for IPIPv4 Tunnel          March 2016


      |     +--rw mirror-destination?   string

      |     +--rw hop-limit?            uint8

      |     +--rw tos?                  int8

      |     +--rw type?                 identityref

      |     +--rw local-address?        inet:ipv4-address-no-zone

      |     +--rw remote-address?       inet:ipv4-address-no-zone

      |     +--rw routing-instance?

                      /rt:network-instances/rt:network-instance/rt:name

      +--ro tunnel-state

         +--ro tunnels*

            +--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:network-instances/rt:network-instance/rt:name

            +--ro tmtu?                      uint16

            +--ro clear-df?                  empty

            +--ro down-reason?               string

            +--ro resolved-interface-name?   string

            +--ro hop-limit?                 uint32

            +--ro tos?                       int32


Liu                   Expires September 21, 2016               [Page 4]

Internet-Draft    Yang Data Model for IPIPv4 Tunnel          March 2016


   augment /if:interfaces-state/if:interface:

      +--ro tunnel-protocol?   identityref

2.2. YANG Model

   <CODE BEGINS> file "ietf-ipipv4-tunnel@2016-03-11.yang"

   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 iana-if-types {

       Prefix ianaift;

     }



     import network-instance {

       prefix "rt";

     }


Liu                   Expires September 21, 2016               [Page 5]

Internet-Draft    Yang Data Model for IPIPv4 Tunnel          March 2016




     organization

       "IETF NETMOD (NETCONF Data Modeling Language) Working Group.";



     contact

       "Mandy.Liu@ericsson.com

        Adam.Foldes@ericsson.com

        zhengguangying@huawei.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, 6-to-4, and IPv6 over IPv4 manual

        tunnels.";



     revision 2016-03-11 {

       description

         "Collapsed all tunnel types into a single subtree based on

          suggestions to more closely follow the IP Tunnel MIB.";

       reference

         "RFC XXXX: A YANG Data Model for IPv4 Tunnel.";

     }

     revision 2015-10-14 {

       description


Liu                   Expires September 21, 2016               [Page 6]

Internet-Draft    Yang Data Model for IPIPv4 Tunnel          March 2016


         "Update model based on comments.";

       reference

         "RFC XXXX: A YANG Data Model for IPv4 Tunnel.";

     }



     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.";

     }



     /* Identities */


Liu                   Expires September 21, 2016               [Page 7]

Internet-Draft    Yang Data Model for IPIPv4 Tunnel          March 2016


     identity ip-tunnel-type {

       description

         "Base identity from which identities describing

          IP tunnel types are derived.";

     }

     identity ip-ip {

       base ip-tunnel-type;

       description

         "This identity represents IPv4-in-IPv4 tunnel type";

     }

     identity ipv6v4-manual {

       base ip-tunnel-type;

       description

         "This identity represents IPv6-to-IPv4 manual tunnel type";

     }

     identity ipv6-to-v4 {

       base ip-tunnel-type;

       description

         "This identity represents the 6-to-4 tunnel type";

     }



     /*Configuration Data*/

     container Tunnels{

       description


Liu                   Expires September 21, 2016               [Page 8]

Internet-Draft    Yang Data Model for IPIPv4 Tunnel          March 2016


        "Configuration data for tunnels.";

       list Tunnel{

         key "name type";

         description

           "Configuration data for tunnels.";

         leaf name {

           type string;

           description

             "Name of the tunnel.";

         }

         leaf type {

           type identityref {

             base ip-tunnel-type;

           }

           description "The encapsulation type of the tunnel.";

         }

         leaf local-address {

           type inet:ipv4-address-no-zone;

           description "IP address of the local end of the tunnel.";

         }

         leaf remote-address {

           when "type != 'ipv6-to-v4'" {

             description

               "6-to-4 tunnels do not have a fixed remote endpoint.";


Liu                   Expires September 21, 2016               [Page 9]

Internet-Draft    Yang Data Model for IPIPv4 Tunnel          March 2016


           }

           type inet:ipv4-address-no-zone;

           description "IP address of the remote end of the tunnel.";

         }

         leaf routing-instance {

           type leafref {

             path "/rt:network-instances/rt:network-instance/rt:name";

           description "The routing instance of the local address.";

         }

         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

             "Bind to an interface.";

         }

         leaf clear-df {


Liu                   Expires September 21, 2016              [Page 10]

Internet-Draft    Yang Data Model for IPIPv4 Tunnel          March 2016


           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 tmtu {

           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 mirror-destination {

           type string;

           description


Liu                   Expires September 21, 2016              [Page 11]

Internet-Draft    Yang Data Model for IPIPv4 Tunnel          March 2016


             "Designate the name of a tunnel as a circuit

              mirror destination. ";

         }

         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 {

             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.";

         }


Liu                   Expires September 21, 2016              [Page 12]

Internet-Draft    Yang Data Model for IPIPv4 Tunnel          March 2016


       }

     }



     /*Operational state data*/

     grouping tunnel-state-components {

       description

         "The basic tunnel information to be displayed.";



       leaf name {

         type string;

         description

           "Name of the tunnel.";

       }



       leaf type {

         type identityref;

         description

           "The type of the tunnel.";

       }

       leaf local-ip {

         type inet:ipv4-address-no-zone;

         description

           "IP address of the local end of the tunnel.";

       }


Liu                   Expires September 21, 2016              [Page 13]

Internet-Draft    Yang Data Model for IPIPv4 Tunnel          March 2016


       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                   Expires September 21, 2016              [Page 14]

Internet-Draft    Yang Data Model for IPIPv4 Tunnel          March 2016


         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 leafref {

           path "/rt:network-instances/rt:network-instance/rt:name";

         }

         description

           "Name of the reference routing instance. ";

       }

       leaf tmtu {

         type uint16;

         description

           "The Maximum Transmission Unit (MTU) size for

         packets sent in a tunnel.";

       }

       leaf clear-df {


Liu                   Expires September 21, 2016              [Page 15]

Internet-Draft    Yang Data Model for IPIPv4 Tunnel          March 2016


         type empty;

         description

           "Indicate that the DF bit is cleared.";

       }

       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.";

       }

       leaf tos {

         type int32;


Liu                   Expires September 21, 2016              [Page 16]

Internet-Draft    Yang Data Model for IPIPv4 Tunnel          March 2016


         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 tunnels {

           description

              "Operational state data of tunnels.";

            uses tunnel-state-components;

         }

     }



     //Augment operational state data of IP interfaces

     augment "/if:interfaces-state/if:interface" {

       when "if:type = 'ianaift:tunnel'" {


Liu                   Expires September 21, 2016              [Page 17]

Internet-Draft    Yang Data Model for IPIPv4 Tunnel          March 2016


         description

           "Augment IP interface.";

       }

       description

         "Augment operational state data of IP interfaces.";

       leaf tunnel-protocol {

         type identityref;

         description

           "Indicate the state of the IP tunnel interface.";

       }

     }

   }// end of module ietf-ipipv4-tunnel

   <CODE ENDS>

3. Security Considerations

   This document does not introduce any new security risk.

4. IANA Considerations

   This document makes no request of IANA.

5. Acknowledgements

   The authors would like to thank Xufeng Liu, Samuel Chen, Ing-Wher
   Chen for their contributions to this work.

6. References

6.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.


Liu                   Expires September 21, 2016              [Page 18]

Internet-Draft    Yang Data Model for IPIPv4 Tunnel          March 2016


   [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.

6.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                   Expires September 21, 2016              [Page 19]

Internet-Draft    Yang Data Model for IPIPv4 Tunnel          March 2016


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


   Guangying Zheng
   Huawei Technologies
   N9-3-B01 Building, Huawei Technologies Co., Ltd
   No.101 Yuhuatai Rd., Nanjing
   China

   Email: zhengguangying@huawei.com


   Zitao Wang
   Huawei Technologies,Co.,Ltd
   101 Software Avenue, Yuhua District
   Nanjing, 210012
   China

   Email: wangzitao@huawei.com


   Yan Zhuang
   Huawei
   101 Software Avenue, Yuhua District
   Nanjing, 210012
   China

   Email: zhuangyan.zhuang@huawei.com




Liu                   Expires September 21, 2016              [Page 20]