<?xml version="1.0" encoding="utf-8"?>
<?xml-model href="rfc7991bis.rnc"?>
<!DOCTYPE rfc [
  <!ENTITY nbsp "&#160;">
]>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="std" docName="draft-du-anima-srv6-failover-grasp-00" ipr="trust200902" submissionType="IETF" xml:lang="en" version="3">

  <front>
    <title abbrev="SRv6 Failover with GRASP">Autonomic SRv6 Network Fast Failover Using Bounce-back Strategy with GRASP</title>
    <seriesInfo name="Internet-Draft" value="draft-du-anima-srv6-failover-grasp-00"/>
    <author fullname="Lintong Du" initials="L." role="editor" surname="Du">
      <organization abbrev="BUPT">Beijing University of Posts and Telecommunications</organization>
      <address>
        <postal>
          <street>No.10 Xitucheng Road</street>
          <city>Beijing</city>
          <region>Hai-Dian District</region>
          <code>100876</code>
          <country>China</country>
        </postal>
        <email>baronmail@bupt.edu.cn</email>
      </address>
    </author>
    <author fullname="Xiangyang Gong" initials="X." surname="Gong">
      <organization abbrev="BUPT">Beijing University of Posts and Telecommunications</organization>
      <address>
        <postal>
          <street>No.10 Xitucheng Road</street>
          <city>Beijing</city>
          <region>Hai-Dian District</region>
          <code>100876</code>
          <country>China</country>
        </postal>
        <email>xygong@bupt.edu.cn</email>
      </address>
    </author>
    <author fullname="Xirong Que" initials="X." surname="Que">
      <organization abbrev="BUPT">Beijing University of Posts and Telecommunications</organization>
      <address>
        <postal>
          <street>No.10 Xitucheng Road</street>
          <city>Beijing</city>
          <region>Hai-Dian District</region>
          <code>100876</code>
          <country>China</country>
        </postal>
        <email>rongqx@bupt.edu.cn</email>
      </address>
    </author>
    <author fullname="Fang Deng" initials="F." surname="Deng">
      <organization abbrev="BUPT">Beijing University of Posts and Telecommunications</organization>
      <address>
        <postal>
          <street>No.10 Xitucheng Road</street>
          <city>Beijing</city>
          <region>Hai-Dian District</region>
          <code>100876</code>
          <country>China</country>
        </postal>
        <email>dengfang@bupt.edu.cn</email>
      </address>
    </author>
    <date year="2026" month="March" day="1"/>
    <area>Operations and Management</area>
    <workgroup>ANIMA</workgroup>
    <keyword>SRv6</keyword>
    <keyword>GRASP</keyword>
    <keyword>Failover</keyword>
    <abstract>
      <t>This document specifies an autonomic fast failover mechanism for SRv6 networks using a bounce-back strategy. It uses GRASP to distribute failover protection information, enabling data plane fast reroute without control plane reconvergence.</t>
    </abstract>
  </front>

  <middle>
    <section anchor="introduction">
      <name>Introduction</name>
      <t>Segment Routing over IPv6 (SRv6) <xref target="RFC8986"/> provides a flexible source routing paradigm that enables explicit path specification for traffic engineering and service chaining. This flexibility, however, comes with a trade-off: when any node or link along an explicitly specified SRv6 path fails, the entire path is disrupted. Traditional recovery mechanisms rely on control plane reconvergence, which typically takes seconds to complete.</t>
      <t>Existing fast protection mechanisms such as Topology-Independent Loop-Free Alternate (TI-LFA) provide local protection for IGP segments. However, as noted in <xref target="RFC9256"/> Section 9, TI-LFA has inherent limitations:</t>
      <ul>
        <li>SR Policies built with non-protected Adjacency SIDs do not benefit from any local protection.</li>
        <li>Links that span multiple IGP domains cannot benefit from TI-LFA automated local protection.</li>
      </ul>
      <t>This document introduces a bounce-back strategy to address these gaps. The strategy provides dual protection across the time dimension:</t>
      <ul>
        <li>For in-flight packets at the moment of failure, the Bouncer node bounces them back to the nearest upstream Anchor node, which re-encapsulates the traffic with a pre-computed backup SRv6 segment list.</li>
        <li>For new packets arriving after failure detection, the Anchor node directly encapsulates them onto the backup path.</li>
      </ul>
      <t>The mechanism uses GRASP <xref target="RFC8990"/> to autonomically distribute failover protection information during path setup. The ACP <xref target="RFC8994"/> and BRSKI <xref target="RFC8995"/> provide the security foundation.</t>
      <section anchor="requirements-language">
        <name>Requirements Language</name>
        <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 BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they appear in all capitals, as shown here.</t>
      </section>
    </section>

    <section anchor="terminology">
      <name>Terminology and Abbreviations</name>
      <t>This document uses the terminology defined in <xref target="RFC7575"/> and <xref target="RFC8986"/>.</t>
      <dl newline="true">
        <dt>Anchor Node:</dt>
        <dd>A node on the primary path that has a pre-computed backup path to reach the destination. When receiving bounced-back traffic, it re-encapsulates with the backup SRv6 segment list.</dd>
        <dt>Bouncer Node:</dt>
        <dd>A node on the primary path that does NOT have a backup path. It can only bounce traffic upstream when detecting a downstream failure.</dd>
        <dt>Bounce-back:</dt>
        <dd>The action of forwarding traffic toward the upstream direction when a downstream link failure is detected.</dd>
        <dt>FPM ASA:</dt>
        <dd>Failover Path Manager Autonomic Service Agent. Manages the computation, distribution, and installation of failover protection information using GRASP.</dd>
        <dt>Flow Identifier:</dt>
        <dd>A value used to uniquely identify a communication flow. This document uses the IPv6 Flow Label field for this purpose.</dd>
        <dt>Primary Path:</dt>
        <dd>The main forwarding path computed for normal traffic transmission.</dd>
        <dt>Backup Path:</dt>
        <dd>A pre-computed alternative path used when the primary path fails.</dd>
        <dt>Cascading Bounce-back:</dt>
        <dd>When a failure occurs, traffic bounces upstream through one or more Bouncer nodes until reaching an Anchor node that can reroute traffic via a backup path.</dd>
        <dt>Path Initiator:</dt>
        <dd>The entity responsible for computing paths and distributing protection information via GRASP. Typically the Ingress Edge Node or a centralized controller.</dd>
        <dt>Path Responder:</dt>
        <dd>A node on the primary path that receives protection information from the Path Initiator via GRASP.</dd>
      </dl>
    </section>

    <section anchor="mechanism-overview">
      <name>Failover Mechanism Overview</name>
      <t>The bounce-back failover mechanism operates in two distinct phases: control plane setup using GRASP, and data plane failover execution.</t>
      <section anchor="cp-dp-separation">
        <name>Control Plane and Data Plane Separation</name>
        <ul>
          <li>Control Plane: Distributes failover protection information during path setup. GRASP is NOT involved in failure detection or failover execution.</li>
          <li>Data Plane: Performs failure detection, executes bounce-back action, and performs backup path re-encapsulation. All failover decisions are made locally based on pre-installed forwarding state.</li>
        </ul>
      </section>
      <section anchor="node-roles">
        <name>Node Roles and Backup Path Requirements</name>
        <t>Each node on the primary path is assigned one of two roles:</t>
        <section anchor="anchor-definition">
          <name>Anchor Node Definition</name>
          <t>An Anchor Node (role=0) has a valid backup path and can re-encapsulate traffic. When receiving bounced-back traffic, it MUST strip the original SRv6 encapsulation, re-encapsulate with its pre-installed backup segment list, and forward toward the backup path next-hop.</t>
        </section>
        <section anchor="bouncer-definition">
          <name>Bouncer Node Definition</name>
          <t>A Bouncer Node (role=1) does NOT have a valid backup path. When detecting downstream failure or receiving bounced-back traffic, it MUST forward upstream without modification.</t>
        </section>
        <section anchor="backup-requirements">
          <name>Backup Path Requirements</name>
          <t>A valid backup path MUST satisfy: Reachability, Disjointness (MUST NOT traverse any primary path link between Anchor and destination), First-hop Difference, and SRv6 Expressibility.</t>
          <figure anchor="fig-backup-path">
            <name>Topology with Node Roles and Backup Paths</name>
            <artwork type="ascii-art"><![CDATA[
                    +----+     +----+     +----+
                    | b1 |-----| b2 |-----| b3 |
                    +----+     +----+     +----+
                /                                    \
+----+     +----+     +----+     +----+     +----+     +----+
| h1 |-----| n1 |-----| n2 |-----| n3 |-----| n4 |-----| h2 |
+----+     +----+     +----+     +----+     +----+     +----+
           Anchor     Anchor     Bouncer    Bouncer
                          \                          /
                                +----+     +----+       
                                | b4 |-----| b5 |
                                +----+     +----+

Primary Path: h1 -> n1 -> n2 -> n3 -> n4 -> h2

Node Roles:
  n1: Anchor (backup: n1 -> b1 -> b2 -> b3 -> h2)
  n2: Anchor (backup: n2 -> b4 -> b5 -> h2)
  n3: Bouncer (no backup path)
  n4: Bouncer (no backup path)

Backup Path Validity:
  A valid backup MUST NOT traverse any primary path link
  downstream of the Anchor. For n2: backup via b4 -> b5 -> h2
  is valid (avoids n2-n3, n3-n4, n4-h2 links)
            ]]></artwork>
          </figure>
        </section>
      </section>
      <section anchor="before-failure">
        <name>Before Failure: Protection Information Distribution</name>
        <t>Before failure, protection information must be distributed to all path nodes via GRASP, including node role, upstream/downstream neighbor addresses, flow identifier, and backup segment list (for Anchors).</t>
      </section>
      <section anchor="failure-detection">
        <name>Failure Detection</name>
        <t>Failure detection is performed locally using link-layer detection, BFD, or hardware port monitoring. To achieve sub-50ms failover, hardware-assisted detection SHOULD be used.</t>
      </section>
      <section anchor="after-failure">
        <name>After Failure: Bounce-back and Re-encapsulation</name>
        <t>When failure occurs: (1) Node detects downstream interface failure, (2) Immediately redirects traffic upstream, (3) Upstream nodes identify bounced traffic by arrival interface and flow-id, (4) Bouncer forwards upstream; Anchor re-encapsulates and forwards on backup path.</t>
      </section>
    </section>

    <section anchor="grasp-objective">
      <name>GRASP Objective for Failover Path Management</name>
      <section anchor="fpm-objective">
        <name>Failover Path Manager Objective</name>
        <t>The objective name is "SRv6-Failover" conforming to <xref target="RFC8990"/>. Format in CDDL <xref target="RFC8610"/>:</t>
        <figure anchor="fig-grasp-objective">
          <name>GRASP Objective Format</name>
          <sourcecode type="cddl"><![CDATA[
objective = ["SRv6-Failover", objective-flags, loop-count, ?objective-value]
objective-name = "SRv6-Failover"
objective-flags = uint .bits objective-flag
loop-count = 0..255
objective-value = srv6-failover-value
          ]]></sourcecode>
        </figure>
      </section>
      <section anchor="objective-value">
        <name>Objective Value Definition</name>
        <figure anchor="fig-flow-path-info">
          <name>Flow and Path Information Structure</name>
          <sourcecode type="cddl"><![CDATA[
srv6-failover-value = [flow-info, primary-path-info, *node-protection-info]

flow-info = [flow-id, source-address, destination-address, lifetime]
flow-id = uint
source-address = bytes .size 16
destination-address = bytes .size 16
lifetime = uint

primary-path-info = [primary-segment-list, *anchor-backup-entry]
primary-segment-list = [*srv6-sid]
srv6-sid = bytes .size 16
anchor-backup-entry = [anchor-address, backup-segment-list]

node-protection-info = [node-address, node-role, upstream-neighbor, downstream-neighbor, ?backup-info]
node-role = &(anchor: 0, bouncer: 1)
backup-info = [backup-segment-list, backup-next-hop]
          ]]></sourcecode>
        </figure>
      </section>
      <section anchor="objective-example">
        <name>Objective Example</name>
        <t>For the following topology and primary path:</t>
        <figure anchor="fig-example-topology">
          <name>Example Topology</name>
          <artwork type="ascii-art"><![CDATA[
                    +----+     +----+     +----+
                    | b1 |-----| b2 |-----| b3 |
                    +----+     +----+     +----+
                /                                    \
+----+     +----+     +----+     +----+     +----+     +----+
| h1 |-----| n1 |-----| n2 |-----| n3 |-----| n4 |-----| h2 |
+----+     +----+     +----+     +----+     +----+     +----+
           Anchor     Anchor     Bouncer    Bouncer
                          \                          /
                                +----+     +----+       
                                | b4 |-----| b5 |
                                +----+     +----+

Primary Path: h1 -> n1 -> n2 -> n3 -> n4 -> h2
Flow Identifier: 0x0000a
          ]]></artwork>
        </figure>
        <t>The GRASP objective value would contain:</t>
        <figure anchor="fig-objective-example">
          <name>Objective Value Example</name>
          <sourcecode type="cddl"><![CDATA[
srv6-failover-value = [
  ; flow-info
  [0x0000a, h1-address, h2-address, 3600000],

  ; primary-path-info
  [
    [n1-sid, n2-sid, n3-sid, n4-sid, h2-sid],  ; primary segment list
    [n1-address, [b1-sid, b2-sid, b3-sid, h2-sid]],  ; n1's backup
    [n2-address, [b4-sid, b5-sid, h2-sid]]           ; n2's backup
  ],

  ; node-protection-info for n1 (Anchor)
  [n1-address, 0, h1-address, n2-address,
   [[b1-sid, b2-sid, b3-sid, h2-sid], b1-address]],

  ; node-protection-info for n2 (Anchor)
  [n2-address, 0, n1-address, n3-address,
   [[b4-sid, b5-sid, h2-sid], b4-address]],

  ; node-protection-info for n3 (Bouncer)
  [n3-address, 1, n2-address, n4-address],

  ; node-protection-info for n4 (Bouncer)
  [n4-address, 1, n3-address, h2-address]
]
          ]]></sourcecode>
        </figure>
      </section>
    </section>

    <section anchor="procedures-scenarios">
      <name>Failover Procedures and Scenarios</name>
      <section anchor="grasp-procedures">
        <name>GRASP Procedures</name>
        <t>The FPM ASA on the Path Initiator discovers path nodes via GRASP Discovery, then sends Request messages with node-protection-info. Path Responders resolve addresses, install forwarding state, and respond with Negotiation End (ACCEPT).</t>
        <figure anchor="fig-grasp-negotiation">
          <name>GRASP Negotiation Procedure</name>
          <artwork type="ascii-art"><![CDATA[
+------------------+                      +------------------+
|     FPM ASA      |                      |     FPM ASA      |
|  Path Initiator  |                      |  Path Responder  |
+--------+---------+                      +--------+---------+
         |                                         |
         |    M_DISCOVERY (SRv6-Failover)          |
         |---------------------------------------->|
         |                                         |
         |    M_RESPONSE (locator)                 |
         |<----------------------------------------|
         |                                         |
         |    M_REQ_NEG (node-protection-info)     |
         |---------------------------------------->|
         |                                         |
         |    M_END (O_ACCEPT)                     |
         |<----------------------------------------|
         |                                         |
            ]]></artwork>
        </figure>
      </section>
      <section anchor="forwarding-behavior">
        <name>Forwarding Behavior Requirements</name>
        <t>Nodes MUST distinguish Normal Traffic (from upstream) and Bounced Traffic (from downstream) based on arrival interface and flow identifier. Anchor nodes re-encapsulate; Bouncer nodes forward upstream.</t>
      </section>
      <section anchor="intra-domain">
        <name>Intra-domain Scenario</name>
        <section anchor="intra-topology">
          <name>Topology and Configuration</name>
          <figure anchor="fig-intra-domain">
            <name>Intra-domain Topology and Configuration</name>
            <artwork type="ascii-art"><![CDATA[
                    +----+     +----+     +----+
                    | b1 |-----| b2 |-----| b3 |
                    +----+     +----+     +----+
                /                                    \
+----+     +----+     +----+     +----+     +----+     +----+
| h1 |-----| n1 |-----| n2 |-----| n3 |-----| n4 |-----| h2 |
+----+     +----+     +----+     +----+     +----+     +----+
           Anchor     Anchor     Bouncer    Bouncer
                          \                          /
                                +----+     +----+       
                                | b4 |-----| b5 |
                                +----+     +----+

Primary Path: h1 -> n1 -> n2 -> n3 -> n4 -> h2
Flow Identifier: 0x0000a

Protection Configuration:
  n1: Anchor, upstream=h1, downstream=n2
      backup=[b1-sid, b2-sid, b3-sid, h2-sid], next-hop=b1
  n2: Anchor, upstream=n1, downstream=n3
      backup=[b4-sid, b5-sid, h2-sid], next-hop=b4
  n3: Bouncer, upstream=n2, downstream=n4
  n4: Bouncer, upstream=n3, downstream=h2
            ]]></artwork>
          </figure>
        </section>
        <section anchor="intra-failover">
          <name>Failover Execution Example</name>
          <t>When the n3-n4 link fails:</t>
          <ol>
            <li>n3 detects the interface toward n4 is down.</li>
            <li>n3 (Bouncer) bounces in-flight traffic toward n2.</li>
            <li>n2 receives traffic from n3 direction with flow-id=0x0000a, identifies it as bounced traffic.</li>
            <li>n2 (Anchor) re-encapsulates traffic with backup segment list [b4-sid, b5-sid, h2-sid] and forwards toward b4.</li>
            <li>Traffic reaches h2 via the backup path n2 -> b4 -> b5 -> h2.</li>
          </ol>
          <t>If b4-b5 link also fails, n2 bounces traffic to n1, which re-encapsulates via its backup path n1 -> b1 -> b2 -> b3 -> h2 (cascading bounce-back).</t>
        </section>
      </section>
      <section anchor="inter-domain">
        <name>Inter-domain Scenario</name>
        <t>Flow identifier is preserved across domain boundaries. Each domain computes its own node roles for its portion of the path.</t>
      </section>
    </section>

    <section anchor="implementation">
      <name>Implementation Considerations</name>
      <t>OpenFlow implementations MAY use: in_port, eth_type, ipv6_dst, ipv6_label match fields; fast-failover groups with watch_port.</t>
      <t>P4 implementations MAY use: ingress metadata, tables keyed by (ingress_port, flow_label, ipv6_dst), link status registers.</t>
      <t>To achieve sub-50ms failover: use hardware-based detection, implement bounce-back in hardware, pre-install forwarding state.</t>
    </section>

    <section anchor="Security">
      <name>Security Considerations</name>
      <t>This mechanism inherits security considerations of <xref target="RFC8990"/> and <xref target="RFC8986"/>.</t>
      <ul>
        <li>Authentication: All FPM ASA communication MUST occur over ACP <xref target="RFC8994"/>. Nodes MUST be authenticated via BRSKI <xref target="RFC8995"/>.</li>
        <li>Authorization: Only authorized nodes SHOULD initiate or modify failover protection state.</li>
        <li>Integrity: GRASP messages MUST be integrity-protected.</li>
        <li>Flow Identifier Security: Ingress filtering SHOULD prevent flow identifier spoofing.</li>
        <li>Resource Exhaustion: Rate limiting of GRASP requests SHOULD be implemented.</li>
      </ul>
    </section>

    <section anchor="IANA">
      <name>IANA Considerations</name>
      <section anchor="iana-objective">
        <name>GRASP Objective Name</name>
        <t>IANA is requested to add "SRv6-Failover" to the "GRASP Objective Names" registry. Reference: [this document]</t>
      </section>
      <section anchor="iana-role">
        <name>Node Role Registry</name>
        <t>IANA is requested to create "SRv6-Failover Node Role" registry with initial values:</t>
        <ul>
          <li>0: Anchor - A node with a pre-computed backup path</li>
          <li>1: Bouncer - A node that can only bounce traffic upstream</li>
        </ul>
        <t>Values 2-255 are reserved. New values require Standards Action.</t>
      </section>
    </section>
  </middle>

  <back>
    <references><name>References</name>
      <references><name>Normative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8610.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8986.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8990.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8994.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8995.xml"/>
      </references>
      <references><name>Informative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7575.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9256.xml"/>
      </references>
    </references>
    <section anchor="appendix-cddl">
      <name>Complete CDDL Definition</name>
      <t>This appendix provides the complete CDDL definition for the SRv6-Failover GRASP objective:</t>
      <figure anchor="fig-complete-cddl">
        <name>Complete CDDL Definition</name>
        <sourcecode type="cddl"><![CDATA[
; SRv6-Failover GRASP Objective CDDL Definition

srv6-failover-objective = [
  "SRv6-Failover",
  objective-flags,
  loop-count,
  ?srv6-failover-value
]

objective-flags = uint
loop-count = 0..255

srv6-failover-value = [
  flow-info,
  primary-path-info,
  *node-protection-info
]

flow-info = [
  flow-id: uint,
  source-address: ipv6-address,
  destination-address: ipv6-address,
  lifetime: uint
]

ipv6-address = bytes .size 16

primary-path-info = [
  primary-segment-list: [*srv6-sid],
  *anchor-backup-entry
]

srv6-sid = bytes .size 16

anchor-backup-entry = [
  anchor-address: ipv6-address,
  backup-segment-list: [*srv6-sid]
]

node-protection-info = [
  node-address: ipv6-address,
  node-role: 0..1,
  upstream-neighbor: ipv6-address,
  downstream-neighbor: ipv6-address,
  ?backup-info
]

backup-info = [
  backup-segment-list: [*srv6-sid],
  backup-next-hop: ipv6-address
]
        ]]></sourcecode>
      </figure>
    </section>

    <section anchor="Acknowledgements" numbered="false">
      <name>Acknowledgements</name>
      <t>The authors thank the contributors of the ANIMA working group for their valuable feedback on autonomic networking mechanisms.</t>
    </section>
  </back>
</rfc>
