<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc toc="yes"?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>

<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<!--<!DOCTYPE rfc SYSTEM "rfc4748.dtd"> -->

<rfc category="std" ipr="trust200902" docName="draft-sw-detnet-network-slice-mapping-yang-00">

<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<?rfc toc="yes"?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>

<front>
  <title abbrev="DetNet Applied to IETF NS"> YANG Data Model for DetNet Mapping with Network Slice </title>

  <author fullname="Xueyan Song" initials="X" surname="Song">
      <organization>ZTE Corp.</organization>
     <address>
       <postal>
         <street></street>

         <!-- Reorder these if your country does things differently -->

         <city>Nanjing</city>

         <region></region>

         <code></code>

         <country>China</country>
       </postal>

       <phone>+86 25 88013062</phone>

       <email>song.xueyan2@zte.com.cn</email>

       <!-- uri and facsimile elements may also be added -->
     </address>
    </author>

  <author fullname="Haisheng Wu" initials="H" surname="Wu">
      <organization>ZTE Corp.</organization>
     <address>
       <postal>
         <street></street>

         <!-- Reorder these if your country does things differently -->

         <city>Nanjing</city>

         <region></region>

         <code></code>

         <country>China</country>
       </postal>

       <phone></phone>

       <email>wu.haisheng@zte.com.cn</email>

       <!-- uri and facsimile elements may also be added -->
     </address>
    </author>


   <date month="May" year="2022"/>	
	
    <area>Routing</area>
    <workgroup>DetNet  Working Group</workgroup>
    <keyword/>
	
    <abstract>
  <t>This document considers the applicability of Deterministic Networking (DetNet) mapping with network slice in the context of IP/MPLS 
  network. It identifies the mapping requirements and YANG data models being defined by the IETF to support the deployment.</t>
  
  <t>Existing data models are identified for deterministic networking, this document outlines the applicability of DetNet for network slicing. 
  It also identifies the features for necessity of mapping network slicing with DetNet and indicates where the DetNet YANG might be extended.</t>
    </abstract>
    
</front>
  
