<?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-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="5" month="September" year="2023"/>

    <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 IETF
      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-segment-routing-te-policy"/>.</t>

      <t><xref target="I-D.ietf-teas-ietf-network-slices"/> introduces the
      concept and the characteristics of IETF network slice, and describes a
      general framework for IETF 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.
      IETF 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 (VPN+) services based on VPN and Traffic
      Engineering (TE) technologies. Enhanced VPN (VPN+) can be used for the
      realization of IETF 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. 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.</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 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</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 domain significant identifier which is used to
          identify an 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 (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 with a specific
      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-segment-routing-te-policy"/>.</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-segment-routing-te-policy"/>. 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 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 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 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 <xref target="RFC4271"/> and BGP
      SR policy <xref target="I-D.ietf-idr-segment-routing-te-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 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 and
      Shunwan Zhuang 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.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'?>
    </references>

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

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

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

  <!---->
</rfc>
