MPLS Working Group                                               T. Saad
Internet-Draft                                                 V. Beeram
Intended status: Standards Track                        Juniper Networks
Expires: May 6, 2021                                    November 2, 2020


          YANG Data Model for Network Slice Per-Hop Definition
                   draft-bestbar-teas-yang-ns-phd-00

Abstract

   This document defines a YANG data model for the management of Network
   Slice Per-Hop Definitions (Slice-PHDs) on network slicing capable
   nodes in IP/MPLS networks.

Requirements Language

   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 [RFC2119] [RFC8174] when, and only when, they appear in all
   capitals, as shown here.

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 https://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 May 6, 2021.

Copyright Notice

   Copyright (c) 2020 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
   (https://trustee.ietf.org/license-info) in effect on the date of



Saad & Beeram              Expires May 6, 2021                  [Page 1]


Internet-Draft           NS PHD YANG Data Model            November 2020


   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.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.1.  Terminology . . . . . . . . . . . . . . . . . . . . . . .   3
     1.2.  Tree Structure  . . . . . . . . . . . . . . . . . . . . .   3
   2.  Network Slice Per-Hop Definition Model  . . . . . . . . . . .   3
     2.1.  Model Usage . . . . . . . . . . . . . . . . . . . . . . .   3
     2.2.  Model Structure . . . . . . . . . . . . . . . . . . . . .   3
     2.3.  Network Slice Per-Hop-Behaviors . . . . . . . . . . . . .   4
     2.4.  Network Slices  . . . . . . . . . . . . . . . . . . . . .   4
       2.4.1.  Slice Resource Reservation  . . . . . . . . . . . . .   5
       2.4.2.  Slice Selectors . . . . . . . . . . . . . . . . . . .   5
       2.4.3.  Slice Per-Hop-Behavior  . . . . . . . . . . . . . . .   6
       2.4.4.  Slice Membership  . . . . . . . . . . . . . . . . . .   6
     2.5.  YANG Module . . . . . . . . . . . . . . . . . . . . . . .   7
   3.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .  25
   4.  Contributors  . . . . . . . . . . . . . . . . . . . . . . . .  25
   5.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  25
   6.  Security Considerations . . . . . . . . . . . . . . . . . . .  26
   7.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  27
     7.1.  Normative References  . . . . . . . . . . . . . . . . . .  27
     7.2.  Informative References  . . . . . . . . . . . . . . . . .  28
   Appendix A.  Complete Model Tree Structure  . . . . . . . . . . .  28
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  31

1.  Introduction

   Network slicing in IP/MPLS networks can be realized by partitioning
   the shared network resources in just the control plane or in just the
   data plane or in both the control and data planes
   [I-D.bestbar-teas-ns-packet].  The latter two approaches require the
   forwarding engine on each network slicing capable node to identify
   the traffic belonging to a specific slice and to apply the
   corresponding Slice Per-Hop Behavior (Slice-PHB) that determines the
   forwarding treatment of the packets belonging to the network slice.
   The identification of the slice that the packet belongs to and the
   corresponding forwarding treatment that needs to be applied to the
   packet is dictated by the Network Slice Per-Hop Definition (Slice-
   PHD) that is provisioned on each network slicing capable node.





Saad & Beeram              Expires May 6, 2021                  [Page 2]


Internet-Draft           NS PHD YANG Data Model            November 2020


   This document defines a YANG data model for the provisioning and
   management of Slice-PHDs on network slicing capable nodes in IP/MPLS
   networks.

1.1.  Terminology

   The terminology for describing YANG data models is found in
   [RFC7950].

   The reader is expected to be familiar with the terminology specified
   in [I-D.nsdt-teas-ietf-network-slice-definition],
   [I-D.nsdt-teas-ns-framework] and [I-D.bestbar-teas-ns-packet].  The
   term "Network Slice" used in this document must be interpreted as
   "IETF Network Slice" [I-D.nsdt-teas-ietf-network-slice-definition].

1.2.  Tree Structure

   A simplified graphical representation of the data model is presented
   in Appendix A of this document.  The tree format defined in [RFC8340]
   is used for the YANG data model tree representation.

2.  Network Slice Per-Hop Definition Model

2.1.  Model Usage

   The instantiation of a network slice may require a network slice
   controller that accepts a service layer slice customer intent as
   input and translates it to a network-wide consistent per-hop slice
   definition that is distributed to network slicing capable nodes.  The
   specification of the service layer slice customer intent is outside
   the scope of this document.  The data model defined in this document
   covers the per-hop slice definition that is consumed by the network
   slicing capable nodes.

2.2.  Model Structure

   The high-level model structure defined by this document is as shown
   below:













Saad & Beeram              Expires May 6, 2021                  [Page 3]


Internet-Draft           NS PHD YANG Data Model            November 2020


      module: ietf-network-slice-phd
      +--rw network-slicing!
        +--rw network-slice-phbs
        |  +--rw network-slice-phb* [id]
        |     ............
        +--rw network-slices
           +--rw network-slice* [name]
              |  ............
              +--rw slice-resource-reservation
              |  ............
              +--rw slice-selectors
              |  +--rw slice-selector* [id]
              |     ............
              +--rw slice-phb?                    ns-phb-ref
              |  ............
              +--rw slice-membership
                 ............

   In addition to the set of Slice-PHDs (network-slices), the model also
   includes a placeholder for the set of Slice-PHBs (network-slice-phbs)
   that are referenced by the Slice-PHDs.

2.3.  Network Slice Per-Hop-Behaviors

   The Slice-PHBs (network-slice-phbs) container carries a list of
   Slice-PHB (network-slice-phb) entries.  Each of these entries can be
   referenced by one or more Slice-PHD.  A Slice-PHB entry can either
   carry a reference to a generic PHB profile available on the node or
   carry a custom PHB profile.  The custom PHB profile includes
   sufficient attributes to construct a slice specific Qos profile and
   any classes within it.

        +--rw network-slice-phbs
        |  +--rw network-slice-phb* [id]
        |     +--rw id                                    uint16
        |     +--rw (profile-type)?
        |        +--:(profile)
        |        |  +--rw profile?                        string
        |        +--:(custom-profile)
        |           ............

2.4.  Network Slices

   The Slice-PHDs are held in a container called 'network-slices'.  Each
   network-slice entry is identified by a name and holds the set of per-
   hop attributes needed to instantiate the network slice.  The four key
   elements of each network-slice entry are discussed in the following
   sub-sections.



Saad & Beeram              Expires May 6, 2021                  [Page 4]


Internet-Draft           NS PHD YANG Data Model            November 2020


2.4.1.  Slice Resource Reservation

   The 'slice-resource-reservation' container carries data nodes that
   are used to support Slice-aware Bandwidth Engineering.  The data
   nodes in this container facilitate preference-based preemption of
   Slice-aware TE paths, sharing of resources amongst a group of slices
   and backup slice path bandwidth protection.

              +--rw slice-resource-reservation
              |  +--rw preference?                        uint16
              |  +--rw (max-bw-type)?
              |  |  +--:(bw-value)
              |  |  |  +--rw maximum-bandwidth?           uint64
              |  |  +--:(bw-percentage)
              |  |     +--rw maximum-bandwidth-percent?
              |  |             rt-types:percentage
              |  +--rw shared-resource-groups*            uint32
              |  +--rw protection
              |     +--rw backup-slice-id?                  uint32
              |     +--rw (backup-bw-type)?
              |        +--:(backup-bw-value)
              |        |  +--rw backup-bandwidth?           uint64
              |        +--:(backup-bw-percentage)
              |           +--rw backup-bandwidth-percent?
              |                   rt-types:percentage

2.4.2.  Slice Selectors

   The 'slice-selectors' container carries a set of data plane field
   selectors which are used to identify the packets belonging to the
   given network slice.  Each slice selector is uniquely identified by a
   16-bit ID.  The slice selector with the lowest ID is the default
   slice selector used by all the topological elements that are members
   of the given network slice.  The other entries may be used when there
   is a need to override the default slice selector on some select
   topological elements.















Saad & Beeram              Expires May 6, 2021                  [Page 5]


Internet-Draft           NS PHD YANG Data Model            November 2020


              +--rw slice-selectors
              |  +--rw slice-selector* [id]
              |     +--rw id         uint16
              |     +--rw mpls
              |     |  +--rw (ss-mpls-type)?
              |     |     +--:(label-value)
              |     |     |  +--rw label?
              |     |     |  |       rt-types:mpls-label
              |     |     |  +--rw label-position?          identityref
              |     |     |  +--rw label-position-offset?   uint8
              |     |     +--:(label-ranges)
              |     |        +--rw label-range* [index]
              |     |           +--rw index                    string
              |     |           +--rw start-label?
              |     |           |       rt-types:mpls-label
              |     |           +--rw end-label?
              |     |           |       rt-types:mpls-label
              |     |           +--rw label-position?
              |     |           |       identityref
              |     |           +--rw label-position-offset?   uint8
              |     +--rw ipv4
              |     |  +--rw destination-prefix*   inet:ipv4-prefix
              |     +--rw ipv6
              |     |  +--rw (ss-ipv6-type)?
              |     |     +--:(ipv6-destination)
              |     |     |  +--rw destination-prefix*
              |     |     |          inet:ipv6-prefix
              |     |     +--:(ipv6-flow-label)
              |     |        +--rw slid-flow-labels
              |     |           +--rw slid-flow-label* [slid]
              |     |              +--rw slid       inet:ipv6-flow-label
              |     |              +--rw bitmask?   uint32
              |     +--rw acl-ref*   ns-acl-ref

2.4.3.  Slice Per-Hop-Behavior

   The Slice-PHB leaf carries a reference to the appropriate PHB that
   needs to be applied for the given network slice.  Unless specified
   otherwise, this is the default Slice-PHB to be used by all the
   topological elements that are members of the given network slice.

              +--rw slice-phb?                    ns-phb-ref

2.4.4.  Slice Membership

   The 'slice-membership' container consists of a set of filtering
   policies that are used to determine which topological elements on the
   given node belong to the specific network slice.  A filtering policy



Saad & Beeram              Expires May 6, 2021                  [Page 6]


Internet-Draft           NS PHD YANG Data Model            November 2020


   could either reference a predefined topology or specify the rules to
   construct a customized topology using a set of include and exclude
   filters.  The topological elements that satisfy the network slice
   membership criteria can optionally override the default Slice-PHB
   and/or the default slice selector.

              +--rw slice-membership
                 +--rw filter-policies
                    +--rw filter-policy* [id]
                       +--rw id
                       |       uint16
                       +--rw (filter-type)?
                       |  +--:(topology-ref)
                       |  |  +--rw (topo-ref-type)?
                       |  |     +--:(algo-id)
                       |  |     |  +--rw algo-id?                  uint8
                       |  |     +--:(te-topo-id)
                       |  |        +--rw te-topology-identifier
                       |  |           +--rw provider-id?   te-global-id
                       |  |           +--rw client-id?     te-global-id
                       |  |           +--rw topology-id?
                       |  |                   te-topology-id
                       |  +--:(custom-topology)
                       |     +--rw include
                       |     |  +--rw link-affinity*   string
                       |     |  +--rw link-name*       string
                       |     |  +--rw node-prefix*     inet:ip-prefix
                       |     |  +--rw as*              inet:as-number
                       |     +--rw exclude
                       |        +--rw link-affinity*   string
                       |        +--rw link-name*       string
                       |        +--rw node-prefix*     inet:ip-prefix
                       |        +--rw as*              inet:as-number
                       +--rw slice-selector?
                       |       ns-ss-ref
                       +--rw slice-phb?
                               ns-phb-ref

2.5.  YANG Module

   <CODE BEGINS> file "ietf-network-slice-phd@2020-11-02"
   module ietf-network-slice-phd {
     yang-version 1.1;
     namespace "urn:ietf:params:xml:ns:yang:ietf-network-slice-phd";
     prefix "ns-phd";

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



Saad & Beeram              Expires May 6, 2021                  [Page 7]


Internet-Draft           NS PHD YANG Data Model            November 2020


       reference
         "RFC 6991: Common YANG Data Types";
     }

     import ietf-routing-types {
       prefix "rt-types";
       reference
         "RFC 8294: Common YANG Data Types for the Routing Area";
     }

     import ietf-access-control-list {
       prefix "acl";
       reference
         "RFC 8519: YANG Data Model for Network Access Control Lists
          (ACLs)";
     }

     import ietf-te-types {
       prefix te-types;
       reference
         "RFC 8776: Common YANG Data Types for Traffic Engineering";
     }

     organization
       "IETF Traffic Engineering Architecture and Signaling (TEAS)
        Working Group.";

     contact
       "WG Web:   <http://tools.ietf.org/wg/teas/>
        WG List:  <mailto:teas@ietf.org>

        Editor:   Vishnu Pavan Beeram
                  <mailto:vbeeram@juniper.net>

        Editor:   Tarek Saad
                  <mailto:tsaad@juniper.net>";

     description
       "This YANG module defines a data model for managing Network
        Slice Per-Hop Definitions (Slice-PHDs) on a network slicing
        capable node.

        Copyright (c) 2020 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



Saad & Beeram              Expires May 6, 2021                  [Page 8]


Internet-Draft           NS PHD YANG Data Model            November 2020


        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 "2020-11-02" {
       description "Initial revision.";
       reference
         "RFC XXXX: YANG Data Model for Network Slice Per-Hop
          Definitions (Slice-PHDs).";
     }


     /*
      * I D E N T I T I E S
      */


     /*
      * Identity - MPLS Slice Selector Label Position Type
      */

     identity ss-mpls-label-position-type {
       description
         "Base identity for the position of the MPLS label that is used
          for slice selection.";
     }

     identity ss-mpls-label-position-top {
       base ss-mpls-label-position-type;
       description
         "MPLS label that is used for slice selection is at the top of
          the label stack.";
     }

     identity ss-mpls-label-position-bottom {
       base ss-mpls-label-position-type;
       description
         "MPLS label that is used for slice selection is either at the
          bottom or at a specific offset from the bottom of the label
          stack.";
     }

     identity ss-mpls-label-position-indicator {
       base ss-mpls-label-position-type;
       description



Saad & Beeram              Expires May 6, 2021                  [Page 9]


Internet-Draft           NS PHD YANG Data Model            November 2020


         "MPLS label that is used for slice selection is immediately
          preceded by a special purpose slice indicator label in the
          label stack.";
     }

     /*
      * Identity - Slice-PHB Class Direction
      */

     identity s-phb-class-direction {
       description
         "Base identity for the direction of traffic to which the Slice
          PHB class profile is applied.";
     }

     identity s-phb-class-direction-in {
       base s-phb-class-direction;
       description
         "Slice PHB class profile is applied to incoming traffic.";
     }

     identity s-phb-class-direction-out {
       base s-phb-class-direction;
       description
         "Slice PHB class profile is applied to outgoing traffic.";
     }

     identity s-phb-class-direction-in-out {
       base s-phb-class-direction;
       description
         "Slice PHB class profile is applied to both incoming and
          outgoing directions of traffic.";
     }

     /*
      * Identity - Slice-PHB Class Priority
      */

     identity s-phb-class-priority {
       description
         "Base identity for the priority of the child class scheduler.";
     }

     identity s-phb-class-priority-low {
       base s-phb-class-drop-probability;
       description
         "Priority of the child class scheduler is low.";
     }



Saad & Beeram              Expires May 6, 2021                 [Page 10]


Internet-Draft           NS PHD YANG Data Model            November 2020


     identity s-phb-class-priority-strict-high {
       base s-phb-class-drop-probability;
       description
         "Priority of the child class scheduler is strict-high.";
     }

     /*
      * Identity - Slice-PHB Class Drop Probability
      */

     identity s-phb-class-drop-probability {
       description
         "Base identity for the drop probability applied to packets
          exceeding the CIR of the class queue.";
     }

     identity s-phb-class-drop-probability-low {
       base s-phb-class-drop-probability;
       description
         "Low drop probability applied to packets exceeding the CIR of
          the class queue.";
     }

     identity s-phb-class-drop-probability-medium {
       base s-phb-class-drop-probability;
       description
         "Medium drop probability applied to packets exceeding the CIR
          of the class queue.";
     }

     identity s-phb-class-drop-probability-high {
       base s-phb-class-drop-probability;
       description
         "High drop probability applied to packets exceeding the CIR of
          the class queue.";
     }

     /*
      * T Y P E D E F S
      */

     typedef ns-acl-ref {
       type leafref {
         path "/acl:acls/acl:acl/acl:name";
       }
       description
         "This type is used to reference an ACL.";
     }



Saad & Beeram              Expires May 6, 2021                 [Page 11]


Internet-Draft           NS PHD YANG Data Model            November 2020


     typedef ns-ss-ref {
       type leafref {
         path "/network-slicing/network-slices/network-slice/"
           + "slice-selectors/slice-selector/id";
       }
       description
         "This type is used to reference a Slice Selector (SS).";
     }

     typedef ns-phb-ref {
       type leafref {
         path "/network-slicing/network-slice-phbs/network-slice-phb/"
           + "id";
       }
       description
         "This type is used to reference a Slice Per-Hop Behavior
          (Slice-PHB).";
     }

     /*
      * G R O U P I N G S
      */

     /*
      * Grouping - Slice Selector MPLS: Label location specific fields
      */
     grouping ns-ss-mpls-label-location {
       description
         "Grouping for MPLS (SS) label location specific fields.";
       leaf label-position {
         type identityref {
           base ss-mpls-label-position-type;
         }
         description
           "MPLS label position - top, bottom with offset, Slice label
            indicator.";
       }
       leaf label-position-offset {
         when "derived-from-or-self(../label-position,"
           + "'ns-phd:ss-mpls-label-position-bottom')" {
           description
             "MPLS label position offset is relevant only when the
              label-position is set to 'bottom'.";
         }
         type uint8;
         description
           "MPLS label position offset.";
       }



Saad & Beeram              Expires May 6, 2021                 [Page 12]


Internet-Draft           NS PHD YANG Data Model            November 2020


     }

     /*
      * Grouping - Slice Selector (SS)
      */
     grouping ns-slice-selector {
       description
         "Grouping for Slice Selectors.";
       container slice-selectors {
         description
           "Container for Slice Selectors.";
         list slice-selector {
           key "id";
           description
             "List of Slice Selectors - this includes the default
              selector and others used for overriding the default.";
           leaf id {
             type uint16;
             description
               "A 16-bit ID to uniquely identify the Slice Selector.
                The Slice Selector with the lowest ID is the default
                selector.";
           }
           container mpls {
             description
               "Container for MPLS Slice Selector.";
             choice ss-mpls-type {
               description
                 "Choices for MPLS Slice Selector.";
               case label-value {
                 leaf label {
                   type rt-types:mpls-label;
                   description
                     "MPLS Slice Selector Label is explicitly
                      specified.";
                 }
                 uses ns-ss-mpls-label-location;
               }
               case label-ranges {
                 list label-range {
                   key "index";
                   unique "start-label end-label";
                   description
                     "MPLS Slice Selector Label is picked from a
                      specified set of label ranges.";
                   leaf index {
                     type string;
                     description



Saad & Beeram              Expires May 6, 2021                 [Page 13]


Internet-Draft           NS PHD YANG Data Model            November 2020


                       "A string that uniquely identifies a label
                        range.";
                   }
                   leaf start-label {
                     type rt-types:mpls-label;
                     must '. <= ../end-label' {
                       error-message
                         "The start-label must be less than or equal "
                       + "to end-label";
                     }
                     description
                       "Label-range start.";
                   }
                   leaf end-label {
                     type rt-types:mpls-label;
                     must '. >= ../start-label' {
                       error-message
                         "The end-label must be greater than or equal "
                       + "to start-label";
                     }
                     description
                       "Label-range end.";
                   }
                   uses ns-ss-mpls-label-location;
                 }
               }
             }
           }
           container ipv4 {
             description
               "Container for IPv4 Slice Selector.";
             leaf-list destination-prefix {
               type inet:ipv4-prefix;
               description
                 "IPv4 Slice Selector is picked from a specified set of
                  IPv4 destination prefixes.";
             }
           }
           container ipv6 {
             description
               "Container for IPv6 Slice Selector.";
             choice ss-ipv6-type {
               description
                 "Choices for IPv6 Slice Selector.";
               case ipv6-destination {
                 leaf-list destination-prefix {
                   type inet:ipv6-prefix;
                   description



Saad & Beeram              Expires May 6, 2021                 [Page 14]


Internet-Draft           NS PHD YANG Data Model            November 2020


                     "IPv6 Slice Selector is picked from a specified
                      set of IPv6 destination prefixes.";
                 }
               }
               case ipv6-flow-label {
                 container slid-flow-labels {
                   description
                     "Container for a set of Slice IDs that are
                      encoded within the flow label.";
                   list slid-flow-label {
                     key "slid";
                     description
                       "IPv6 Slice Selector is picked from a set of
                        Slice IDs that are encoded within the flow
                        label.";
                     leaf slid {
                       type inet:ipv6-flow-label;
                       description
                         "Slice ID encoded inside the IPv6 flow label.";
                     }
                     leaf bitmask {
                       type uint32;
                       description
                         "Bitmask to extract the encoded Slice ID from
                          the IPv6 flow label.";
                     }
                   }
                 }
               }
             }
           }
           leaf-list acl-ref {
             type ns-acl-ref;
             description
               "Slice Selection is done based on the specified list of
                ACLs.";
           }
         }
       }
     }

     /*
      * Grouping - Slice Resource Reservation
      */
     grouping ns-slice-resource-reservation {
       description
         "Grouping for Slice Resource Reservation.";
       container slice-resource-reservation {



Saad & Beeram              Expires May 6, 2021                 [Page 15]


Internet-Draft           NS PHD YANG Data Model            November 2020


         description
           "Container for Slice Resource Reservation.";
         leaf preference {
           type uint16;
           description
             "Slice control plane preference. A higher preference
              indicates a more favorable slice resource
              reservation than a lower preference.";
         }
         choice max-bw-type {
           description
             "Choice of maximum bandwidth specification.";
           case bw-value {
             leaf maximum-bandwidth {
               type uint64;
               description
                 "The maximum bandwidth allocated to a network slice on
                  the network resources - specified as absolute value.";
             }
           }
           case bw-percentage {
             leaf maximum-bandwidth-percent {
               type rt-types:percentage;
               description
                 "The maximum bandwidth allocated to a network slice on
                  the network resources - specified as percentage of
                  link capacity.";
             }
           }
         }
         leaf-list shared-resource-groups {
           type uint32;
           description
             "List of shared resource groups that a network slice
              shares its allocated resources with.";
         }
         container protection {
           description
             "Container for network slice protection reservation.";
           leaf backup-slice-id {
             type uint32;
             description
               "The Slice ID that identifies the network slice used
                for backup paths that protect primary paths in a
                specific network slice.";
           }
           choice backup-bw-type {
             description



Saad & Beeram              Expires May 6, 2021                 [Page 16]


Internet-Draft           NS PHD YANG Data Model            November 2020


               "Choice of backup bandwidth specification.";
             case backup-bw-value {
               leaf backup-bandwidth {
                 type uint64;
                 description
                   "The maximum bandwidth on a network resource that
                    is allocated for backup traffic - specified as
                    absolute value.";
               }
             }
             case backup-bw-percentage {
               leaf backup-bandwidth-percent {
                 type rt-types:percentage;
                 description
                   "The maximum bandwidth on a network resource that
                    is allocated for backup traffic - specified as
                    percentage of the link capacity.";
               }
             }
           }
         }
       }
     }

     /*
      * Grouping - Slice-PHB
      */
     grouping ns-slice-phb {
       description
         "Grouping for Slice-PHB.";
       leaf slice-phb {
         type ns-phb-ref;
         description
           "Reference to a specific Slice-PHB from the list global
            Slice-PHBs.";
       }
     }

     /*
      * Grouping - Slice default profile override
      */
     grouping ns-slice-default-profile-override {
       description
         "Grouping of fields that are used to override the default
          profile of the network slice.";
       leaf slice-selector {
         type ns-ss-ref;
         description



Saad & Beeram              Expires May 6, 2021                 [Page 17]


Internet-Draft           NS PHD YANG Data Model            November 2020


           "Reference to a specific Slice Selector.";
       }
       uses ns-slice-phb;
     }

     /*
      * Grouping - Slice membership filter: Topology reference
      */
     grouping ns-slice-membership-topo-ref {
       description
         "Grouping for topology reference slice membership filter.";
       choice topo-ref-type {
         description
           "Choice of topology reference.";
         case algo-id {
           leaf algo-id {
             type uint8;
             description
               "Algorithm ID.";
           }
         }
         case te-topo-id {
           uses te-types:te-topology-identifier;
         }
       }
     }

     /*
      * Grouping - Slice membership filters: Custom topology
      */
     grouping ns-slice-membership-custom-topo {
       description
         "Grouping for custom topology slice membership filters.";
       leaf-list link-affinity {
         type string;
         description
           "Match-filter is a list of link affinities.";
       }
       leaf-list link-name {
         type string;
         description
           "Match-filter is a list of link names.";
       }
       leaf-list node-prefix {
         type inet:ip-prefix;
         description
           "Match-filter is a list of node IDs.";
       }



Saad & Beeram              Expires May 6, 2021                 [Page 18]


Internet-Draft           NS PHD YANG Data Model            November 2020


       leaf-list as {
         type inet:as-number;
         description
           "Match-filter is a list of AS numbers.";
       }
     }

     /*
      * Grouping - Slice membership filters
      */
     grouping ns-slice-membership-filters {
       description
         "Grouping for Slice Membership filters.";
       choice filter-type {
         description
           "Choice of filter type.";
         case topology-ref {
           uses ns-slice-membership-topo-ref;
         }
         case custom-topology {
           container include {
             description
               "Include policies.";
             uses ns-slice-membership-custom-topo;
           }
           container exclude {
             description
               "Exclude policies.";
             uses ns-slice-membership-custom-topo;
           }
         }
       }
     }

     /*
      * Grouping - Slice Membership
      */
     grouping ns-slice-membership {
       description
         "Grouping for 'Slice Membership'.";
       container slice-membership {
         description
           "Container for Slice Membership.";
         container filter-policies {
           description
             "Container for topology filtering policies.";
           list filter-policy {
             key "id";



Saad & Beeram              Expires May 6, 2021                 [Page 19]


Internet-Draft           NS PHD YANG Data Model            November 2020


             description
               "List of topology filtering policies.";
             leaf id {
               type uint16;
               description
                 "A 16-bit ID that uniquely identifies the topology
                  filtering policy.";
             }
             uses ns-slice-membership-filters;
             uses ns-slice-default-profile-override;
           }
         }
       }
     }

     /*
      * Grouping - Network Slice Per-Hop Behaviors (Slice-PHBs)
      */
     grouping ns-phbs {
       description
         "Grouping for Slice-PHBs.";
       container network-slice-phbs {
         description
           "Container for Slice-PHBs.";
         list network-slice-phb {
           key "id";
           description
             "List of Slice-PHBs.";
           leaf id {
             type uint16;
             description
               "A 16-bit ID that uniquely identifies the Slice-PHB.";
           }
           choice profile-type {
             description
               "Choice of PHB profile type.";
             case profile {
               description
                 "Generic PHB profile available on the network
                  element.";
               leaf profile {
                 type string;
                 description
                   "Generic PHB profile identifier.";
               }
             }
             case custom-profile {
               description



Saad & Beeram              Expires May 6, 2021                 [Page 20]


Internet-Draft           NS PHD YANG Data Model            November 2020


                 "Custom PHB profile.";
               choice guaranteed-rate-type {
                 description
                   "Guaranteed rate is the committed information rate
                    (CIR) of the Slice. The guaranteed rate also
                    determines the amount of excess (extra) bandwidth
                    that a group of Slices can share. Extra bandwidth
                    is allocated among the group in proportion to the
                    guaranteed rate of each Slice.";
                 case rate {
                   leaf guaranteed-rate {
                     type uint64;
                     description
                       "Guaranteed rate specified as absolute value.";
                   }
                 }
                 case percentage {
                   leaf guaranteed-rate-percent {
                     type rt-types:percentage;
                     description
                       "Guaranteed rate specified in percentage.";
                   }
                 }
               }
               choice shaping-rate-type {
                 description
                   "Shaping rate is the maximum bandwidth of the slice,
                    or the peak information rate (PIR) of a Slice.";
                 case rate {
                   leaf shaping-rate {
                     type uint64;
                     description
                       "Shaping rate specified as absolute value.";
                   }
                 }
                 case percentage {
                   leaf shaping-rate-percent {
                     type rt-types:percentage;
                     description
                       "Shaping rate specified in percentage.";
                   }
                 }
               }
               container classes {
                 description
                   "Container for classes.";
                 list class {
                   key class-id;



Saad & Beeram              Expires May 6, 2021                 [Page 21]


Internet-Draft           NS PHD YANG Data Model            November 2020


                   description
                     "List of classes.";
                   leaf class-id {
                     type string;
                     description
                       "A string to uniquely identify a class.";
                   }
                   leaf direction {
                     type identityref {
                       base s-phb-class-direction;
                     }
                     description
                       "Class direction.";
                   }
                   leaf priority {
                     type identityref {
                       base s-phb-class-priority;
                     }
                     description
                       "Priority of the class scheduler.  Only one Slice
                        class queue can be set as a strict-high priority
                        queue. Strict-high priority allocates the
                        scheduled bandwidth to the queue before any
                        other queue receives bandwidth. Other queues
                        receive the bandwidth that remains after the
                        strict-high queue has been serviced.";
                   }
                   choice guaranteed-rate-type {
                     description
                       "Guaranteed Rate is the Committed information
                        rate (CIR) of Slice class - specified as
                        absolute value or percentage.";
                     case rate {
                       leaf guaranteed-rate {
                         type uint64;
                         description
                           "Guaranteed rate specified as absolute
                            value.";
                       }
                     }
                     case percentage {
                       leaf guaranteed-rate-percent {
                         type rt-types:percentage;
                         description
                           "Guaranteed rate specified in percentage.";
                       }
                     }
                   }



Saad & Beeram              Expires May 6, 2021                 [Page 22]


Internet-Draft           NS PHD YANG Data Model            November 2020


                   leaf drop-probability {
                     type identityref {
                       base s-phb-class-drop-probability;
                     }
                     description
                       "Drop probability applied to packets exceeding
                        the CIR of the class queue.";
                   }
                   choice maximum-bandwidth-type {
                     description
                       "Maximum bandwidth is the Peak information
                        rate (PIR) of Slice class - specified as
                        absolute value or percentage.";
                     case rate {
                       leaf maximum-bandwidth {
                         type uint64;
                         description
                           "Maximum bandwidth specified as absolute
                            value.";
                       }
                     }
                     case percentage {
                       leaf maximum-bandwidth-percent {
                         type rt-types:percentage;
                         description
                           "Maximum bandwidth specified as percentage.";
                       }
                     }
                   }
                   choice delay-buffer-size-type {
                     description
                       "Size of the queue buffer as a percentage of the
                        dedicated buffer space - specified as value or
                        percentage.";
                     case value {
                       leaf delay-buffer-size {
                         type uint64;
                         description
                           "Delay buffer size.";
                       }
                     }
                     case percentage {
                       leaf delay-buffer-size-percent {
                         type rt-types:percentage;
                         description
                           "Delay buffer size specified as percentage.";
                       }
                     }



Saad & Beeram              Expires May 6, 2021                 [Page 23]


Internet-Draft           NS PHD YANG Data Model            November 2020


                   }
                 }
               }
             }
           }
         }
       }
     }

     /*
      * Grouping - Network Slice Per-Hop Definitions (Slice-PHDs)
      */
     grouping ns-entries {
       description
         "Grouping for Slice-PHDs.";
       container network-slices {
         description
           "Container for Slice-PHD entries (network-slices).";
         list network-slice {
           key "name";
           unique "id";
           description
             "List of network slices.";
           leaf name {
             type string;
             description
               "A string that uniquely identifies the network slice.";
           }
           leaf id {
             type uint32;
             description
               "A 32-bit ID that uniquely identifies the network
                slice.";
           }
           uses ns-slice-resource-reservation;
           uses ns-slice-selector;
           uses ns-slice-phb;
           uses ns-slice-membership;
         }
       }
     }

     /*
      * Top-level container - Network Slicing
      */
     container network-slicing {
       presence "Enable network slicing.";
       description



Saad & Beeram              Expires May 6, 2021                 [Page 24]


Internet-Draft           NS PHD YANG Data Model            November 2020


         "Top-level container for network slicing specific constructs
          on a network slicing capable node.";
       uses ns-phbs;
       uses ns-entries;
     }
   }
   <CODE ENDS>

