Skip to main content

Yang Data Model for IPIPv4 Tunnel
draft-liu-intarea-ipipv4-tunnel-yang-00

The information below is for an old version of the document.
Document Type
This is an older version of an Internet-Draft whose latest revision state is "Expired".
Authors Ying Liu , Adam Mate Foldes , Guangying Zheng , Zitao Wang , Yan Zhuang
Last updated 2015-12-08 (Latest revision 2015-10-15)
Replaces draft-liu-rtgwg-ipipv4-tunnel-yang
RFC stream (None)
Formats
Additional resources
Stream Stream state (No stream defined)
Consensus boilerplate Unknown
RFC Editor Note (None)
IESG IESG state I-D Exists
Telechat date (None)
Responsible AD (None)
Send notices to (None)
draft-liu-intarea-ipipv4-tunnel-yang-00
Network Working Group                                            Y. Liu
Internet Draft                                                A. Foldes
Intended status: Proposed Standard                             Ericsson
                                                               G. Zheng
                                                                Z. Wang
                                                              Y. Zhuang
                                                    Huawei Technologies
Expires: April 15, 2016                                    Oct 15, 2015

                     Yang Data Model for IPIPv4 Tunnel
                draft-liu-intarea-ipipv4-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 15, 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                     Expires April 15, 2016                 [Page 1]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 2015

   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 [01].........................................3
      2.1. Data Model................................................3
      2.2. YANG Model................................................7
   3. IPv4 Tunnel Model [02]........................................22
      3.1. Data Model...............................................22
      3.2. YANG Model...............................................24
   4. Security Considerations.......................................38
   5. IANA Considerations...........................................38
   6. Acknowledgements..............................................38
   7. References....................................................38
      7.1. Normative References.....................................38
      7.2. Informative References...................................38

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 April 15, 2016                 [Page 2]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 2015

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 [01]

   This document defines two options for the YANG model "ietf-ipipv4-
   tunnel". Each of them includes two modules, one for configuration
   and one for state. This section lists the first option.

2.1. Data Model

   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 tmtu?                 uint16

Liu                     Expires April 15, 2016                 [Page 3]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 2015

      |  |  +--rw mirror-destination?   string

      |  |  +--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

      |  +--rw ipv6to4* [name]

      |  |  +--rw name                  string

      |  |  +--rw description?          string

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

      |  |  +--rw clear-df?             empty

      |  |  +--rw shutdown?             empty

      |  |  +--rw tmtu?                 uint16

      |  |  +--rw mirror-destination?   string

      |  |  +--rw hop-limit?            uint8

      |  |  +--rw tos?                  int8

      |  |  +--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

Liu                     Expires April 15, 2016                 [Page 4]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 2015

      |     +--rw shutdown?             empty

      |     +--rw tmtu?                 uint16

      |     +--rw mirror-destination?   string

      |     +--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

      +--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 tmtu?                      uint16

         |  +--ro clear-df?                  empty

         |  +--ro down-reason?               string

         |  +--ro resolved-interface-name?   string

         |  +--ro hop-limit?                 uint32

         |  +--ro tos?                       int32

Liu                     Expires April 15, 2016                 [Page 5]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 2015

         +--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

         |  +--ro tmtu?                      uint16

         |  +--ro clear-df?                  empty

         |  +--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 tmtu?                      uint16

            +--ro clear-df?                  empty

Liu                     Expires April 15, 2016                 [Page 6]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 2015

            +--ro down-reason?               string

            +--ro resolved-interface-name?   string

            +--ro hop-limit?                 uint32

            +--ro tos?                       int32

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

      +--ro tunnel-protocol?   tunnel-type

2.2. YANG Model

   <CODE BEGINS>

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

     }

