<?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="exp"
     docName="draft-geng-teas-enhanced-vpn-scalable-vtn-yang-00"
     ipr="trust200902">
  <front>
    <title abbrev="draft-geng-teas-enhanced-vpn-scalable-vtn-yang-00">YANG
    Model for Scalable VTN</title>

    <author fullname="Xuesong Geng" initials="X." surname="Geng">
      <organization>Huawei</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>

          <country/>
        </postal>

        <phone/>

        <facsimile/>

        <email>gengxuesong@huawei.com</email>

        <uri/>
      </address>
    </author>

    <author fullname="Zhibo Hu" initials="Z." surname="Hu">
      <organization>Huawei</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>

          <country/>
        </postal>

        <phone/>

        <facsimile/>

        <email>huzhibo@huawei.com</email>

        <uri/>
      </address>
    </author>

    <date day="14" month="April" year="2021"/>

    <abstract>
      <t>This document defines the Yang data model for scalable Virtual
      Transport Network(VTN).</t>
    </abstract>

    <note title="Requirements Language">
      <t>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 <xref
      target="RFC2119">RFC 2119</xref>.</t>
    </note>
  </front>

  <middle>
    <section title="Introduction">
      <t><xref target="I-D.ietf-teas-ietf-network-slice-definition"/> defines
      IETF network slices that provide connectivity coupled with network
      resources commitment between a number of endpoints over a shared network
      infrastructure.</t>

      <t>Enhanced VPN (VPN+) aims to provide enhancements to existing VPN
      services to support network slicing. VPN+ is composed of a VPN overlay
      and an underlying Virtual Transport Network (VTN) which has a customized
      network topology and a set of dedicated or shared resources in the
      underlay network. VPN+ and VTN are defined in <xref
      target="I-D.ietf-teas-enhanced-vpn"/>.</t>

      <t/>

      <t><xref target="I-D.dong-teas-enhanced-vpn-vtn-scalability"/> describes
      the scalability considerations in the control plane and data plane to
      enable VPN+ services. In control plane, decoupling the topology and
      resource attributes of VTN allows that multiple VTNs share the same
      topology. In data plane, a global VTN-ID in the data packet is used to
      determine the set of resources reserved for the corresponding VTN.</t>

      <t>This document defines the configuration yang model for scalable VTN
      solution.</t>

      <t/>
    </section>

    <section title="VTN Yang Module Requirement">
      <t>The general process of VTN configuration includes:</t>

      <t><list style="numbers">
          <t>Creat VTN instance based on the network slice requirement</t>

          <t>Configure the overlay network to initiate VTN in the network</t>

          <t>Steer the traffic to the corresponding VTN to provide network
          slice service</t>
        </list>The corresponding requirement of VTN configuration data model
      during the process is defined in this section.</t>

      <section title="VTN Creation">
        <t>After collecting information about the underlying network topology
        and available resources. Each VTN can have a customized topology and a
        set of network resources allocated. Flexible combination is allowed
        when multiple VTNs may shared the same topology, or multiple VTNs may
        share the same set of network resources.</t>

        <t>VTN is created with the following attributes:</t>

        <t><list style="symbols">
            <t>VTN Topology: Based on the existing work in IETF, topology
            specification for VTN could be implemented by Multi-Topology
            Routing (MTR) which defined in <xref target="RFC4915"/>, <xref
            target="RFC5120"/>, or Flex-algo which is defined in <xref
            target="I-D.ietf-lsr-flex-algo"/>. Correspondingly, the topology
            attribute of a VTN could be determined by MT-ID or algorithm ID;
            Signaling extensions for VTN topology is defined in <xref
            target="I-D.zhu-lsr-isis-sr-vtn-flexalgo"/> and <xref
            target="I-D.ietf-lsr-isis-sr-vtn-mt"/> respectively.</t>

            <t>Network Resource: network resource is allocated for VTN based
            on the requirement. For example, VTN could be bound with a layer 2
            sub-interface with a subset of the link bandwidth.</t>

            <t>VTN Data Plane Identifier: VTN data plane identifier is uesed
            to identify network resource that has been allocated for the VTN.
            VTN data plane identifier depends on the encapsulation type of the
            traffic, for example IPv6 defined in <xref
            target="I-D.dong-6man-enhanced-vpn-vtn-id"/>. VTN data plane
            identifier is not mandatory when there are other methods to
            distinguish VTN instances.</t>
          </list></t>
      </section>

      <section title="VTN Initiation">
        <t>VTN initiation in the network also includes two aspects: resource
        allocation and traffic steering through VTN specified topology.
        Resource allocation is defined in this section and traffic steering is
        defined in the next section.</t>

        <t>Several technologies could be used for resource allocation in the
        network device, for example: TSN defined in IEEE 802.1 introduces the
        concept of time aware shaping; FlexE provides the ability to multiplex
        multiple channels over one or more Ethernet links; Existing Diffserv
        scheduling/shaping allow the construction of virtual sub-interfaces.
        All these technologies could be used to dedicated resource in a shared
        physical interface.</t>

        <t>The configuration of these technologies play the role of VTN
        initiation when the allocated resource is bound with a specified VTN
        instance.</t>
      </section>

      <section title="VTN Traffic Steering ">
        <t>Just as color in SR policy defined in <xref
        target="I-D.ietf-spring-segment-routing-policy"/>, color is defined as
        an attribute of VTN to steer the traffic.</t>

        <t>With SR policy, traffic could be steered into a SR policy by :</t>

        <t><list style="symbols">
            <t>SR policy with color is provisioned to the headend;</t>

            <t>The route with some particular color matchs the SR policy with
            the corresponding color, which could satisfy the requirement of
            the route</t>

            <t>Traffic with the route is steered into the SR policy;</t>
          </list>Similarly, traffic could be steered into VTN by:</t>

        <t><list style="symbols">
            <t>VTN is configured with the attribute of color;</t>

            <t>The route with some particular color matchs VTN with the
            correponding color, which could satisfy the requirement of the
            route</t>

            <t>Traffic with the route is steered to the VTN</t>
          </list>SR policy could also be bound with VTN to provide resource
        reservation in the network. BGP SR Policy extensions for VTN is
        defined in <xref target="I-D.dong-idr-sr-policy-vtn"/> and similarly,
        YANG model which is used to bound SR policy to a specified VTN is
        defined in this document by:</t>

        <t><list style="symbols">
            <t>SR policy with color is provisioned to the headend; The
            preferred candidate path is bound to VTN;</t>

            <t>The route with some particular color matchs the SR policy with
            the corresponding color, which could satisfy the requirement of
            the route</t>

            <t>Traffic with the route is steered into the SR policy; Packet is
            encapsulated with the VTN data plane identifier.</t>
          </list></t>
      </section>
    </section>

    <section title="VTN Yang Module Tree">
      <t><figure>
          <artwork><![CDATA[module: ietf-vtn
  +--rw vtn-instance
  |  +--rw vtn-instance* [vtn-id]
  |     +--rw vtn-id                       uint32
  |     +--rw vtn-topology
  |     |  +--rw (vtn-topolgy-type)?
  |     |     +--:(flex-algo)
  |     |     |  +--rw flex-algo
  |     |     |     +--rw flex-algo-id?   uint32
  |     |     +--:(multi-topology)
  |     |        +--rw multi-topology-id?   uint32
  |     +--rw vtn-data-plane-identifier?   uint32
  +--rw sr-policy-extension
     +--rw vtn
        +--rw vtn-id?   uint32

  augment /if:interfaces/if:interface:
    +--rw interface-configuration-for-vtn
       +--rw (vtn-interface-binding-type)?
          +--:(layer-2-sub-interface)
          |  +--rw layer-2-sub-interface
          |     +--rw sub-interface-id?   uint32
          |     +--rw vtn-id?             uint32
          |     +--rw bandwidth?          uint32
          +--:(queue)
             +--rw queue
                +--rw queue-id?    uint32
                +--rw vtn-id?      uint32
                +--rw bandwidth?   uint32
  augment /ni:network-instances/ni:network-instance:
    +--rw vtn-traffic-steering
       +--rw color-index?   uint32
       +--rw vtn-id?        uint32
]]></artwork>
        </figure></t>
    </section>

    <section title="VTN Yang Module">
      <t><figure>
          <artwork><![CDATA[module ietf-vtn {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-vtn";
  prefix "ietf-vtn";

  import ietf-inet-types {
    prefix "inet";
  }

  import ietf-routing {
    prefix "rt";
  }

  import ietf-routing-types {
    prefix "rt-types";
  }

  import ietf-yang-types {
    prefix "yang";
  }
  
  import ietf-interfaces {
    prefix "if";
  }
  
  import ietf-network-instance {
    prefix "ni";
  }
  
  organization "IETF TEAS Working Group"; 
  
  contact
    "
	 WG Web: <http://tools.ietf.org/wg/teas/>
	 WG List:<mailto:teas@ietf.org>
	 
	 Editor: Xuesong Geng
	         <mailto:gengxuesong@huawei.com>
     Editor: Zhibo Hu
	         <mailto:huzhibo@huawei.com> 	
	";
	
  description
    "This YANG module defines a data model for VTN(Virtual Transport Network)";
  
  revision "2021-04-14" {
    description
      "This is the initial version of VTN yang module";
	reference
	  "RFC XXX: YANG Data Model for VTN";
  }

  grouping vtn-instances{
    description
	  "VTN instances";
    list vtn-instance {
	  key "vtn-id";
      description
        "vtn instance list";
	  leaf vtn-id {
	    type uint32;
	    description
	      "vtn-id";
	  }		  
	  container vtn-topology {
	    description
		  "vtn topology is nt";
		choice vtn-topolgy-type{
		  description
		    "customized topology of VTN";
		  case flex-algo {
		    container flex-algo {
			  description
			    "flex-algo could be used as topology specification for VTN";
			  leaf flex-algo-id {
			    type uint32;
			    description
			      "flex-algo-id for VTN";
			  }
			}
		  }
		  case multi-topology {
		    description
			  "MT could be used as topology specification for VTN";
		    leaf multi-topology-id{
			  type uint32;
			  description
			    "MT-id for VTN";
			}
		  }				
		}
	  }	  
	  leaf vtn-data-plane-identifier {
	    type uint32;
		description
		  "VTN identifier of data plane for vtn distinguishment";		
	  }
    }
  }
 
  grouping interface-configuration-for-vtn{
    description
	  "interface configuration for vtn";
    container interface-configuration-for-vtn {
	  description
	    "interface configuration for vtn";
	  choice vtn-interface-binding-type{
        description
		  "vtn interface binding type";
		case layer-2-sub-interface {
		  description
		    "vtn is bound to a layer-2 sub-interface";
		  container layer-2-sub-interface {
		    description
			  "sub-interface configuration";
			leaf sub-interface-id {
			  type uint32;
			  description
			    "sub-interface id";
			}
			leaf vtn-id {
			  type uint32; 
			  description
			    "vtn-id";
			}
			leaf bandwidth {
			  type uint32;
			  description
			    "bandwidth allocation for the slice";
			}
		  }
		}
		case queue {
		  description
		    "vtn is bound to a queue in the interface";
	      container queue {
		    description
			  "queue configuration";
			leaf queue-id {
			  type uint32;
			  description
			    "queue id";
			}
			leaf vtn-id {
			  type uint32;
			  description
			    "queue id";
			}
			leaf bandwidth {
			  type uint32;
			  description
			    "bandwidth allocation for the slice";
			}
		  }
		}
	  }
	}
  }
 
  grouping sr-policy-traffic-steering{
    container vtn{
	  description
	    "candidata path is bound to VTN";
	  leaf vtn-id{
	    type uint32;
		description
		  "vtn";
	  }
	}
  }
  
  grouping vtn-traffic-steering{
    container vtn-traffic-steering {	
	  leaf color-index {
	    type uint32;
		description
		  "color index";
	  }
	  leaf vtn-id {
	    type uint32;
		description
		  "vtn id";
	  }
	}
  }
  
  container vtn-instance {
    description
	  "vtn instance configuraiton";
    uses vtn-instances;	  
  }

  augment "/if:interfaces/if:interface" {
    description
	  "interface model extension for vtn";
	uses interface-configuration-for-vtn;
  
  } 
 
  augment /ni:network-instances/ni:network-instance{
    description
	  "network instance model extension for vtn";
    uses vtn-traffic-steering;
  }

  container sr-policy-extension {
    description
	  "sr policy extension for vtn";
	uses sr-policy-traffic-steering;
  }

}
]]></artwork>
        </figure></t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>This document makes no request of IANA.</t>

      <t>Note to RFC Editor: this section may be removed on publication as an
      RFC.</t>
    </section>

    <section anchor="Acknowledgements" title="Contributor">
      <t><figure>
          <artwork><![CDATA[   Zhenbin Li
   Huawei

   Email: lizhenbin@huawei.com


   Jie Dong
   Huawei

   Email: jie.dong@huawei.com
]]></artwork>
        </figure></t>
    </section>
  </middle>

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

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

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

      <?rfc include='reference.I-D.ietf-teas-ietf-network-slice-definition'?>

      <?rfc include='reference.I-D.ietf-teas-enhanced-vpn'
?>

      <?rfc include='reference.I-D.ietf-lsr-isis-sr-vtn-mt'?>

      <?rfc include='reference.I-D.dong-teas-enhanced-vpn-vtn-scalability'?>

      <?rfc include='reference.I-D.dong-6man-enhanced-vpn-vtn-id'?>

      <?rfc ?>

      <?rfc include='reference.I-D.ietf-spring-segment-routing-policy'?>

      <?rfc include='reference.I-D.ietf-lsr-flex-algo'?>

      <?rfc include='reference.I-D.zhu-lsr-isis-sr-vtn-flexalgo'?>

      <?rfc include='reference.I-D.dong-idr-sr-policy-vtn'?>
    </references>

    <references title="Informative References">
      <reference anchor="InfRef">
        <front>
          <title/>

          <author>
            <organization/>
          </author>

          <date year="2004"/>
        </front>
      </reference>
    </references>

    <section title="An Appendix">
      <t/>
    </section>
  </back>
</rfc>