<middle>

  <section title="Introduction">

  <t> Deterministic Networking (DetNet) is a service that can be offered by a network to DetNet flows. As defined in <xref target="RFC8655"/>, 
  DetNet flows provide deterministic services with guaranteed performance such as end-to-end delay and low packet loss rate for unicast or 
  multicast data streams. DetNet assumes that the management controller can complete the path selection for the resources required by the 
  service as to how to provide the guarantee of the underlying network resources to meet the requirement.</t>

  <t> As specified in 3GPP TS 28.530, network slicing is a paradigm where logical networks/partitions are created, with 
  appropriate isolation, resources and optimized topology to serve a purpose or service category (e.g. use case/traffic category, or for MNO
  internal reasons) or customers (logical system created "on demand"). <xref target="I-D.ietf-teas-ietf-network-slices"/> provides the definition
  of network slice in the context of IETF network, the main characteristics, necessary components and interfaces for the general framework and
  realization involved of IETF Network Slice. This document provides the applicability of DetNet to Network Slice in the context of IETF.</t>
  </section>

    <section title="Conventions">

    <section title="Requirements Language">
	<t> The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED",
	"MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/>
	when, and only when, they appear in all capitals, as shown here.</t>
    </section>

    <section title="Terminology">

    <t> Refer to <xref target="RFC8655"/>, <xref target="RFC8938"/> and <xref target="I-D.ietf-teas-ietf-network-slices"/>, for the key terms 
  used in this document.</t>
  
    <t> The terminology for describing YANG data models is found in <xref target="RFC7960"/>.</t>
    </section>  
  
    <section title="Abbreviations">
    <t> DetNet: Deterministic Networking</t>
    <t> IETF NS: IETF Network Slice</t>
    <t> MPLS: Multi-Protocol Label Switching</t>
    <t> NETCONF: Network Configuration Protocol</t>	
	<t> NRP: Network Resource Partition</t>
    <t> PREOF: Packet Replication, Elimination, and Ordering Functions </t>
	<t> SDP: Service Demarcation Point</t>
    <t> SLE: Service Level Expectation</t>
    <t> SLO: Service Level Objective</t>
    <t> SSH: transport Secure Shell</t>
    <t> TLS: Transport Layer Security</t>
    </section>
	
   </section>
  

  
  <section title="Applicability of DetNet to Network Slice"> 
      <section title="Problem Statement">
  
  <t> DetNet is a service that provides a reliable or available service to DetNet flows through dedicating network resources such as link bandwidth,
  buffer space to DetNet individual flow or DetNet aggregation flows. To realize this object the management and control plane of DetNet needs support
  DetNet flow (including App-layer, service-layer and forwarding-layer flow) instantiation, resource reservation and allocation, path computation and
  route steering. In data plane DetNet supports packet replication, elimination and ordering function to reduce packet loss rate and jitter 
  performance. Refer to <xref target="RFC8655"/> and <xref target="RFC8938"/>, DetNet PREOF function for service protection in order to reduce packet
  loss and jitter performance. Except service protection, the necessary resource reservation and allocation are feasible to eliminate packet 
  congestion and avoiding packet loss; optimization for path computation needs be based on a set of constraints of some specific network requirements.
  To realize resource reservation and path computation it's recommended to use existing technologies, such as RSVP-TE, BGP, SR, etc. From the 
  discussion on network slicing at IETF TEAS WG we know that the resource guarantee of a specific service requires the closed-loop management 
  of resource exposure, resource reservation, resource occupation, resource optimization and other aspects, and the existing technology may not be 
  enough to support that. </t> 
  
  <t> Refer to <xref target="I-D.ietf-teas-ietf-network-slices"/> the network slicing technology can provide necessary network resources to meet the
  service requirements of users while realizing the SLO/SLE requirements for user services. By applying network slicing technology to DetNet, 
  resource guarantee can be achieved for deterministic networking services. On the other hand, network slicing with ultra-high reliability or 
  ultra-low latency guarantee requires the processing of packets with the help of DetNet-specific queuing technology.</t>    
       </section>
 
      <section title="Use Case"> 
 <t> Refer to <xref target="RFC8578"/> provides DetNet use cases which include DetNet applied to Network Slicing described in section 10:
  
    <list style="symbols">
    <t>
    Resource isolation across slices.
    </t>
    <t>
    Deterministic services within slices.
    </t>
    </list>
	
  </t>
  
  <t> With the applicability of DetNet to Network Slice, not only the network capability (such as end-to-end latency, bounded jitter and low packet 
  loss ratio) the DetNet concerns be satisfied, but also the necessary network resource reserved and allocated the IETF Network Slice concerns to 
  be supported. There are also limitations for DetNet applied to Network Slicing, e.g., mainly used for latency-sensitive service, only support 
  P2P and P2MP connectivity, etc. The resolve for these limitations are out of the scope of this document. This document mainly outlines the 
  applicability of DetNet to Network Slice for latency-sensitive service.</t>
       
  </section>
  
   <section title="Modes of IETF Network Slice Selection">

	<t>This document provides three modes of IETF Network Slice selection operations as associated with DetNet follows.  Additional modes may be 
	defined in the future.</t>

	<list style="symbols">
	
	<t>New IETF Network Slice Binding - A customer may request a DetNet service with requirements guarantee, e.g., end-to-end latency, latency 
	variation, jitter, etc. To satisfy the customer's requirements on network resource it's recommended to bind DetNet flows with an IETF Network
	Slice instance. The YANG model described in Section 5 of this document provides the mapping between DetNet flows with anew IETF Network Slice.</t>
	
	<t>IETF Network Slice Sharing - A customer may request a DetNet service with requirement guarantee  where a new IETF Network Slice do not need to
	be created but be shared with other multiple DetNet flows.  The mapping YANG model described in Section 5 of this document provides the mapping 
	between DetNet flows with an IETF Network Slice in use.  No modification of the properties of an IETF Network Slice is allowed in this mode.</t>
	
    <t>IETF Network Slice Modification - This mode allows the modification of the properties of the existing IETF Network Slice 
	(e.g., bandwidth, latency, etc.).</t>

    </list>
	
    <t>IETF Network Slice Mapping Template - A policy profile which contains network constraints and optimization criteria is used for mapping 
	DetNet flows to one/more certain IETF Network Slice instance.</t>

    </section>
   </section>
  
    <section title="Mapping DetNet with Network Slice"> 
      <section title="Mapping Requirements">
  
  <t> DetNet service is per flow (including app-layer, service-layer and forwarding-layer flow), performs traffic processing based on the 
  identification for flow/flow aggregation. Differences in IETF Network Slice service are considered in terms of Network Resource Partition. 
  <xref target="I-D.bestbar-teas-ns-packet"/> introduces a mechanism to associate Network Resource Partition (NRP) with Slice-Flow Aggregate. 
  If DetNet applied to IETF Network Slice, the DetNet-flow/flow aggregation is considered as the slice-flow/flow aggregation over the underlying NRP.</t>
 
    <t> Requirements for Network Slice mapping with deterministic networking services: </t>
    <list style="symbols">
    <t>
    The mapping of deterministic services with underlying network slice resources is necessary. It may include:
    <list style="symbols">
    <t>
    Service endpoint mapping between DetNet Edge Node and IETF Network Slice SDP. 
	</t>  
    <t> 
	Access service mapping between DetNet UNI and IETF Network Slice AC.
	</t> 
    <t> 
	Instance mapping between DetNet-flow/flow aggregations with IETF Network Slice.
    </t> 
    </list>
	</t>
    </list>
    <list style="symbols">
    <t>
    The creation request for network slice instance to be bounded with one specific deterministic flow/flow aggregation instances should be supported.
    </t>
    <t>
	The sharing of network slice instance for one or more deterministic flow/flow aggregation instances SHOULD be supported.
    </t>
    <t>
	Configurations for a new network slice instance to provide necessary underlying resource to deterministic services is necessary.
    </t>  
    <t>	
	Modification for an existing network slice instance applied to one or more DetNet flow SHOULD be supported.
    </t>  
    </list>

    </section> 

	 
	 <section title="Mapping Process">
    <list style="symbols">
    <t>
    APP-flow packets is instantiated as DetNet service awareness flow.
    </t>
    <t>
    If there is an existing IETF Network Slice instance which satisfies the network resource requirements of the DetNet customer. 
	After check the feasibility of the IETF Network Slice instance bound to DetNet flows, request mapping DetNet-flow/flow aggregations with 
	IETF Network Slice instance. 
    </t>
    <t>
	If there is no IETF Network Slice available, a new IETF Network Slice instance creation is required.
    </t>
    <t>
    The mapping of DetNet flow with IETF Network Slice is configured and stored in management plane. The mapping policy of DetNet flow associated 
	with underlying network resource partition (NRP) is programmed to the DetNet or IETF Network Slice Nodes (such as SDP, P nodes, etc.) through 
	YANG data models.
    </t>	
    <t>
	In data plane, the DetNet or IETF Network Slice Nodes complete the identification of deterministic service flows (such as IP 6-tuple, 
	MPLS labels, etc.) and correspond with one specific network slice instance , realize the slice awareness of DetNet flow/flow aggregation. 
	Through the network resource occupation of hop-by-hop nodes along the path, network resources required by the deterministic networking service 
	flow is guaranteed.
    </t>
    </list>	 
	  </section> 
    </section> 
  
    <section title="YANG Modeling Approach">	
    <t>This section provides how the DetNet and IETF Network Slice Service mapping parameters are supported using augmentation of the existing 
	DetNet service models (i.e., <xref target="I-D.ietf-detnet-yang"/>). It identifies the YANG data models being defined by the IETF to support this deployment
	architecture and specific scenarios relevant for Service Providers. </t>
    <t>The below figure shows the modeling approach of the Augmented DetNet Model.</t>

     <figure anchor="Figure_x" title="Modeling approach">
     <artwork align="center">     <![CDATA[
+--------------+        +----------------------+ 
|    DetNet    |o-------|                      | 
+--------------+ augment|                      | 
                        |                      | 
+--------------+        |Augmented DetNet Model| 
| DetNet & NS  |------->|                      | 
| Mapping Types| import |                      | 
+--------------+        |                      | 
                        +----------------------+ 
     ]]>     </artwork>
     </figure>	    
    </section> 	 
  
 
     <section title="YANG Data Tree"> 
      <section title="Service Mapping Types">	
     <artwork align="left">     <![CDATA[
   module: ietf-ns-detnet-mapping-types
     +--rw ns-mapping-templates
        +--rw ns-mapping-template* [id]
           +--rw id                  string
           +--rw description?        string
           +--rw map-type?           identityref
		   +--rw ns-slo-ref?      
		           ->/ns:slice-template/ns-slo-sle-templates/id	
     ]]>     </artwork>				 
      </section> 	
      <section title="Service Models">	
     <artwork align="left">     <![CDATA[
module: ietf-ns-detnet-service-mapping
    augment /dnet:detnet:detnet/service:sub-layer
              /service:sub-layer:
      +--rw ns-detnet-mapping
         +--rw ns-mapping
            +--rw map-type?                       identityref
            +--rw ns-id                           string
            +--rw ns-mapping-template-ref?
                    -> /nsdmt:ns-mapping-templates/ns-mapping-template/id
                    {template}?
     ]]>     </artwork>		  
      </section> 	  
    </section> 	 
  
     <section title="YANG Data Model"> 
      <section title="Service Mapping Types">	
     <artwork align="left">     <![CDATA[
  <CODE BEGINS> file "ietf-ns-detnet-mapping-types@2022-03-07.yang"
   module ietf-ns-detnet-mapping-types {
     yang-version 1.1;
     namespace
       "urn:ietf:params:xml:ns:yang:ietf-ns-detnet-mapping-types";
     prefix nsdmt;
            	 
     import ietf-network-slice {
       prefix ietf-ns;
       reference
         "I-D.ietf-teas-ietf-network-slice-nbi-yang-01: A YANG Data Model for the IETF Network Slice";
     }
	 
     organization
       "IETF DetNet Working Group";
     contact
       "WG Web:   <https://datatracker.ietf.org/wg/detnet/>
        WG List:  <mailto:detnet@ietf.org>

        Editor:   Xueyan Song
                  <song.xueyan2@zte.com.cn>
        Editor:   Haisheng Wu
                  <wu.haisheng@zte.com.cn>";
     description
       "This module contains a YANG module for IETF Network Slice & Detnet mapping
        parameters.

        Copyright (c) 2022 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 Revised BSD License set
        forth in Section 4.c of the IETF Trust's Legal Provisions
        Relating to IETF Documents
        (https://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 2022-03-27 {
       description
         "Initial revision.";
       reference
         "RFC XXXX:  YANG Data Model for DetNet Mapping with Network Slice";
     }

     /*
      * Features
      */

     feature template {
       description
         "Support Network Slice mapping templates.";
     }

     /*
      * Identity for map-type
      */

     identity map-type {               
       description
         "Base identity from which specific map types are derived.";
     }

     identity new {
       base map-type;
       description
         "The new Network Slice are binded to the service.";
     }

     identity select {
       base map-type;
       description
         "The Detnet service selects an existing Network Slice with no
          modification.";
     }

     identity modify {
       base map-type;
       description
         "The Detnet service selects an existing Network Slice and allows to modify
          the properties of the Network Slice (e.g., SLO)"; 
     }

     identity none {
       base map-type;
       description
         "The Detnet service is not mapped to any underlying Network Slice";
     }


     /*
      * Typedef
      */

     typedef ns-mapping-template-id {
       type string;
       description
         "Identifier for Network Slice mapping template.";
     }

     /*
      * Groupings
      */

     grouping ns-ref {
       description
         "The reference to Network Slice.";
		 
       leaf ns-mapping-slice-id{
	       type int;
	       description
	          "Identifier for a Network Slice."
	    };
         
       leaf ns-mapping-template-ref {
         if-feature "template";
         type leafref {
           path "/nsdmt:ns-mapping-templates/"
              + "nsdmt:ns-mapping-template/nsdmt:id";
         }
         description
           "An identifier to the Network Slice Mapping Template where the Network Slice
            constraints and optimization criteria are specified.";
       }
     }
     

     grouping ns-mapping {
       description
         "Mapping between Services and network-slice";
       container ns-mapping {
         description
           "Mapping between Services and network-slice";
         leaf map-type {
           type identityref {
             base map-type;
           }
           description
             "Isolation Requirements";
         }
         uses ns-ref;
       }
     }
	 
     //grouping

     container ns-mapping-templates {   
       description
         "The network-slice constraints and optimization criteria";
       list ns-mapping-template {
         key "id";
         leaf id {
           type ns-mapping-template-id;
           description
             "Identification of the Template to be used.";
         }
         leaf description {
           type string;
           description
             "Description of the template.";
         }
         leaf map-type {
           type identityref {
             base map-type;
           }
           must "0 = derived-from-or-self(.,'none')" {
             error-message "The map-type must be other than "
                         + "none";
           }
           description
             "Map type for Network Slice creation/
              selection.";
         }
          leaf ns-slo-ref{
		     type leafref {
				 path "/ns:ns-slo-sle-templates/ns-slo-sle-template/id";
		 }

         description
           "List for templates.";
       }
     }
   }
   <CODE ENDS>
     ]]>     </artwork>				 
      </section> 	
      <section title="Service Models">		  
     <artwork align="left">     <![CDATA[
   <CODE BEGINS> file "ietf-ns-detnet-service-mapping@2022-03-27.yang"
   module ietf-ns-detnet-service-mapping {
     yang-version 1.1;
     namespace
       "urn:ietf:params:xml:ns:yang:ietf-ns-detnet-service-mapping";
     prefix detnet-nssm;


     import ietf-ns-detnet-mapping-types {
       prefix nsdmt;
       reference
         "RFC XXXX:  YANG Data Model for DetNet Mapping with Network Slice";
     }
     import ietf-detnet {
       prefix dnet;
       reference
         "draft-ietf-detnet-yang-16.txt: YANG Data Model for Detnet";
     }

     organization
       "IETF DetNet Working Group";

     contact
       "WG Web:   <https://datatracker.ietf.org/wg/detnet/>
        WG List:  <mailto:detnet@ietf.org>

        Editor:   Xueyan Song
                  <song.xueyan@zte.com.cn>
        Editor:   Haisheng Wu
                  <wu.haisheng@zte.com.cn>";
	   
     description
       "This module contains a YANG module for the mapping of DetNet to the Network Slice.

        Copyright (c) 2022 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 Revised BSD License set
        forth in Section 4.c of the IETF Trust's Legal Provisions
        Relating to IETF Documents
        (https://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 2022-03-27 {
       description
         "Initial revision.";
       reference
         "RFC XXXX:  YANG Data Model for DetNet Mapping with Network Slice";
     }


     /*
      * Augmentation to Detnet
      */

     augment "/dnet:detnet:detnet/service:sub-layer"
           + "/service:sub-layer" {
       description
         "Detnet augmented to include Network Slice parameters and mapping";
       container ns-detnet-mapping {
         presence "Indicates Detnet service to Network Slice mapping";
         description
           "Container to augment detnet to Network Slice parameters and mapping";
         uses nsdmt:ns-mapping;
       }
     }

     //augment

   }
   <CODE ENDS>  
     ]]>     </artwork>		  
      </section> 	
    </section> 	 	

    <section title="IANA Considerations">	
    <t> This document requests the IANA to register the following URIs in the "IETF XML Registry" <xref target="RFC3688"/>.</t>	

        <figure>
          <artwork><![CDATA[
	URI: urn:ietf:params:xml:ns:yang: ietf-ns-detnet-mapping-types
	Registrant Contact: The IESG.
	XML: N/A, the requested URI is an XML namespace.

	URI: urn:ietf:params:xml:ns:yang:ietf-ns-detnet-service-mapping
	Registrant Contact: The IESG.
	XML: N/A, the requested URI is an XML namespace.

        ]]></artwork>
        </figure>   

	<t> This document requests the IANA to register the following YANG modules in the YANG Module Names registry <xref target="RFC7950"/>.</t>
        <figure>
	       <artwork><![CDATA[
	Name: ietf-ns-detnet-mapping-types
	Namespace: urn:ietf:params:xml:ns:yang: ietf-ns-detnet-mapping-types 
	Prefix: nsdmt
	Reference: [This.I-D]

	Name: ietf-ns-detnet-service-mapping
	Namespace: urn:ietf:params:xml:ns:yang: ietf-ns-detnet-service-mapping
	Prefix: detnet-nssm
	Reference: [This.I-D]


        ]]></artwork>
        </figure>   
	
    </section> 

    <section title="Security Considerations">	
    <t> Security considerations for DetNet are covered in the DetNet Architecture <xref target="RFC8655"/> and DetNet Security Considerations
	<xref target="RFC9055"/></t>	
    <t> The YANG data model specified in this document defines a schema for mapping of DetNet with IETF Network Slice via NETCONF 
	<xref target="RFC6241"/> or RESTCONF <xref target="RFC8040"/>. For NETCONF to support secure transport Secure Shell (SSH) 
	<xref target="RFC6242"/> is mandatory. For RESTCONF to support secure transport TLS <xref target="RFC8446"/> is mandatory.</t>	
    </section> 

	
    <section title="Acknowledgement">	
    <t> The authors appreciate Peng Shaofu and Liu Aihua for useful discussions and motivations for this work.</t>
    </section> 	
  
</middle>
  
<back>

    <references title="Normative References">
     <?rfc include="reference.RFC.2119"?>
     <?rfc include="reference.RFC.8174"?>
     <?rfc include="reference.RFC.8655"?>	
	 <?rfc include="reference.RFC.8938"?>
     <?rfc include="reference.RFC.7960"?>
	 <?rfc include="reference.RFC.3688"?>
	 <?rfc include="reference.RFC.7950"?>
	 <?rfc include="reference.RFC.9055"?>
	 <?rfc include="reference.RFC.6241"?>	
	 <?rfc include="reference.RFC.6242"?>	 
	 <?rfc include="reference.RFC.8040"?>	
	 <?rfc include="reference.RFC.8446"?>		 
     <?rfc include="reference.I-D.ietf-detnet-yang"?>	 
     <?rfc include="reference.I-D.ietf-teas-ietf-network-slices"?>	 
        <reference anchor="TS 28.530" target="https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=3273">
          <front>
            <title>Management and orchestration; Concepts, use cases and requirements</title>
            <author>
              <organization>3GPP</organization>
            </author>
          </front>
        </reference>
    </references>

	<references title="Informative References">
     <?rfc include="reference.RFC.8578"?>
     <?rfc include="reference.I-D.bestbar-teas-ns-packet"?>	 
    </references>
	
</back>
</rfc>