Liu                     Expires April 15, 2016                 [Page 7]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 2015

     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, IPv6 to IPv4

      auto and IPv6 over IPv4 manual tunnels.";

     revision 2015-10-14 {

       description

        "Update model based on comments.";

      reference

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

     }

      revision 2015-07-20 {

Liu                     Expires April 15, 2016                 [Page 8]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 2015

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

     }

     /* Typedefs */

     typedef tunnel-type {

       type enumeration {

         enum ip-ip {

           description

             "IPv4-in-IPv4 tunnel interface.";

         }

Liu                     Expires April 15, 2016                 [Page 9]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 2015

         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 {

       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;

         description

           "Name of the tunnel.";

Liu                     Expires April 15, 2016                [Page 10]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 2015

       }

       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 {

         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 {

Liu                     Expires April 15, 2016                [Page 11]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 2015

         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

           "Designate the name of a tunnel as a circuit

         mirror destination. ";

       }

      leaf hop-limit {

        type uint8 {

          range "0|1..255";

        }

        description

Liu                     Expires April 15, 2016                [Page 12]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 2015

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

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

       description

        "Configuration data for tunnels.";

       list ip-in-ip {

         key "name";

Liu                     Expires April 15, 2016                [Page 13]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 2015

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

           }

           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 {

Liu                     Expires April 15, 2016                [Page 14]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 2015

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

           }

         }

       }

       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;

Liu                     Expires April 15, 2016                [Page 15]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 2015

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

           }

         }

       }

     }

     /*Operational state data*/

     grouping tunnel-state-components {

       description

        "The basic tunnel information to be displayed.";

       leaf name {

         type string;

Liu                     Expires April 15, 2016                [Page 16]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 2015

         description

           "Name of the tunnel.";

       }

       leaf local-ip {

         type inet:ipv4-address-no-zone;

         description

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

           }

Liu                     Expires April 15, 2016                [Page 17]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 2015

           enum Shutdown {

             description

               "Tunnel shutdown state.";

           }

         }

         description

           "Indicate the state of the tunnel.";

       }

       leaf bind-interface {

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

       }

Liu                     Expires April 15, 2016                [Page 18]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 2015

       leaf tmtu {

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

Liu                     Expires April 15, 2016                [Page 19]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 2015

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

        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;

Liu                     Expires April 15, 2016                [Page 20]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 2015

       }

       list ipv6to4 {

         description

           "Operational state data of the 6to4 tunnel.";

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

         type tunnel-type;

         description

Liu                     Expires April 15, 2016                [Page 21]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 2015

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

       }

     }

   }// end of module ietf-ipipv4-tunnel

   <CODE ENDS>

3. IPv4 Tunnel Model [02]

   This document defines two options for the YANG model "ietf-ipipv4-
   tunnel". Each of them includes two modules, one for configuration
   and one for state. This section lists the second option.

3.1. Data Model

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

   module: ietf-ipipv4-tunnel-02

      +--rw Tunnels

      |  +--rw Tunnel* [name]

      |     +--rw name                  string

      |     +--rw description?          string

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

      |     +--rw clear-df?             empty

      |     +--rw shutdown?             empty

      |     +--rw tmtu?                 uint16

      |     +--rw mirror-destination?   string

      |     +--rw hop-limit?            uint8

      |     +--rw tos?                  int8

      |     +--rw (tunnel-type)?

      |        +--:(tunnel-ipinip)

Liu                     Expires April 15, 2016                [Page 22]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 2015

      |        |  +--rw ip-in-ip

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

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

      |        |     +--rw routing-instance?   rt:routing-instance-ref

      |        +--:(tunnel-ipv6to4)

      |        |  +--rw ipv6to4

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

      |        +--:(tunnel-ipv6v4-manual)

      |           +--rw ipv6v4-manual

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

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

      |              +--rw routing-instance?   rt:routing-instance-ref

      +--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:routing-instance-ref

            +--ro tmtu?                      uint16

Liu                     Expires April 15, 2016                [Page 23]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 2015

            +--ro clear-df?                  empty

            +--ro down-reason?               string

            +--ro resolved-interface-name?   string

            +--ro hop-limit?                 uint32

            +--ro tos?                       int32

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

      +--ro tunnel-protocol?   tunnel-type

