<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" docName="draft-zhang-sr-policy-enhanced-detnet-01"
     ipr="trust200902">
  <front>
    <title abbrev="Abbreviated-Title">SR Policy for enhanced DetNet</title>

    <author fullname="Li Zhang" initials="L." surname="Zhang">
      <organization>Huawei</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>

          <country/>
        </postal>

        <phone/>

        <facsimile/>

        <email>zhangli344@huawei.com</email>

        <uri/>
      </address>
    </author>

    <author fullname="Xuesong Geng" initials="X." surname="Geng">
      <organization>Huawei</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>

          <country/>
        </postal>

        <phone/>

        <facsimile/>

        <email>gengxuesong@huawei.com</email>

        <uri/>
      </address>
    </author>

    <author fullname="Zhenbin Li" initials="Z." surname="Li">
      <organization>Huawei</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>

          <country/>
        </postal>

        <phone/>

        <facsimile/>

        <email>lizhenbin@huawei.com</email>

        <uri/>
      </address>
    </author>

    <date day="13" month="March" year="2023"/>

    <abstract>
      <t>SR Policy is a set of candidate SR paths consisting of one or more
      segment lists and necessary path attributes. It enables instantiation of
      an ordered list of segments with a specific intent for traffic steering.
      DetNet provides the capability to carry specified unicast or multicast
      data flows with extremely low data loss rates and bounded end-to-end
      latency within a network domain. This document defines the SR policy
      enhancement to carry the Bounded Latency Information with a candidate
      path of SR policy. So that BLI behavior can be enabled automatically
      when the SR Policy is applied.</t>
    </abstract>

    <note title="Requirements Language">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
      document are to be interpreted as described in <xref
      target="RFC2119">RFC 2119</xref>.</t>
    </note>
  </front>

  <middle>
    <section title="Introduction">
      <t>Segment Routing Policy is defined in<xref
      target="I-D.ietf-spring-segment-routing-policy"> </xref>. A SR Policy is
      a set of candidate path which consist of one or more segment lists. The
      headend node instructs the source routing and writes it into package.
      The packets steered into an SR Policy have an ordered list of segments
      associated with that SR Policy written into them.<xref target="RFC8655">
      </xref> provides the overall architecture for Deterministic Networking
      (DetNet), which provides the capability to carry specified unicast or
      multicast data flows with extremely low data loss rates and bounded
      end-to-end latency within a network domain. Based on this,<xref
      target="I-D.ietf-detnet-bounded-latency"/> proposed a timing model for
      sources, destinations, and DetNet transit nodes. Using the model, it
      provides a methodology to compute end-to-end latency and backlog bounds
      for various queuing methods.<xref
      target="I-D.yzz-detnet-enhanced-data-plane"/> enhances the DetNet data
      plane by introducing Bounded Latency Information (BLI) which facilitates
      DetNet transit nodes to guarantee the bounded latency transmission in
      data plane. Based on that,<xref
      target="I-D.geng-spring-sr-enhanced-detnet"/> defines how to leverage
      Segment Routing (SR) and Segment Routing over IPv6 (SRv6) to implement
      bounded latency. For An automatic network, the SR Policy with Bounded
      Latency Information can facilitate the bounded latency transmission and
      enable the automation of SR service.</t>

      <t>This document defines the SR policy enhancement to carry the Bounded
      Latency Information with a candidate path of SR policy. So that BLI
      behavior can be enabled automatically when the SR Policy is applied.</t>
    </section>

    <section title="Terminology and Conventions">
      <t/>

      <section title="Requirement 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<xref
        target="RFC2119"/>.</t>
      </section>

      <section title="Terminology">
        <t>The abbreviations used in this document are:</t>

        <t>BLI: Bounded Latency Information</t>

        <t>SR: Segment Routing</t>

        <t>SID: Segment Identifier</t>
      </section>
    </section>

    <section title="BLI Encoding in SR Policy">
      <t>The BLI is proposed by<xref
      target="I-D.yzz-detnet-enhanced-data-plane"/> to facilitate DetNet
      transit nodes to guarantee the bounded latency transmission in data
      plane. In order to specify the bounded latency features that the
      candidate path is associated with, this document defines two types of
      new sub-TLV in the BGP Tunnel Encapsulation Attribute for SR Policy<xref
      target="I-D.ietf-spring-segment-routing-policy"/> for different
      scenarios.</t>

      <section title="BLI List Sub-TLV">
        <t>When all of the nodes/adjacencies in the explicit path indicated by
        the segment list request different BLI to guarantee bounded latency, a
        BLI list sub-TLV is defined.</t>

        <t>The BLI list sub-TLV is formatted as follows.</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            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        BLI List [m]                           |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             ...                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        BLI List [1]                           |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
          </figure>Where:</t>

        <t>Type: to be assigned by IANA.</t>

        <t>Length: 16 bits length value to indicate the length of BLI list in
        octet.</t>

        <t>BLI List [1&hellip; m]: 64 bits length BLI structure, representing
        the nth BLI in the BLI list.</t>

        <t>The BLI in the BLI List corresponds to the Segment in the Segment
        List one by one. The length of the BLI List depends on the num of
        Segment in the Segment List.</t>

        <t>The encoding structure of BGP SR Policy with the BLI list sub-TLV
        is expressed as below:</t>

        <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)
                      Segment List
                          BLI List
                          Weight
                          Segment
                          Segment
                          ...
                          ...
]]></artwork>
          </figure></t>
      </section>

      <section title="Shared BLI sub-TLV">
        <t>When all of the nodes/adjacencies in the explicit path indicated by
        the segment list request BLI to guarantee bounded latency with the
        same BLI value, the Shared BLI sub-TLV is defined.</t>

        <t>The Shared BLI sub-TLV is defined as follows:</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 (TBD2)          |           Length              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            BLI                                |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
          </figure>Where:</t>

        <t>Type: to be assigned by IANA.</t>

        <t>Length: 16 bits value indicate the length of BLI.</t>

        <t>BLI: 64 bits value of Bounded Latency Information to guarantee the
        bounded latency, the format of it is defined in section 3.1.</t>

        <t>The encoding structure of BGP SR Policy with the Per-segment BLI
        sub-TLV is expressed as below:</t>

        <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)
                      Segment List
                          Shared BLI
                          Weight
                          Segment
                          Segment
                          ...
                          ...
]]></artwork>
          </figure></t>
      </section>
    </section>

    <section title="Procedures">
      <t>When a candidate path of SR Policy is a bounded-latency routing path,
      the originating node of SR policy MUST include the associated bounded
      latency information in the BGP Tunnel Encapsulation Attribute of the BGP
      SR Policy. The 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 a bounded-latency
      path, the receiver node of the SR Policy MUST encapsulate the specific
      bounded latency information to the header of packets steered to the SR
      Policy. For SR Policy with IPv6 data plane and MPLS data plane, the
      possible approach is to encapsulate the BLI to the packet using the
      mechanism defined in<xref target="I-D.yzz-detnet-enhanced-data-plane"/>
      and<xref target="I-D.geng-spring-sr-enhanced-detnet"/>.</t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>IANA is requested to make the assignment from the "BGP Tunnel
      Encapsulation Attribute sub-TLVs" registry as follows.</t>

      <t><figure>
          <artwork><![CDATA[+-----------------+---------------------------------+----------------+  
|       Value     |               Name              |     Reference  |
+-----------------+---------------------------------+----------------+
|       TBD1      |        BLI List sub-TLV         | This document  |
+-----------------+---------------------------------+----------------+
|       TBD2      |       Shared BLI sub-TLV        | This document  |
+-----------------+---------------------------------+----------------+
]]></artwork>
        </figure></t>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>TBD</t>
    </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t/>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119"?>

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

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

      <?rfc include='reference.I-D.ietf-detnet-bounded-latency'?>

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

      <?rfc include='reference.I-D.yzz-detnet-enhanced-data-plane'?>

      <?rfc include='reference.I-D.geng-spring-sr-enhanced-detnet'?>
    </references>
  </back>
</rfc>