3.  Acknowledgements

   The authors would like to thank Krzysztof Szarkowicz for his input
   from discussions.

4.  Contributors

   The following individuals contributed to this document:

   Colby Barth
   Juniper Networks
   Email: cbarth@juniper.net

   Srihari R.  Sangli
   Juniper Networks
   Email: ssangli@juniper.net

   Chandra Ramachandran
   Juniper Networks
   Email: csekar@juniper.net


5.  IANA Considerations

   This document registers the following URI in the IETF XML registry
   [RFC3688].  Following the format in [RFC3688], the following
   registration is requested to be made.

   URI: urn:ietf:params:xml:ns:yang:ietf-network-slice-phd
   Registrant Contact: The TEAS WG of the IETF.
   XML: N/A, the requested URI is an XML namespace.

   This document registers a YANG module in the YANG Module Names
   registry [RFC6020].

   name: ietf-network-slice-phd
   namespace: urn:ietf:params:xml:ns:yang:ietf-network-slice-phd
   prefix: ns-phd
   reference: RFCXXXX




Saad & Beeram              Expires May 6, 2021                 [Page 25]


Internet-Draft           NS PHD YANG Data Model            November 2020


6.  Security Considerations

   The YANG module specified in this document defines a schema for data
   that is designed to be accessed via network management protocols such
   as NETCONF [RFC6241] or RESTCONF [RFC8040].  The lowest NETCONF layer
   is the secure transport layer, and the mandatory-to-implement secure
   transport is Secure Shell (SSH) [RFC6242].  The lowest RESTCONF layer
   is HTTPS, and the mandatory-to-implement secure transport is TLS
   [RFC8446].

   The Network Configuration Access Control Model (NACM) [RFC8341]
   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.

   The data nodes defined in this YANG module that are
   writable/creatable/deletable (i.e., config true, which is the
   default) may be considered sensitive or vulnerable in some network
   environments.  Write operations (e.g., edit-config) to these data
   nodes without proper protection can have a negative effect on network
   operations.  These are the subtrees and data nodes and their
   sensitivity/vulnerability:

   *  "/network-slicing/network-slice-phbs": This subtree specifies the
      configurations for network slice per-hop behaviors.  By
      manipulating these data nodes, a malicious attacker may cause
      unauthorized and improper behavior to be provided for the slice
      traffic on the network element.

   *  "/network-slicing/network-slices": This subtree specifies the
      configurations for network slices on a given network element.  By
      manipulating these data nodes, a malicious attacker may cause
      unauthorized and improper behavior to be provided for the slice
      traffic on the network element.

   The readable data nodes in this YANG module may be considered
   sensitive or vulnerable in some network environments.  It is thus
   important to control read access (e.g., via get, get-config, or
   notification) to these data nodes.  These are the subtrees and data
   nodes and their sensitivity/vulnerability:

   *  "/network-slicing/network-slice-phbs": Unauthorized access to this
      subtree can disclose the network slice PHBs defined on the network
      element.

   *  "/network-slicing/network-slices": Unauthorized access to this
      subtree can disclose the network slice definitions on the network
      element.



