<?xml version="1.0" encoding="US-ASCII"?>
<!-- edited with XMLSPY v5 rel. 3 U (http://www.xmlspy.com)
     by Daniel M Kohn (private) -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY rfc2119 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
]>
<?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-deng-rtgwg-srv6-te-endpoint-protection-00"
     ipr="trust200902">
  <front>
    <title abbrev="draft-deng-rtgwg-srv6-te-endpoint-protection">SRv6 TE
    Endpoint Protection</title>

    <author fullname="Lijie Deng" initials="L" surname="Deng">
      <organization>China Telecom</organization>

      <address>
        <postal>
          <street>109, West Zhongshan Road, Tianhe District</street>

          <city>Guangzhou</city>

          <region>Guangzhou</region>

          <code>510000</code>

          <country>China</country>
        </postal>

        <email>denglj4@chinatelecom.cn</email>
      </address>
    </author>

    <author fullname="Yongqing Zhu" initials="Y" surname="Zhu">
      <organization>China Telecom</organization>

      <address>
        <postal>
          <street>109, West Zhongshan Road, Tianhe District</street>

          <city>Guangzhou</city>

          <region>Guangzhou</region>

          <code>510000</code>

          <country>China</country>
        </postal>

        <email>zhuyq8@chinatelecom.cn</email>
      </address>
    </author>

    <date day="7" month="July" year="2025"/>

    <area>RTG Area</area>

    <workgroup>Routing Area Working Group</workgroup>

    <keyword>RFC</keyword>

    <abstract>
      <t>SRv6 TE achieves precise traffic engineering by strictly defining the
      traffic path (e.g., specifying particular nodes or links) through a
      predefined SID list. To address the failure of TI-LFA FRR protection in
      SRv6 TE Policy scenarios due to strict node constraints, this paper
      proposes an SRv6 designated Midpoint protection.</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t/>

      <t>In SRv6 Best Effort (BE) forwarding, all nodes in the network rely on
      the same Link-State Database (LSDB) and use the Shortest Path First
      (SPF) algorithm to compute optimal routes, adhering to IGP shortest-path
      forwarding. When a link or node fails, traffic is switched to a backup
      path based on the IGP topology convergence. However, there may be
      prolonged packet loss and degraded service quality when IGP route
      convergence typically takes a long time in large-scale topologies. To
      achieve fast reroute (FRR) for SRv6 BE, a loop-free backup path must be
      pre-established in the forwarding plane.</t>

      <t>The specific implementation for SRv6 BE link/node failure protection
      involves deploying TI-LFA (Topology-Independent Loop-Free Alternate),
      which enables the source node to specify an explicit path that bypasses
      the failed link and provide a local repair mechanism for IGP-based
      shortest paths. This ensures end-to-end traffic recovery in the event of
      direct link or neighbor failures. TI-LFA does not depend on network
      topology and provides a loop-free backup path. It calculates the FRR
      backup path based on the post-failure converged topology, ensuring
      alignment between the FRR backup path and the final post-convergence
      reroute path. This avoids secondary path switching. Specifically, TI-LFA
      excludes the failed node or link when computing the FRR path and then
      derives the backup path.</t>

      <t>The current local repair mechanism, e.g., TI-LFA, allows the upstream
      neighbor of the failed node or link to fast re-route traffic around the
      failure. This mechanism does not work properly for SRv6 TE path after
      the failure happens in an endpoint node and IGP converges on the
      failure. This document defines midpoint protection for SRv6 TE path,
      which enables the upstream endpoint node of the failed node to perform
      the endpoint behavior for the faulty node and fast re-route traffic
      around the failure after IGP converges on the failure.</t>
    </section>

    <section title="Conventions used in this document">
      <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"/>
      .</t>
    </section>

    <section title="Mechanism">
      <t/>

      <t>Midpoint protection (Endpoint node) refers to the node where the SID
      specified in the Segment List. SRv6 Policy explicitly steers packets
      along a predetermined path by encapsulating a sequence of SRv6 SIDs in
      the Segment Routing Header (SRH). SRv6 Policy does not necessarily
      follow SPF shortest-path forwarding, and the IPv6 destination address is
      not the final packet destination. Therefore, the conventional SRv6 BE
      FRR which computes backup next hops based on destination addresses and
      SPF paths&mdash;cannot be applied in SRv6 Policy. When a link/node
      specified in the SRv6 Policy fails, traffic must bypass the faulty
      link/node via a pre-established loop-free backup path to ensure failure
      protection. The designated node failure protection scheme is uniformly
      applied in such cases.</t>

      <t>The upstream node (Point of Local Repair, PLR) of the failed Endpoint
      node takes over the forwarding process. Normally, an Endpoint node
      processes SRv6 packets by: Decrementing the Segment Left (SL) and
      copying the next-layer SID to the IPv6 destination address field.
      However, if an Endpoint node fails, it cannot execute these SID
      processing actions, resulting in packet loss. Thus, when an Endpoint
      node fails, packets should bypass it, and the PLR must forward them
      directly to the next Endpoint node. When the PLR egress interface
      detects a failure, it executes the following protection process:</t>

      <t>a) When the PLR&rsquo;s FIB contains a route to the failed Endpoint:
      If the PLR is not directly connected to the failed Endpoint node,
      standard TI-LFA is executed. If the PLR is directly connected, it
      bypasses the failed Endpoint node by rewriting the IPv6 destination
      address to the next Endpoint node&rsquo;s address in the SRH, preventing
      traffic from being forwarded to the faulty node.</t>

      <t>b) When the PLR&rsquo;s FIB lacks a route to the failed Endpoint:
      Bypass the faulty Endpoint and directly forward the data packet to the
      next endpoint node. If PLR detects that the next-hop interface has
      failed, when the next hop matches the packet&rsquo;s destination address
      and SL &gt; 0, the PLR proxies the Endpoint behavior: it decrements SL,
      updates the outer IPv6 header&rsquo;s destination address with the next
      SID, and forwards the packet according to the new SID&rsquo;s
      instructions, thereby bypassing the failed node and achieving SRv6
      Endpoint node protection.</t>
    </section>

    <section title="Example ">
      <t/>

      <t>As shown in Figure 1:</t>

      <t>a) Node A forwards a packet to destination Node F, specifying
      intermediate Node E in the SRH.</t>

      <t>b) When Node E fails, Node B (PLR) detects the next-hop interface
      failure. Since the next hop matches the current destination address 5::
      and SL &gt; 0, Node B performs proxy forwarding: Decrements SL and
      copies the next SID 6:: to the outer IPv6 destination field. If the
      segment has the Penultimate Segment Pop (PSP) attribute, node B removes
      the SRH and forwards based on 6::.</t>

      <t>c) Since the primary next hop for 6:: is still Node E&mdash;but Node
      B is not the penultimate hop for this destination and SL = 0&mdash;Node
      B no longer qualifies for proxy forwarding. Instead, it follows the
      standard TI-LFA process, switching to a backup path. The repair segment
      list is encapsulated via "H.Insert" (e.g., adding SID 3::1), and a new
      SRH is appended before forwarding to Node F via the backup path.</t>

      <t>d) After Node A detects Node E&rsquo;s failure and IGP convergence
      completes, Node A removes the routing entry for 5::. Thus, when Node A
      attempts to forward based on 5::, it misses the route and acts as the
      PLR: - Decrements SL. Updates the outer IPv6 destination address to 6::.
      Forwards to Node B based on 6::.</t>

      <t>If Node B has converged, it forwards the packet to Node F via the new
      shortest path. If not, Node B follows TI-LFA and forwards via the backup
      path. To support SRv6 Endpoint failure protection, the SRv6 SID
      forwarding pseudocode must include additional logic to guide PLR actions
      during Endpoint failures.</t>

      <figure>
        <artwork align="center"><![CDATA[
 +-----------------------------------------------------------------------+
 |                                                          x  failure   |
 |           IPv6 DA=5::         IPv6 DA=3::1                            |   
 |           SRH(SL=1)           SRH(SL=1)                               |
 |           (6::,5::)           (6::,3::1)                              |
 |           Payload             Payload                                 |
        1::              2::                  3::                        |
 |   +-------+         +-------+  COST=10   +-------+                    |
 |   |   A   |---------|   B   |------------|   C   |  End.X=3::1        |
 |   +-------+         +-------+            +-------+                    |
 |                         |                    |                        |
 |                 COST=10 |                    |  cost=1000             |
 |                         |         End.X=3::1 |                        |
 |                     +---X---+            +-------+        +-------+   |                  
 |                     |   E   |------------|   D   |--------|   F   |   |
 |                     +-------+   COST=10  +-------+        +-------+   |
 |                         5::                  4::                6::   |
 |                                                                       |
 +-----------------------------------------------------------------------+
Figure 1: SRv6 Endpoint protection
]]></artwork>
      </figure>
    </section>

    <section title="Security Considerations">
      <t>The behavior described in this document is internal functionality to
      a router that result in the ability to explicitly steer traffic over the
      post convergence path after a remote topology change in a manner that
      guarantees loop freeness. Because the behavior serves to minimize the
      disruption associated with a topology changes, it can be seen as a
      modest security enhancement.</t>
    </section>

    <section title="IANA Considerations">
      <t>No requirements for IANA.</t>
    </section>

    <section title="Acknowledgement">
      <t>The authors would like to thank everyone who contributed to the
      draft.</t>
    </section>
  </middle>

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

      <?rfc ?>
    </references>
  </back>
</rfc>