3.2. YANG Model

   <CODE BEGINS>

   module ietf-ipipv4-tunnel-02{

     namespace "urn:ietf:params:xml:ns:yang:ietf-ipipv4-tunnel-02";

     prefix "v4tln";

     import ietf-interfaces {

       prefix "if";

     }

     import ietf-inet-types {

       prefix inet;

     }

     import ietf-routing {

       prefix "rt";

Liu                     Expires April 15, 2016                [Page 24]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 2015

     }

     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, IPv6 to IPv4

      auto and IPv6 over IPv4 manual tunnels.";

     revision 2015-10-15 {

       description

         "Initial revision.";

       reference

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

     }

     /* Typedefs */

Liu                     Expires April 15, 2016                [Page 25]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 2015

     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 {

       description

         "Specify the IP addresses of the local and

         remote tunnel endpoint interfaces. Bind the

Liu                     Expires April 15, 2016                [Page 26]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 2015

         tunnel circuit interface to the tunnel. Enable

         the tunnel.";

       leaf name {

         type string;

         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

            "Bind to an interface.";

       }

       leaf clear-df {

         type empty;

         description

Liu                     Expires April 15, 2016                [Page 27]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 2015

           "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

           "Designate the name of a tunnel as a circuit

         mirror destination. ";

Liu                     Expires April 15, 2016                [Page 28]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 2015

       }

      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 calue 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 April 15, 2016                [Page 29]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 2015

     /*Configuration Data*/

     container Tunnels{

       description

        "Configuration data for tunnels.";

       list Tunnel{

         key name;

        description

          "Configuration data for tunnels.";

        uses tunnel-components;

        choice tunnel-type{

          description

           "Peer end points configuration for tunnel.";

          case tunnel-ipinip{

           container ip-in-ip{

             description

              "The peer end points configuration of IP in IP tunnel.";

               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

Liu                     Expires April 15, 2016                [Page 30]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 2015

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

               }

              leaf routing-instance {

                 type rt:routing-instance-ref;

                 description

                   "Name of the reference routing instance. ";

               }

            }

           }

         case tunnel-ipv6to4{

           container ipv6to4{

             description

              "The peer end points configuration of 6to4 tunnel.";

               leaf local {

                 type inet:ipv4-address-no-zone;

                 description

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

               }

           }

         }

         case tunnel-ipv6v4-manual{

           container ipv6v4-manual{

             description

              "The peer end points configuration of IPv6-over-v4

Liu                     Expires April 15, 2016                [Page 31]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 2015

              manual tunnel.";

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

               }

            }

         }

         }

       }

     }

     /*Operational state data*/

     grouping tunnel-state-components {

Liu                     Expires April 15, 2016                [Page 32]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 2015

       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

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

Liu                     Expires April 15, 2016                [Page 33]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 2015

           }

           enum Up {

             description

               "Tunnel up state.";

           }

           enum Shutdown {

             description

               "Tunnel shutdown state.";

           }

         }

         description

           "Indicate the state of the tunnel.";

       }

       leaf bind-interface {

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

       }

Liu                     Expires April 15, 2016                [Page 34]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 2015

       leaf routing-instance {

         type rt:routing-instance-ref;

         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 {

         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

Liu                     Expires April 15, 2016                [Page 35]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 2015

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

        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

Liu                     Expires April 15, 2016                [Page 36]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 2015

           "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'" {

         description

           "Augment IP interface.";

       }

       description

         "Augment operational state data of IP interfaces.";

       leaf tunnel-protocol {

         type tunnel-type;

         description

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

       }

     }

   }// end of module ietf-ipipv4-tunnel-02

   <CODE ENDS>

Liu                     Expires April 15, 2016                [Page 37]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 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                     Expires April 15, 2016                [Page 38]
Internet-Draft    Yang Data Model for IPIPv4 Tunnel        October 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

   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 April 15, 2016                [Page 39]