Saad & Beeram              Expires May 6, 2021                 [Page 26]


Internet-Draft           NS PHD YANG Data Model            November 2020


7.  References

7.1.  Normative References

   [I-D.bestbar-teas-ns-packet]
              Saad, T. and V. Beeram, "Realizing Network Slices in IP/
              MPLS Networks", draft-bestbar-teas-ns-packet-00 (work in
              progress), October 2020.

   [I-D.nsdt-teas-ietf-network-slice-definition]
              Rokui, R., Homma, S., Makhijani, K., Contreras, L., and J.
              Tantsura, "Definition of IETF Network Slices", draft-nsdt-
              teas-ietf-network-slice-definition-00 (work in progress),
              October 2020.

   [I-D.nsdt-teas-ns-framework]
              Gray, E. and J. Drake, "Framework for Transport Network
              Slices", draft-nsdt-teas-ns-framework-04 (work in
              progress), July 2020.

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119,
              DOI 10.17487/RFC2119, March 1997,
              <https://www.rfc-editor.org/info/rfc2119>.

   [RFC3688]  Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
              DOI 10.17487/RFC3688, January 2004,
              <https://www.rfc-editor.org/info/rfc3688>.

   [RFC6020]  Bjorklund, M., Ed., "YANG - A Data Modeling Language for
              the Network Configuration Protocol (NETCONF)", RFC 6020,
              DOI 10.17487/RFC6020, October 2010,
              <https://www.rfc-editor.org/info/rfc6020>.

   [RFC6241]  Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
              and A. Bierman, Ed., "Network Configuration Protocol
              (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
              <https://www.rfc-editor.org/info/rfc6241>.

   [RFC6242]  Wasserman, M., "Using the NETCONF Protocol over Secure
              Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011,
              <https://www.rfc-editor.org/info/rfc6242>.

   [RFC7950]  Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language",
              RFC 7950, DOI 10.17487/RFC7950, August 2016,
              <https://www.rfc-editor.org/info/rfc7950>.





Saad & Beeram              Expires May 6, 2021                 [Page 27]


Internet-Draft           NS PHD YANG Data Model            November 2020


   [RFC8040]  Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF
              Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017,
              <https://www.rfc-editor.org/info/rfc8040>.

   [RFC8174]  Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
              2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
              May 2017, <https://www.rfc-editor.org/info/rfc8174>.

   [RFC8341]  Bierman, A. and M. Bjorklund, "Network Configuration
              Access Control Model", STD 91, RFC 8341,
              DOI 10.17487/RFC8341, March 2018,
              <https://www.rfc-editor.org/info/rfc8341>.

   [RFC8446]  Rescorla, E., "The Transport Layer Security (TLS) Protocol
              Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018,
              <https://www.rfc-editor.org/info/rfc8446>.

7.2.  Informative References

   [RFC8340]  Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams",
              BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018,
              <https://www.rfc-editor.org/info/rfc8340>.

Appendix A.  Complete Model Tree Structure

   module: ietf-network-slice-phd
     +--rw network-slicing!
        +--rw network-slice-phbs
        |  +--rw network-slice-phb* [id]
        |     +--rw id                                    uint16
        |     +--rw (profile-type)?
        |        +--:(profile)
        |        |  +--rw profile?                        string
        |        +--:(custom-profile)
        |           +--rw (guaranteed-rate-type)?
        |           |  +--:(rate)
        |           |  |  +--rw guaranteed-rate?          uint64
        |           |  +--:(percentage)
        |           |     +--rw guaranteed-rate-percent?
        |           |             rt-types:percentage
        |           +--rw (shaping-rate-type)?
        |           |  +--:(rate)
        |           |  |  +--rw shaping-rate?             uint64
        |           |  +--:(percentage)
        |           |     +--rw shaping-rate-percent?
        |           |             rt-types:percentage
        |           +--rw classes
        |              +--rw class* [class-id]



Saad & Beeram              Expires May 6, 2021                 [Page 28]


Internet-Draft           NS PHD YANG Data Model            November 2020


        |                 +--rw class-id
        |                 |       string
        |                 +--rw direction?
        |                 |       identityref
        |                 +--rw priority?
        |                 |       identityref
        |                 +--rw (guaranteed-rate-type)?
        |                 |  +--:(rate)
        |                 |  |  +--rw guaranteed-rate?
        |                 |  |          uint64
        |                 |  +--:(percentage)
        |                 |     +--rw guaranteed-rate-percent?
        |                 |             rt-types:percentage
        |                 +--rw drop-probability?
        |                 |       identityref
        |                 +--rw (maximum-bandwidth-type)?
        |                 |  +--:(rate)
        |                 |  |  +--rw maximum-bandwidth?
        |                 |  |          uint64
        |                 |  +--:(percentage)
        |                 |     +--rw maximum-bandwidth-percent?
        |                 |             rt-types:percentage
        |                 +--rw (delay-buffer-size-type)?
        |                    +--:(value)
        |                    |  +--rw delay-buffer-size?
        |                    |          uint64
        |                    +--:(percentage)
        |                       +--rw delay-buffer-size-percent?
        |                               rt-types:percentage
        +--rw network-slices
           +--rw network-slice* [name]
              +--rw name                          string
              +--rw id?                           uint32
              +--rw slice-resource-reservation
              |  +--rw preference?                        uint16
              |  +--rw (max-bw-type)?
              |  |  +--:(bw-value)
              |  |  |  +--rw maximum-bandwidth?           uint64
              |  |  +--:(bw-percentage)
              |  |     +--rw maximum-bandwidth-percent?
              |  |             rt-types:percentage
              |  +--rw shared-resource-groups*            uint32
              |  +--rw protection
              |     +--rw backup-slice-id?                  uint32
              |     +--rw (backup-bw-type)?
              |        +--:(backup-bw-value)
              |        |  +--rw backup-bandwidth?           uint64
              |        +--:(backup-bw-percentage)



Saad & Beeram              Expires May 6, 2021                 [Page 29]


Internet-Draft           NS PHD YANG Data Model            November 2020


              |           +--rw backup-bandwidth-percent?
              |                   rt-types:percentage
              +--rw slice-selectors
              |  +--rw slice-selector* [id]
              |     +--rw id         uint16
              |     +--rw mpls
              |     |  +--rw (ss-mpls-type)?
              |     |     +--:(label-value)
              |     |     |  +--rw label?
              |     |     |  |       rt-types:mpls-label
              |     |     |  +--rw label-position?          identityref
              |     |     |  +--rw label-position-offset?   uint8
              |     |     +--:(label-ranges)
              |     |        +--rw label-range* [index]
              |     |           +--rw index                    string
              |     |           +--rw start-label?
              |     |           |       rt-types:mpls-label
              |     |           +--rw end-label?
              |     |           |       rt-types:mpls-label
              |     |           +--rw label-position?
              |     |           |       identityref
              |     |           +--rw label-position-offset?   uint8
              |     +--rw ipv4
              |     |  +--rw destination-prefix*   inet:ipv4-prefix
              |     +--rw ipv6
              |     |  +--rw (ss-ipv6-type)?
              |     |     +--:(ipv6-destination)
              |     |     |  +--rw destination-prefix*
              |     |     |          inet:ipv6-prefix
              |     |     +--:(ipv6-flow-label)
              |     |        +--rw slid-flow-labels
              |     |           +--rw slid-flow-label* [slid]
              |     |              +--rw slid       inet:ipv6-flow-label
              |     |              +--rw bitmask?   uint32
              |     +--rw acl-ref*   ns-acl-ref
              +--rw slice-phb?                    ns-phb-ref
              +--rw slice-membership
                 +--rw filter-policies
                    +--rw filter-policy* [id]
                       +--rw id
                       |       uint16
                       +--rw (filter-type)?
                       |  +--:(topology-ref)
                       |  |  +--rw (topo-ref-type)?
                       |  |     +--:(algo-id)
                       |  |     |  +--rw algo-id?                  uint8
                       |  |     +--:(te-topo-id)
                       |  |        +--rw te-topology-identifier



Saad & Beeram              Expires May 6, 2021                 [Page 30]


Internet-Draft           NS PHD YANG Data Model            November 2020


                       |  |           +--rw provider-id?   te-global-id
                       |  |           +--rw client-id?     te-global-id
                       |  |           +--rw topology-id?
                       |  |                   te-topology-id
                       |  +--:(custom-topology)
                       |     +--rw include
                       |     |  +--rw link-affinity*   string
                       |     |  +--rw link-name*       string
                       |     |  +--rw node-prefix*     inet:ip-prefix
                       |     |  +--rw as*              inet:as-number
                       |     +--rw exclude
                       |        +--rw link-affinity*   string
                       |        +--rw link-name*       string
                       |        +--rw node-prefix*     inet:ip-prefix
                       |        +--rw as*              inet:as-number
                       +--rw slice-selector?
                       |       ns-ss-ref
                       +--rw slice-phb?
                               ns-phb-ref


Authors' Addresses

   Tarek Saad
   Juniper Networks

   Email: tsaad@juniper.net


   Vishnu Pavan Beeram
   Juniper Networks

   Email: vbeeram@juniper.net


















Saad & Beeram              Expires May 6, 2021                 [Page 31]