<?xml version="1.0" encoding="US-ASCII"?>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc2629 version 1.2.6 -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc sortrefs="yes"?>
<?rfc symrefs="yes"?>
<?rfc comments="yes"?>
<rfc category="std" docName="draft-dong-idr-sr-policy-nrp-00"
     ipr="trust200902">
  <front>
    <title abbrev="BGP SR Policy for NRP">BGP SR Policy Extensions for Network
    Resource Partition</title>

    <author fullname="Jie Dong" initials="J." surname="Dong">
      <organization>Huawei Technologies</organization>

      <address>
        <email>jie.dong@huawei.com</email>
      </address>
    </author>

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

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

    <author fullname="Ran Pang" initials="R." surname="Pang">
      <organization>China Unicom</organization>

      <address>
        <email>pangran@chinaunicom.cn</email>
      </address>
    </author>

    <date day="4" month="March" year="2022"/>

    <workgroup>IDR Working Group</workgroup>

    <abstract>
      <t>Segment Routing (SR) Policy is a set of candidate paths, each
      consisting of one or more segment lists and the associated information.
      The header of a packet steered in an SR Policy is augmented with an
      ordered list of segments associated with that SR Policy. A Network
      Resource Partition (NRP) is a set of network resources allocated in the
      network which can be used to instantiate a virtual transport network
      (VTN) for one or a group service traffic. In scenarios where multiple
      Network Resource Partitions (NRPs) exist in the network, the NRP in
      which an SR policy is instantiated may also need to be specified, so
      that the header of the packet can be augmented with the information
      associated with the NRP. An SR Policy candidate path can be distributed
      using BGP SR Policy. This document defines extensions to BGP SR policy
      to specify the NRP in which the SR policy is instantiated.</t>
    </abstract>
  </front>

  <middle>
    <section anchor="introduction" title="Introduction">
      <t>The concept of Segment Routing (SR) policy is defined in <xref
      target="I-D.ietf-spring-segment-routing-policy"/>. An SR Policy is a set
      of candidate paths, each consisting of one or more segment lists. The
      head end of an SR Policy may learn multiple candidate paths for an SR
      Policy. The header of a packet steered in an SR Policy is augmented with
      an ordered list of segments associated with that SR Policy. The BGP
      extensions to distribute SR Policy candidate paths is defined in <xref
      target="I-D.ietf-idr-segment-routing-te-policy"/>.</t>

      <t>The concept of Virtual Transport Network (VTN) is introduced in <xref
      target="I-D.ietf-teas-enhanced-vpn"/>. A VTN is a virtual underlay
      network which has customized network topology and a set of dedicated or
      shared network resources. In a network, multiple VTNs may be created to
      meet different service requirements, and services can be mapped to the
      same or different VTNs. <xref
      target="I-D.ietf-teas-ietf-network-slices"/> introduces the concept
      Network Resource Partition (NRP) as a set of network resources that are
      available to carry traffic and meet the SLOs and SLEs. In the context of
      network slicing, an NRP can be used to instantiate a VTN for one or a
      group of IETF network slice services. As described in <xref
      target="I-D.dong-teas-nrp-scalability"/>, one scalable data plane
      approach is to carry a global NRP ID in the data packet to identify the
      NRP the packet belongs to, so that the packet can be processed and
      forwarded using the network resources allocated to the NRP.</t>

      <t>In networks where multiple NRPs exist, the identifier of NRP in which
      the SR policy is instantiated need to be specified, so that at the
      ingress node of SR policy, the header of data packet can also be
      augmented with the identifier of the NRP. This document defines the BGP
      extensions to specify the NRP ID associated with a candidate path of SR
      policy.</t>
    </section>

    <section anchor="specification-of-requirements"
             title="Specification of Requirements">
      <t>The key words &ldquo;MUST&rdquo;, &ldquo;MUST NOT&rdquo;,
      &ldquo;REQUIRED&rdquo;, &ldquo;SHALL&rdquo;, &ldquo;SHALL NOT&rdquo;,
      &ldquo;SHOULD&rdquo;, &ldquo;SHOULD NOT&rdquo;,
      &ldquo;RECOMMENDED&rdquo;, &ldquo;MAY&rdquo;, and &ldquo;OPTIONAL&rdquo;
      in this document are to be interpreted as described in RFC 2119 <xref
      target="RFC2119"/>.</t>
    </section>

    <section title="NRP Identifier of SR Policy">
      <t>In order to specify the NRP the candidate path of SR policy is
      associated with, a new sub-TLV called "NRP sub-TLV" is defined in the
      BGP Tunnel Encapsulation Attribute <xref target="RFC9012"/>. The NRP
      sub-TLV can be carried in the BGP Tunnel Encapsulation Attribute with
      the tunnel type set to SR Policy.</t>

      <t>The NRP sub-TLV is optional and MUST NOT appear more than once for
      one SR Policy candidate path. If the NRP sub-TLV appears more than once,
      the associated BGP SR Policy NLRI is considered malformed and the
      "treat-as-withdraw" strategy of <xref target="RFC7606"/> is applied.</t>

      <t>The NRP sub-TLV has the following format:</t>

      <t><figure>
          <artwork><![CDATA[    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |   Length      |     Flags     |   RESERVED    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         NRP ID (4 octets)                     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                      Figure 1. NRP Sub-TLV]]></artwork>
        </figure></t>

      <t>where:</t>

      <t><list style="symbols">
          <t>Type: 123</t>

          <t>Length: 6</t>

          <t>Flags: 1-octet flag field. None is defined at this stage. The
          flags SHOULD be set to zero on transmission and MUST be ignored on
          receipt.</t>

          <t>RESERVED: 1 octet of reserved bits. It SHOULD be set to zero on
          transmission and MUST be ignored on receipt.</t>

          <t>NRP ID: A 32-bit global significant identifier which is used to
          identify a NRP. Value 0 and 0xFFFFFFFF are reserved.</t>
        </list>The encoding structure of BGP SR Policy with the NRP sub-TLV is
      expressed as below:</t>

      <figure>
        <artwork><![CDATA[         SR Policy SAFI NLRI: <Distinguisher, Policy-Color, Endpoint>
         Attributes:
            Tunnel Encaps Attribute (23)
               Tunnel Type: SR Policy
                   Binding SID
                   Preference
                   Priority
                   Policy Name
                   Explicit NULL Label Policy (ENLP)
                   NRP
                   Segment List
                       Weight
                       Segment
                       Segment
                       ...
                   ...]]></artwork>
      </figure>

      <t/>
    </section>

    <section title="Procedures">
      <t>When a candidate path of SR policy is instantiated with a specific
      NRP, the originating node of SR policy SHOULD include the NRP ID in the
      BGP Tunnel Encapsulation Attribute of the BGP SR policy. The setting of
      other fields and attributes in BGP SR policy SHOULD follows the
      mechanism as defined in <xref
      target="I-D.ietf-idr-segment-routing-te-policy"/>.</t>

      <t>When a BGP speaker receives an SR Policy which is acceptable and
      usable according to the rules as defined in <xref
      target="I-D.ietf-idr-segment-routing-te-policy"/>, and the SR Policy
      candidate path selected as the best candidate path is associated with an
      NRP, the receiver node of the SR policy SHOULD encapsulate the NRP ID in
      the header of packets steered to the SR Policy. For SR Policy with IPv6
      data plane, the approach is to encapsulate the NRP ID in IPv6 Hop-by-Hop
      extension header using the mechanism as defined in <xref
      target="I-D.dong-6man-enhanced-vpn-vtn-id"/>. For SR Policy with MPLS
      data plane, one possible mechanism to encapsulate the NRP ID to the
      packet is defined in <xref
      target="I-D.li-mpls-enhanced-vpn-vtn-id"/>.</t>

      <t>Although the proposed mechanism allows that different candidate paths
      in one SR policy be associated with different NRPs, in normal network
      scenarios it is considered that the association between an SR Policy and
      NRP is consistent, in such case all candidate paths of one SR policy
      SHOULD be associated with the same NRP.</t>
    </section>

    <section anchor="security-considerations" title="Security Considerations">
      <t>The security considerations of BGP and BGP SR policy apply to this
      document.</t>
    </section>

    <section anchor="iana-considerations" title="IANA Considerations">
      <t>IANA has assigned the sub-TLV type as defined in Section 3 from "BGP
      Tunnel Encapsulation Attribute sub-TLVs" registry.</t>

      <t><figure>
          <artwork align="center"><![CDATA[      Value     Description                     Reference
      ----------------------------------------------------
       123        NRP                         This document
]]></artwork>
        </figure></t>
    </section>

    <section anchor="acknowledgments" title="Acknowledgments">
      <t>The authors would like to thank Guoqi Xu, Lei Bao and Haibo Wang for
      the review and discussion of this document.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <reference anchor="RFC2119"
                 target="https://www.rfc-editor.org/info/rfc2119">
        <front>
          <title>Key words for use in RFCs to Indicate Requirement
          Levels</title>

          <author fullname="S. Bradner" initials="S." surname="Bradner">
            <organization/>
          </author>

          <date month="March" year="1997"/>

          <abstract>
            <t>In many standards track documents several words are used to
            signify the requirements in the specification. These words are
            often capitalized. This document defines these words as they
            should be interpreted in IETF documents. This document specifies
            an Internet Best Current Practices for the Internet Community, and
            requests discussion and suggestions for improvements.</t>
          </abstract>
        </front>

        <seriesInfo name="BCP" value="14"/>

        <seriesInfo name="RFC" value="2119"/>

        <seriesInfo name="DOI" value="10.17487/RFC2119"/>
      </reference>

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

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

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

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

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

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

      <?rfc include='reference.I-D.dong-teas-nrp-scalability'?>
    </references>

    <references title="Informative References">
      <?rfc include='reference.I-D.dong-6man-enhanced-vpn-vtn-id'?>

      <?rfc include='reference.I-D.li-mpls-enhanced-vpn-vtn-id'?>
    </references>
  </back>

  <!---->
</rfc>
