<?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-ietf-idr-sr-policy-nrp-03"
     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="3" month="March" year="2025"/>

    <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 subset of network resources allocated in
      the underlay network which can be used to support one or a group of RFC
      9543 network slice services.</t>

      <t>In networks where there are multiple NRPs, an SR Policy may be
      associated with a particular NRP. The association between SR Policy and
      NRP needs to be specified, so that for service traffic which is steered
      into the SR Policy, the header of the packets 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 the extensions to
      BGP SR policy to specify the NRP which the SR Policy candidate path is
      associated with.</t>
    </abstract>
  </front>

  <middle>
    <section anchor="introduction" title="Introduction">
      <t>The concept of Segment Routing (SR) policy is defined in <xref
      target="RFC9256"/>. 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-sr-policy-safi"/>.</t>

      <t><xref target="RFC9543"/> introduces the concept and the
      characteristics of RFC 9543 network slice, and describes a general
      framework for RFC 9543 network slice management and operation. It also
      introduces the concept Network Resource Partition (NRP), which is a
      subset of the resources and associated policies in the underlay network.
      RFC 9543 network slice can be realized by mapping one or more
      connectivity constructs to an NRP. <xref
      target="I-D.ietf-teas-enhanced-vpn"/> describes the framework and the
      candidate component technologies for providing enhanced VPN services
      based on VPN and Traffic Engineering (TE) technologies. Enhanced VPN
      (VPN+) can be used for the realization of RFC 9543 network slices. In
      the context of network slicing, an NRP is considered as an instantiation
      of the VTN as defined in <xref
      target="I-D.ietf-teas-enhanced-vpn"/>.</t>

      <t>As described in <xref target="I-D.ietf-teas-nrp-scalability"/>, one
      scalable data plane approach to support network slicing is to carry a
      dedicated 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
      subset of network resources allocated to the NRP.</t>

      <t>In networks where there are multiple NRPs, an SR Policy may be
      associated with a particular NRP. The association between SR Policy and
      NRP needs to be specified, so that for service traffic which is steered
      into the SR Policy, the header of the packets can be augmented with the
      information associated with the NRP. The association between SR Policy
      and NRP is described in <xref target="I-D.jiang-spring-sr-policy-nrp"/>.
      An SR Policy candidate path can be distributed using BGP SR Policy. This
      document defines the extensions to BGP SR policy to specify the NRP
      which the SR Policy candidate path is associated with.</t>

      <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
        BCP14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only
        when, they appear in all capitals, as shown here.</t>
      </section>
    </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. The use of the NRP sub-TLV in other
      tunnel types is outside the scope of this document.</t>

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

      <t><figure>
          <artwork align="center"><![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 (assigned by IANA)</t>

          <t>Length: 6 octets.</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 domain significant identifier which is used to
          identify an NRP. The values of 0 and 0xFFFFFFFF are reserved.</t>
        </list></t>

      <t>The validation of an SR Policy NLRI with the NRP Sub-TLV in the BGP
      tunnel encapsulation attribute <xref target="RFC9012"/> follows the
      procedures in section 4.2 of <xref
      target="I-D.ietf-idr-sr-policy-safi"/>, augmented by the validation
      procedures described in this document.</t>

      <t>When the NRP sub-TLV is carried in the BGP Tunnel Encapsulation
      Attribute of an SR Policy NLRI, a segment list of the candidate path is
      considered invalid if the headend node of the SR Policy determines that
      the set of network resources corresponding to the NRP ID on network
      segments identified by the segment list do not exist. The detailed
      mechanisms for NRP resource validation are out of the scope of this
      document. </t>

      <t>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 (15)
                   Binding SID
                   SRv6 Binding SID
                   Preference
                   Priority
                   Policy Name
                   Policy Candidate Path Name
                   Explicit NULL Label Policy (ENLP)
                   NRP
                   Segment List
                       Weight
                       Segment
                       Segment
                       ...
                   ...
             Figure 2. SR Policy Encoding with NRP sub-TLV]]></artwork>
      </figure>

      <t/>
    </section>

    <section title="Procedures">
      <t>When a candidate path of SR Policy is instantiated within an NRP, and
      a network-wide data plane NRP Selector ID is used for identifying the
      resources of the NRP, the originating node of SR Policy SHOULD include
      the NRP sub-TLV in the BGP Tunnel Encapsulation Attribute of the BGP SR
      Policy. The setting of other fields and attributes in BGP SR Policy
      SHOULD follow the mechanism as defined in <xref
      target="I-D.ietf-idr-sr-policy-safi"/>.</t>

      <t>On reception of an SR Policy NLRI, a BGP speaker determines if it is
      acceptable and usable according to the rules defined in Section 4.2 of
      <xref target="I-D.ietf-idr-sr-policy-safi"/> and section 2 of this
      document. If the SR Policy candidate path selected as the best candidate
      path is associated with an NRP, the headend node of the SR Policy SHOULD
      encapsulate the NRP ID as the NRP Selector ID and the segment list of
      the selected candidate path in the header of packets which are steered
      to the SR Policy. For SR Policy with IPv6 data plane, the approach to
      encapsulate the NRP Selector ID in IPv6 Hop-by-Hop Options header is
      defined in <xref target="I-D.ietf-6man-enhanced-vpn-vtn-id"/>. For SR
      Policy with MPLS data plane, one approach to encapsulate the NRP
      Selector ID to the packet is based on the mechanism defined in <xref
      target="I-D.ietf-mpls-mna-fwk"/>.</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 title="Error Handling">
      <t>The error handling of the BGP Update messages for BGP SR Policy SAFI
      with the NRP extensions defined in this document follows the procedures
      in section 5 of <xref target="I-D.ietf-idr-sr-policy-safi"/>. </t>

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

    <section title="Scalability Considerations">
      <t>The mechanism specified in this document adds additional information
      to the SR Policy candidate paths. In order to steer traffic into
      different NRPs using SR Policy, the SR Policies used for different NRPs
      need to be different. As the number of NRP increases, the number of SR
      Policies would also increase accordingly. When BGP is used for
      distributing SR Policy candidate paths, the amount of control plane
      information exchanged between the network controller and the headend
      nodes would also increase. However, since the SR Policies candidate
      paths distributed in BGP are only installed by the corresponding headend
      nodes, the impacts to the BGP control plane are considered
      acceptable.</t>
    </section>

    <section anchor="security-considerations" title="Security Considerations">
      <t>The security considerations of BGP <xref target="RFC4271"/> and BGP
      SR policy <xref target="I-D.ietf-idr-sr-policy-safi"/> apply to this
      document.</t>

      <t>The NRP sub-TLV provides the NRP identifier that may be carried in
      IPv6 Hop-by-Hop options header or used in the encapsulation of MPLS.
      This NRP identifier can impact packet forwarding in a network so care
      should be taken to protect this mission-critical or commercially
      sensitive information during provisioning, query and report of the
      NRP-ID in BGP.</t>
    </section>

    <section anchor="iana-considerations" title="IANA Considerations">
      <t>IANA has assigned the sub-TLV type as defined in Section 2 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, Haibo Wang,
      Shunwan Zhuang and Susan Hares for their 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.8174'?>

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

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

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

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

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

      <?rfc include='reference.I-D.ietf-idr-sr-policy-safi'?>

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

    <references title="Informative References">
      <?rfc include='reference.I-D.ietf-teas-nrp-scalability'?>

      <?rfc include='reference.I-D.jiang-spring-sr-policy-nrp'?>

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

      <?rfc include='reference.I-D.ietf-mpls-mna-fwk'?>
    </references>
  </back>

  <!---->
</rfc>
