<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" docName="draft-boucadair-netmod-softwire-iftunnel-00"
     ipr="trust200902">
  <front>
    <title abbrev="Tunnel Extension to the Interface Module">A Tunnel
    Extension to the Interface Management YANG Module</title>

    <author fullname="Mohamed Boucadair" initials="M." surname="Boucadair">
      <organization>Orange</organization>

      <address>
        <postal>
          <street></street>

          <city>Rennes</city>

          <code>35000</code>

          <country>France</country>
        </postal>

        <email>mohamed.boucadair@orange.com</email>
      </address>
    </author>

    <date />

    <workgroup>netmod</workgroup>

    <abstract>
      <t>This document specifies an extension the Interface Management YANG
      module.</t>

      <t></t>
    </abstract>

    <note title="Editorial Note (To be removed by RFC Editor)">
      <t>Please update these statements in the document with the RFC number to
      be assigned to this document:<list style="symbols">
          <t>"This version of this YANG module is part of RFC XXXX;"</t>

          <t>"RFC XXXX: A Tunnel Extension to the Interface Management YANG
          Module";</t>

          <t>"reference: RFC XXXX"</t>
        </list>Please update the "revision" date of the YANG module.</t>
    </note>
  </front>

  <middle>
    <section title="Introduction">
      <t>This document specifies the initial version of an IANA-maintained
      module to identify a collection of tunnel types assigned by IANA (<xref
      target="itt"></xref>). Furthermore, the document augments the Interface
      YANG module <xref target="RFC8343"></xref> with a new parameter which is
      meant to indicate the type of a given tunnel (<xref
      target="ietf"></xref>). The tree structure of this extension is shown
      below: </t>

      <t><figure>
          <artwork><![CDATA[module: ietf-interface-tunnel
  augment /if:interfaces/if:interface:
    +--rw tunnel-type?   identityref]]></artwork>
        </figure></t>

      <t>Tunnel-specific extensions may be added to the Interface module as a
      function of the tunnel type. A sample example is provided in <xref
      target="sample"></xref>. It is not the intent of this document to define
      tunnel-specific extension for every tunnel encapsulation technology;
      those are discussed in dedicated document such as <xref
      target="I-D.ietf-softwire-yang"></xref>.</t>

      <t>This document uses the common YANG types defined in <xref
      target="RFC6991"></xref> and adopts the Network Management Datastore
      Architecture (NMDA).</t>

      <t>The terminology for describing YANG modules is defined in <xref
      target="RFC7950"></xref>. The meaning of the symbols in tree diagrams is
      defined in <xref target="RFC8340"></xref>.</t>
    </section>

    <section anchor="itt" title="IANA Tunnel Type YANG Module">
      <t><figure>
          <artwork><![CDATA[<CODE BEGINS> file "iana-tunnel-type@2018-10-19.yang"

module iana-tunnel-type {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:iana-tunnel-type";
  prefix iana-tunnel-type;

  import iana-if-type  {
    prefix ift;
    reference
      "RFC 7224: IANA Interface Type YANG Module";
  }

  organization
    "IANA";
  contact
    "Internet Assigned Numbers Authority

  Postal: ICANN
          12025 Waterfront Drive, Suite 300
          Los Angeles, CA  90094-2536
          United States of America
  Tel:    +1 310 301 5800
  <mailto:iana@iana.org>";

  description
    "This module contains a collection of YANG data types defined
     by IANA and used for tunnel types.
     
     Copyright (c) 2018 IETF Trust and the persons identified as
     authors of the code.  All rights reserved.
     
     Redistribution and use in source and binary forms, with or
     without modification, is permitted pursuant to, and subject
     to the license terms contained in, the Simplified BSD License
     set forth in Section 4.c of the IETF Trust's Legal Provisions
     Relating to IETF Documents
     (http://trustee.ietf.org/license-info).
     
     This version of this YANG module is part of RFC XXXX; see
     the RFC itself for full legal notices.";

  revision 2018-10-19 {
    description
      "Initial revision.";
    reference
      "RFC XXXX:  A Tunnel Extension to the Interface 
                  Management YANG Module";
  }

  identity  other {
    base ift:tunnel;
    description
      "None of the following values.";
  }
  identity direct {
    base ift:tunnel;
    description
      "No intermediate header.";
   }
   identity gre {
     base ift:tunnel;
     description
       "GRE encapsulation.";
   }
   identity minimal {
     base ift:tunnel;
     description
       "Minimal encapsulation.";
   }
   identity l2tp {
     base ift:tunnel;
     description
       "L2TP encapsulation.";
   }
   identity pptp {
     base ift:tunnel;
     description
       "PPTP encapsulation.";
   }
   identity l2f {
     base ift:tunnel;
     description
       "L2F encapsulation.";
   }
   identity udp {
     base ift:tunnel;
     description
       "UDP encapsulation.";
   }
   identity atmp {
     base ift:tunnel;
     description
      "ATMP encapsulation.";
   }   
   identity msdp {
     base ift:tunnel;
     description
       "MSDP encapsulation.";
   }  
   identity sixtofour {
     base ift:tunnel;
     description
       "6to4 encapsulation.";
   }  
   identity sixoverfour {
     base ift:tunnel;
     description
       "6over4 encapsulation.";
   }  
   identity isatap {
     base ift:tunnel;
     description
       "ISATAP encapsulation.";
   }  
   identity teredo {
     base ift:tunnel;
     description
       "Teredo encapsulation.";
   }
   identity iphttps {
     base ift:tunnel;
     description
       "IP over HTTPS.";
   }  
   identity softwiremesh {
     base ift:tunnel;
     description
       "softwire mesh tunnel.";
   }    
   identity dslite {
     base ift:tunnel;
     description
       "DS-Lite tunnel.";
  }  
}
<CODE ENDS>]]></artwork>
        </figure></t>
    </section>

    <section anchor="ietf"
             title="Tunnel Extension to the Interface YANG Module">
      <t>The ietf-interface-tunnel module imports the modules defined in <xref
      target="RFC7224"></xref> and <xref target="RFC8343"></xref>.</t>

      <t><figure>
          <artwork><![CDATA[<CODE BEGINS> file "ietf-interface-tunnel@2018-10-19.yang"

module ietf-interface-tunnel {
  yang-version 1.1;

  namespace "urn:ietf:params:xml:ns:yang:ietf-interface-tunnel";
  prefix ietf-interface-tunnel;

  import ietf-interfaces {
    prefix if;
    reference
      "RFC 8343: A YANG Data Model for Interface Management";
  }

  import iana-if-type  {
    prefix ift;
    reference
      "RFC 7224: IANA Interface Type YANG Module";
  }
  
  organization "IETF xxx Working Group";

  contact

    "WG Web:   <https://datatracker.ietf.org/wg/xxxx/>
     WG List:  <mailto:xxxx@ietf.org>

     Editor:  Mohamed Boucadair 
              <mailto:mohamed.boucadair@orange.com>";
     
   description
      "This module is a YANG module for associating a tunnel type with 
      tunnel interfaces.

      Copyright (c) 2018 IETF Trust and the persons identified as
      authors of the code.  All rights reserved.

      Redistribution and use in source and binary forms, with or
      without modification, is permitted pursuant to, and subject
      to the license terms contained in, the Simplified BSD License
      set forth in Section 4.c of the IETF Trust's Legal Provisions
      Relating to IETF Documents
      (http://trustee.ietf.org/license-info).

      This version of this YANG module is part of RFC XXXX; see
      the RFC itself for full legal notices.";

  revision 2018-10-19 {
    description
      "Initial revision.";
    reference
      "RFC XXXX:  A Tunnel Extension to the Interface 
                  Management YANG Module";
  }

  augment "/if:interfaces/if:interface" {
    when 'derived-from(if:type, "ift:tunnel")'; 
    description 
      "Augments Interface module with tunnel-specific parameters.

       IANA interface types are maintained at this registry:
       https://www.iana.org/assignments/ianaiftype-mib/ianaiftype-mib.
         
       tunnel (131),       -- Encapsulation interface"; 
    
    leaf tunnel-type {
      type identityref {
        base ift:tunnel;
      }
      description 
        "Indicates the type of the tunnel. It corresponds
         to the IANAtunnelType. 

         IANA tunnel types are maintained at this registry:
         https://www.iana.org/assignments/ianaiftype-mib/ianaiftype-mib.";
    }
  }
}
<CODE ENDS>]]></artwork>
        </figure></t>
    </section>

    <section title="Security Considerations">
      <t>The YANG module defined in this document is designed to be accessed
      via network management protocols such as NETCONF <xref
      target="RFC6241"></xref> or RESTCONF <xref target="RFC8040"></xref>. The
      lowest NETCONF layer is the secure transport layer, and the
      mandatory-to-implement secure transport is Secure Shell (SSH) <xref
      target="RFC6242"></xref>. The lowest RESTCONF layer is HTTPS, and the
      mandatory-to-implement secure transport is TLS <xref
      target="RFC8446"></xref>.</t>

      <t>The NETCONF access control model <xref target="RFC8341"></xref>
      provides the means to restrict access for particular NETCONF or RESTCONF
      users to a preconfigured subset of all available NETCONF or RESTCONF
      protocol operations and content.</t>

      <t>All data nodes defined in the YANG module which can be created,
      modified and deleted (i.e., config true, which is the default) are
      considered sensitive. Write operations (e.g., edit-config) applied to
      these data nodes without proper protection can negatively affect network
      operations.</t>
    </section>

    <section anchor="yang" title="IANA Considerations">
      <t>This document requests IANA to register the following URIs in the
      "IETF XML Registry" <xref target="RFC3688"></xref>: <figure>
          <artwork><![CDATA[         URI: urn:ietf:params:xml:ns:yang:ietf-interface-tunnel
         Registrant Contact: The IESG.
         XML: N/A; the requested URI is an XML namespace.

         URI: urn:ietf:params:xml:ns:yang:iana-tunnel-type
         Registrant Contact: IANA.
         XML: N/A; the requested URI is an XML namespace.

]]></artwork>
        </figure> This document requests IANA to register the following YANG
      modules in the "YANG Module Names" registry <xref
      target="RFC7950"></xref>.<figure>
          <artwork><![CDATA[         name: ietf-interface-tunnel
         namespace: urn:ietf:params:xml:ns:yang:ietf-interface-tunnel
         prefix: ietf-interface-tunnel
         reference: RFC XXXX

         name: iana-tunnel-type
         namespace: urn:ietf:params:xml:ns:yang:iana-tunnel-type
         prefix: iana-tunnel-type
         reference: RFC XXXX
]]></artwork>
        </figure></t>

      <t>This document defines the initial version of the IANA-maintained
      iana-tunnel-type YANG module. IANA is requested to add this note:<list
          style="empty">
          <t>Tunnel type values must not be directly added to the
          iana-tunnel-type YANG module. They must instead be respectively
          added to the "tunnelType" sub-registry (under "ifType definitions"
          registry).</t>
        </list></t>

      <t>When an tunnel type is added to the "tunnelType" registry, a new
      "identity" statement must be added to the iana-tunnel-type YANG module.
      The name of the "identity" is the same as the corresponding enumeration
      in the IANAifType-MIB. The following substatements to the "identity"
      statement should be defined:</t>

      <t><list hangIndent="15" style="hanging">
          <t hangText="&quot;base&quot;:">Contains the value of the tunnel
          type in lowercase.</t>

          <t hangText="&quot;description&quot;:">Replicate the description
          from the registry.</t>

          <t hangText="&quot;reference&quot;:">Replicate the reference from
          the registry and add the title of the document.</t>
        </list></t>

      <t>Unassigned or reserved values are not present in the module.</t>

      <t>When the iana-tunnel-type YANG module is updated, a new "revision"
      statement must be added in front of the existing revision
      statements.</t>

      <t>IANA is requested to add this note to "tunnelType" registry:</t>

      <t><list style="empty">
          <t>When this registry is modified, the YANG module iana-tunnel-type
          must be updated as defined in [RFCXXXX].</t>
        </list></t>
    </section>

    <section anchor="ack" title="Acknowledgements">
      <t>Many thanks to Tom Petch.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119"?>

      <?rfc include='reference.RFC.8174'?>

      <?rfc include='reference.RFC.7950'?>

      <?rfc include='reference.RFC.3688'?>

      <?rfc include='reference.RFC.6991'?>

      <?rfc include='reference.RFC.8343'?>

      <?rfc include='reference.RFC.7224'?>

      <?rfc include='reference.RFC.6241'?>

      <?rfc include='reference.RFC.6242'?>

      <?rfc include='reference.RFC.8341'?>

      <?rfc include='reference.RFC.8040'?>

      <?rfc include='reference.RFC.8446'?>
    </references>

    <references title="Informative References">
      <?rfc include='reference.RFC.8340'?>

      <?rfc include='reference.I-D.ietf-softwire-yang'?>
    </references>

    <section anchor="sample" title="Example">
      <t>The following example illustrate how the interface YANG module can be
      augmented with tunnel-specific paramters. In this example, the module is
      augmented with 'remote-endpoint' of the tunnel. A tree structure is also
      provided below: </t>

      <t><figure>
          <artwork><![CDATA[module: ietf-extension-example
  augment /if:interfaces/if:interface:
    +--rw remote-endpoint?   inet:ipv6-address]]></artwork>
        </figure></t>

      <t>The 'extension-example' module imports the modules defined in <xref
      target="RFC6991"></xref> and <xref target="RFC8343"></xref> in addition
      to the those defined in this document.</t>

      <t><figure>
          <artwork><![CDATA[<CODE BEGINS> file "ietf-extension-example@2018-10-19.yang"

module ietf-extension-example {
  yang-version 1.1;

  namespace "urn:ietf:params:xml:ns:yang:ietf-extension-example";
  prefix example;

  import ietf-inet-types {
    prefix inet;
    reference
      "Section 4 of RFC 6991";
  }

  import ietf-interfaces {
    prefix if;
    reference
      "RFC 8343: A YANG Data Model for Interface Management";
  }

  import iana-tunnel-type  {
    prefix iana-tunnel-type;
    reference
      "RFC XXXX:  A Tunnel Extension to the Interface Management
                  YANG Module";
  }

  import ietf-interface-tunnel  {
    prefix ift;
    reference
      "RFC XXXX:  A Tunnel Extension to the Interface Management
                  YANG Module";
  }
   
  organization "IETF xxxx Working Group";

  contact

    "WG Web:   <https://datatracker.ietf.org/wg/xxx/>
     WG List:  <mailto:xxx@ietf.org>

     Editor:  Mohamed Boucadair 
              <mailto:mohamed.boucadair@orange.com>";
     
   description
      "This is an exampel YANG module.

      Copyright (c) 2018 IETF Trust and the persons identified as
      authors of the code.  All rights reserved.

      Redistribution and use in source and binary forms, with or
      without modification, is permitted pursuant to, and subject
      to the license terms contained in, the Simplified BSD License
      set forth in Section 4.c of the IETF Trust's Legal Provisions
      Relating to IETF Documents
      (http://trustee.ietf.org/license-info).

      This version of this YANG module is part of RFC XXXX; see
      the RFC itself for full legal notices.";

  revision 2018-10-19 {
    description
      "Initial revision.";
    reference
      "RFC XXXX:  A Tunnel Extension to the Interface Management
                  YANG Module";
  }

  augment "/if:interfaces/if:interface" {
    when "derived-from(ift:tunnel-type, 'iana-tunnel-type:gre')"; 
    description 
      "Augments Interface module with specific tunnel parameters."; 
        
    leaf remote-endpoint {
      type inet:ipv6-address;
      description 
        "IPv6 address of the local GRE endpoint.";
    }   
  }
}
<CODE ENDS>]]></artwork>
        </figure></t>
    </section>
  </back>
</rfc>
