<?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-ietf-spring-sr-redundancy-protection-10"
     ipr="trust200902">
  <front>
    <title abbrev="SRv6 for Redundancy Protection">SRv6 for Redundancy
    Protection</title>

    <author fullname="Xuesong Geng" initials="X." surname="Geng">
      <organization>Huawei Technologies</organization>
 
      <address>
        <postal>
          <street/>

          <city/>

          <code/>

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

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

    <author fullname="Mach(Guoyi) Chen" initials="M." surname="Chen">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <code/>

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

        <email>mach.chen@outlook.com</email>
      </address>
    </author>

    <author fullname="Pablo Camarillo Garvia" initials="P."
            surname="Camarillo">
      <organization>Cisco Systems</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>

          <country>Spain</country>
        </postal>

        <email>pcamaril@cisco.com</email>
      </address>
    </author>

    <author fullname="Gyan Mishra" initials="G." surname="Mishra">
      <organization>Verizon Inc.</organization>

      <address>
        <postal>
          <street/>
 
         <country>US</country>
 
        </postal>

        <email>gyan.s.mishra@verizon.com</email>
      </address>
    </author>

    <author fullname="Balazs Varga" initials="B." surname="Varga" role="editor">
      <organization>Ericsson</organization>

      <address>
        <postal>
          <street/>

          <country>Hungary</country>
        </postal>

        <email>balazs.a.varga@ericsson.com</email>
      </address>
    </author>

<!--    <author fullname="Ferenc Fejes" initials="F." surname="Fejes">
      <organization>Ericsson</organization>

      <address>
        <postal>
          <street/>

          <country/>
        </postal>

        <email>ferenc.fejes@ericsson.com</email>
      </address>
    </author>
-->

    <date />

    <workgroup>SPRING Working Group</workgroup>

    <abstract>
      <t>Redundancy Protection is a generalized protection mechanism to
      achieve high reliability for services provided in Segment Routing
      networks. The mechanism uses the "Live-Live" methodology, i.e., 
	  multiple copies of the data packets are sent on different paths 
	  to provide protection. This
      document introduces one new SRv6 Segment Endpoint Behavior, the 
	  associated Headend Encapsulation Behaviors and the associated Redundancy Policy
	  to provide replication and elimination functions on specific 
	  network nodes by leveraging SRv6 Network Programming capabilities.</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>Redundancy Protection is a generalized protection mechanism to
      achieve high reliability for services provided in a Segment Routing
      (SR) network. Specifically, packets of flows are replicated at a 
	  replication network node into two or more copies, which are transported 
	  via different protection paths in parallel. 
	  At the elimination network node, the multiple copies are received, 
      redundant packets are eliminated, and only a single copy of the packet is 
	  forwarded. </t>
	  
	  <t>This mechanism is commonly referred to as "Live-Live" as data traffic is 
	  forwarded on the protection paths simultaneously and therefore it provides a 
	  packet-level protection. In case of redundancy protection, there is no need to perform 
	  switchover between primary and backup paths as data packets are sent simultaneously 
	  on multiple protection paths. Connectivity is provided until at least one protection path 
	  remains operational. </t>

	  <t>One new SRv6 Segment Endpoint Behavior, the associated Headend Encapsulation Behaviors
	  and the associated Redundancy Policy are introduced to support the 
	  redundancy protection functions (i.e., replication, and elimination) on
      specific network nodes by leveraging SRv6 Network Programming capabilities. </t>

      <t>Depending on the service-level objective and network characteristics
	  (including topology, shared-risk link groups, link and node
	  availability, and bit-error rate), redundancy protection can be used
	  alone or together with other protection mechanisms, such as
	  topology-independent loop-free alternate fast reroute (TI-LFA)
	  <xref target="RFC9855"/>. Local fast reroute is optional; it does not replace packet
	  replication and elimination, nor is it necessary for the End.R packet
	  format to operate. Additional fast reroute may protect individual
	  member paths, but its interaction with the replicated traffic and the
	  resulting resource costs require deployment-specific evaluation.
	  The detailed path-computation algorithm is outside the scope of this
	  document. Section 7.3 provides general engineering guidance on the
	  placement of replication and elimination nodes, path and
	  failure-domain diversity, differential delay, and resource sizing.
	  These are deployment considerations, not new requirements on the SRv6
	  endpoint behavior.
 </t>
	  
      <t>Redundancy protection provides ultra-reliable protection to many
      services, for example DetNet flows, Cloud VR/Game, IPTV service and other types of
      video service, high-value private-line services. <!-- In this document,
      redundancy protection is applied to point-to-point services. The
      mechanism for point-to-multipoint services is out of the scope of
      this document. ***To be discussed*** as new version supports p2mp scenarios as well. --> </t>
    </section>

    <section title="Terminology ">
      <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 BCP
        14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only
        when, they appear in all capitals, as shown here.</t>
      </section>

      <section title="Terminology and Conventions ">
        <t>SR: Segment Routing</t>

        <t>SRv6: Segment Routing over IPv6</t>

        <t>SID: Segment Identifier</t>

        <t>RSID: Redundancy SID</t>

        <t>R-node: An SRv6 node configured with an RSID and flow-specific
		redundancy processing. An R-node can perform replication,
		elimination, or both, including different actions on different flows
		or ordered actions on the same flow.</t>

        <t>Replication node: R-node doing replication. A network element that replicates 
		incoming packets for parallel delivery.</t>

        <t>Elimination node: R-node doing elimination. A network element that eliminates 
		duplicates to forward a single copy.</t>

        <t>Redundancy Policy: A policy associated with an RSID, that contains entries 
		for redundancy protected flows and how these flows are served by local redundancy 
		functions.</t>

        <t>RedInst: A redundancy instance that provides a configured sequence of
		flow-specific replication and/or elimination actions and maintains
		the associated per-flow state at an R-node.</t>

        <t>FID: Flow Identifier</t>

        <t>SeqNum: Sequence Number</t>
		
		<t>Member flow: One part of the protected flow between the R-nodes.</t>
      </section>
    </section>

    <section title="Redundancy Protection in Segment Routing Scenario">

      <section title="Redundancy Node Concept">
      <t>Redundancy nodes (R-nodes) are interconnected by SRv6 tunnels used to encapsulate 
	  the protected flow. Flow-specific redundancy actions on a redundancy node
	  are triggered by the Redundancy SID (RSID) and the actions are defined by 
	  the Redundancy Policy. The Redundancy Policy contains entries for each flow
	  for which the R-node provides redundancy protection. The replicated 
	  flow parts between the R-nodes are referred to as member flows. </t>  
	  
	  <t>A receiving R-node selects a configured policy entry using its local
	  RSID and the FID carried in the RSID argument. Each entry identifies
	  the RedInst and its ordered action pipeline. An R-node can perform
	  elimination and subsequent replication for the same protected flow;
	  the configured pipeline determines the order of those actions. </t>
	  
	   <t>There are two basic types of redundancy actions applied on the protected 
	   flow: (1) replication, and (2) elimination. A flow has one or more actions
	   defined in its Redundancy Policy entry. The actions are executed by the flow 
	   related redundancy instance (RedInst), that maintains flow-specific state 
	   (e.g., action type, action order, 
	   ingress/egress member flow-specific parameters, identifiers). </t>
      </section> <!-- Redundancy Node Concept -->

      <section title="RSID and Metadata to Support Redundancy Protection">
      <t>To support the redundancy protection function, flow identifier (FID)
      and sequence number (SeqNum) information are added to the member flow packets 
	  in the RSID as arguments. They are used at downstream R-nodes when their 
	  redundancy actions are executed: </t>

	  <t><!-- For redundancy protection processing, two arguments are needed: -->
		 <list style="numbers">
          <t>Flow Identifier (FID): defines which flow the packet belongs to. It is 
		  used to determine via the Redundancy Policy which redundancy instance (RedInst) 
		  has to be used on a node. </t>
		  <t>Sequence Number (SeqNum): defines the sequencing information, it is created 
		  at the first redundancy node, and used by the replication and elimination 
		  functionalities. </t>
         </list>
      </t>

	  <t>FID identifies one specific member flow on an R-node and has 
	  local significance. The FID value is allocated by the receiving R-node, therefore 
	  an upstream R-node must place the downstream R-node's FID in the RSID.
	  Allocation methods and signalling of FID values are
	  outside the scope of this document. They can be allocated for example, by a 
	  centralized controller or can be allocated and advertised by the R-node. 
	  BGP, PCEP or NETCONF protocols can facilitate the advertisement and distribution 
	  of flow identification information among controllers and R-nodes. FID MUST be 
	  included in the RSID as an argument.</t>
	  
	  <t>The allocation scope of an FID is the receiving (R-node, RSID) pair,
	  not the complete SR domain. Within that scope, the provisioning
	  system MUST prevent the same FID from identifying two unrelated
	  original flows or two distinct sequence-number spaces. Two ingress
	  member flows may be intentionally associated with the same RedInst
	  for duplicate elimination, but their mappings MUST refer to the same
	  original flow and sequence-number space. If multiple controllers or
	  local administrators can provision the same scope, they MUST use a
	  coordinated allocation and conflict-detection mechanism. A
	  conflicting, ambiguous, or unauthorized mapping MUST be rejected
	  rather than installed or used for elimination. The choice of
	  allocation or signaling protocol remains outside this document. </t>

	  <t>The same original packet can be represented by different FIDs on
	  different member paths and at different R-nodes. A receiving R-node
	  maps the ingress (RSID, FID) to one RedInst; the configured
	  associations, rather than equal FID values, establish that copies
	  belong to the same original flow. </t>
	  
	  <t>The local FID identifies an ingress member flow, and the Redundancy Policy points
	  to the related serving RedInst. Member flows of an original flow may have different FIDs 
	  at different R-nodes. In case of elimination there are multiple incoming FIDs for the 
	  member flows <!-- of the served original flow --> and they are associated with the same 
	  elimination instance (RedInst). </t>

	  <t>SeqNum distinguishes the packets within a flow by specifying the order of
      packets. All replicas of an original packet carry the same SeqNum. 
	  Unlike the FID, which remains constant for all packets in a given member 
	  flow, the SeqNum changes with each packet. SeqNum MUST be included in the RSID 
	  as an argument.</t>

	  <t>The SeqNum is an unsigned value and the SeqNum space is a circular one with 
	  no restriction on the initial value. The SeqNum MUST be incremented by one for each 
	  new packet of the original flow. The values can wrap, and it is important to note 
	  that zero (0) is a valid SeqNum value. For example, when the SeqNum size is 16 bits,
	  the sequence will contain: 65535, 0, 1, where zero (0) is an ordinary sequence number.
	  The SeqNum length MUST be provisioned on a per original flow basis via configuration
	  in the Redundancy Policy, and MUST be consistent on all related R-nodes. 	  
	  SeqNum is generated at the first R-node along the path and subsequent R-nodes preserve
	  the original SeqNum.</t>
	  
     <t> The packet replication and duplicate elimination algorithms,
	 including history-window choice and reordering policy, are local
	 implementation choices. This does not remove the requirement for
	 consistent FID-to-RedInst mapping, identical sequence-number length,
	 and common sequence-number space for the protected flow.  </t>

     <t>
     The exact format of Redundancy SID (RSID) is network addressing design 
	 specific. Redundancy-specific parameters are encoded as follows:
	 <list style="symbols">
         <t>LOC: specifies the R-node (same allocation rule 
		 applies as for any SRv6-enabled node).</t>
         <t>FUNC: a single value represents the redundancy function of an R-node. </t>
         <t>ARG: contains the FID and the SeqNum parameters. </t>
     </list>
     </t>
	 
	 <t>The standard interoperable FID width defined by this document is 20
	 bits. Implementations of End.R and H.Encaps.R MUST support a 20-bit
	 FID, and 20 bits is the default for the Redundancy Policy. The
	 supported SeqNum lengths are 16 and 28 bits; implementations MUST
	 support both and the default is 16 bits. A SeqNum length of zero is
	 not defined by this SRv6 mechanism. </t>
	 
	 <t>The 128-bit RSID comprises LOC, FUNC, and ARG, in that order, as in
	 <xref target="RFC8986"/>. The sizes of LOC and FUNC are defined by the operator's
	 SRv6 addressing plan. Within ARG, the most-significant 20 bits
	 contain the unsigned FID, followed immediately by an unsigned SeqNum
	 of the configured width (16 or 28 bits); any remaining
	 least-significant ARG bits MUST be zero. Bit 0 is the
	 most-significant bit of the complete 128-bit IPv6 Destination
	 Address. The operator MUST allocate an ARG long enough for all
	 configured fields: at least 36 bits for 16-bit SeqNum, or 48 bits for
	 28-bit SeqNum. </t>  
     <t> </t>  
	 
     <t>Figure 1 shows an example of the RSID with a 20-bit FID and 16-bit SeqNum in 
	 the argument. </t>

    <figure title="Redundancy SID example - LOC(64b)+FUNC(16b)+ARG(FID(20b)+SeqNum(16b)+Padding(12b))" anchor="fig_detnet_sid">
    <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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
+-                         LOC (64 bits)                       -+
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          FUNC (16 bits)       |         FID (20 bits)         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  FID  |       SeqNum (16 bits)        |0 0 0 0 0 0 0 0 0 0 0 0|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

]]>
    </artwork></figure>

	 <t>Configuration of an RSID with insufficient ARG bits, unsupported
	 field lengths, incompatible SeqNum lengths across members of a RedInst,
	 nonzero configured padding, or conflicting FID mappings MUST be
	 rejected. Packets carrying an unknown FID, inconsistent padding, or
	 an RSID that cannot be processed according to the active
	 configuration MUST be discarded and counted as specified in Section
	 4.3. A wrong SeqNum length on the wire cannot always be detected:
	 because there is no length discriminator, a misconfigured packet
	 might appear to contain a different valid number. Such
	 inconsistencies MUST therefore be prevented during provisioning and
	 checked across all participating R-nodes. </t>  

     <t>
	 For example, if a network uses /80 for LOC+FUNC, then the remaining 48 bits
	 are enough to carry a 20-bit FID and a maximum-size SeqNum field (28-bit) 
	 defined for DetNet flows in <xref target="RFC8964"/>.
     </t>  
     <t>
     FID value 0 is allocatable under the same uniqueness rules as every
	 other FID, and SeqNum value 0 is an ordinary sequence value with no
	 special initialization or reset semantics. Therefore, ARG=0 is valid
	 for an appropriately provisioned FID=0, SeqNum=0 mapping; it does not
	 mean that the argument is absent.	 
     </t>  
     <t>
     Note.: Encoding the FID and SeqNum as arguments of the SID implies 
     that when the RSID is in the IPv6 DA, the DA changes on a per-packet basis 
	 for the redundancy protected flow, and it may alter the ECMP hashing. 
	 This can be avoided for example, by using additional node-specific SIDs 
	 before the RSID (e.g., End).
     </t>
    </section> <!-- RSID and Meta Data to Support Redundancy Protection -->

    <section title="Redundancy Policy">
      <t>Each locally instantiated RSID MUST be associated with one Redundancy
	  Policy containing zero or more per-member-flow entries. Each active
	  entry is selected by the locally scoped FID and MUST identify the
	  RedInst, its ordered replication and/or elimination actions, the
	  common SeqNum length, and the incoming and outgoing member-flow
	  associations. An RSID with no active matching policy entry does not
	  authorize redundancy processing. Policy entries can map multiple
	  incoming FIDs to the same RedInst when those members belong to the
	  same original protected flow. </t>  

      <t>The minimum per-entry information comprises: (1) ingress member-flow
	  FID and association to the protected original flow; (2) RedInst
	  identifier, ordered actions, algorithm parameters, sequence-number
	  length and state capacity; and (3) for each egress member flow, the
	  downstream RSID and downstream-allocated FID, and the flow specific 
	  segment list or path-selection reference. </t>  

      <t>The first R-node additionally requires classification information for
	  the original ingress flow; the last R-node additionally requires the
	  ordinary forwarding context (for example, the VRF or VSI). </t>  

      <t>DetNet service functions and sub-layers are described in <xref target="RFC8655"/>.
	  For DetNet/IP traffic, the original ingress flow can be classified
	  using the flow-identification fields and procedures in <xref target="RFC8939"/>,
	  principally the IP six-tuple with optional IPv6 Flow Label matching.
	  These ingress classification fields are separate from the locally
	  significant FID in the RSID ARG. The outer IPv6 Flow Label is not the
	  RSID FID and this document does not redefine the <xref target="RFC8939"/> DetNet/IP
	  data-plane flow identification rules. The proposed SRv6 redundancy
	  mechanism can also protect non-DetNet flows. Its use in the DetNet
	  service sub-layer is described in <xref target="I-D.ietf-detnet-srv6-svc-protection"/>; 
	  this document alone does not establish interoperability with every 
	  DetNet data-plane mechanism. </t>  

      <t>A Redundancy Policy is a separate per-flow processing and 
	  replication/elimination construct, not an extension to the 
	  SR Policy candidate-path or weighted-ECMP forwarding semantics 
	  described in <xref target="RFC9256"/>. An R-node first creates one
	  copy for each configured egress member flow and then steers each copy
	  over its corresponding path, optionally using a distinct SR Policy as
	  described in <xref target="RFC9256"/>. Multiple segment lists within one 
	  active candidate path <xref target="RFC9256"/> are normally used for weighted load balancing;
	  they MUST NOT be interpreted as an instruction to replicate every
	  packet onto every segment list. Each referenced SR Policy <xref target="RFC9256"/>
	  follows its own candidate-path selection, validity, and eligibility
	  rules; this document does not change those rules. </t>  

      <t>For a service requesting two or more redundant copies, the
	  provisioning entity MUST configure the required number of egress
	  member-flow copies with viable paths before declaring the protection
	  objective satisfied. A failure may reduce the number of active paths;
	  if fewer copies remain than the configured objective, the R-node or
	  management system MUST report degraded protection rather than
	  silently claiming full redundancy. The particular path-computation
	  algorithm, choice of link/node/SRLG disjointness, and use of SR
	  Policy candidate-path extensions are outside this specification;
	  general design guidance is given in Section 7.3. </t>  

    </section> <!-- Redundancy Policy -->


      <section title="Example of a Redundancy Protection Scenario">
      <t>Figure 2 shows an example of redundancy protection used in an SRv6
      domain. </t>
      <t>
	  
   <figure title="Simple Example Topology for Redundancy Protection" anchor="ref-simple">
          <artwork align="center"><![CDATA[
           |                                              |
           |<--------------- SRv6 Domain ---------------->|
           |                                              |
           |                    +-----+                   |
           |              +-----+  R3 +-----+             |
           |              |     +-----+     |             |
        +-----+        +--+--+           +--+--+       +-----+ 
 -------+  R1 +--------+ Rep |           | Elm +-------+  R2 +-------
        +-----+        +--+--+           +--+--+       +-----+
                          |     +-----+     |             
                          +-----+  R4 +-----+  
                                +-----+
]]></artwork>
        </figure></t>

	  <t>R1, R2, R3, R4, Rep and Elm are SR-capable nodes. Rep and Elm are 
	  redundancy nodes (R-node). When a flow is sent into the SRv6 domain, the process is:</t>

      <t>1) R1 receives the traffic flow and encapsulates packets with a list
      of segments destined to R2, which is instantiated as an ordered list of
      SRv6 SIDs.</t>

      <t>2-1) When the packet flow arrives at the Rep node (an R-node configured for replication), 
	  each packet is replicated into two copies. </t>
	  
      <t>2-2) Metadata information including flow identifier (FID) and
      sequence number (SeqNum) are added to the copies. (FID is used to identify the specific 
	  flow on the downstream R-node, and SeqNum distinguishes the packet sequence within a flow.) </t>
	  
	  <t>2-3) Each copy of the packet is encapsulated using the RSID of the downstream R-node and 
	  a new path-specific segment list, which represents different forwarding paths towards the 
	  downstream R-node. One encapsulated copy is forwarded over R3 and the other over R4. 
	  The path is provisioned for example, by a controller.</t>

      <t>3) The multiple encapsulated replicas go through different paths until they reach
      the next R-node, i.e., the Elm node in this example. </t>
	  
	  <t>4-1) The Elm node decapsulates the packets and it is 
	  configured with an elimination action for the flow. 
	  The first received copy of each packet is forwarded, and the redundant packets 
	  are eliminated. </t>
	  
	  <t>4-2) Furthermore, the redundancy policy entry of the flow specifies that the non-eliminated 
	  packets are forwarded, without additional encapsulation and added metadata, to the R2 node. </t>

      <t>When there is any failure or packet loss in one path, the service transmission 
	  continues through the other path non-disruptively. No interaction is needed between the R-nodes.</t>

      <t>In general, replicas are preferably sent over disjoint paths. The mechanism can operate 
	  over non-disjoint paths, although the resulting protection may be reduced. The type of disjointness 
	  (e.g., using link-, node-, or SRLG-disjoint paths) is use-case and network scenario-specific.</t>

      <t>Sometimes, out-of-order packets may occur since service packets
      are recovered from different forwarding paths. In this case, the Elm node
      or other network nodes downstream of the Elm node may include a
      reordering function to guarantee in-order delivery of packets.
	  Reordering is implementation-specific and outside the scope of this document. </t>

      <t>Note: a possible reordering function is described in <xref target="RFC9550"/>.</t>

      <t>Paths with similar forwarding delay can reduce jitter and the
	  retention time needed for duplicate elimination. Section 7.3
	  discusses differential-delay limits and their relationship to
	  elimination state. These are operational considerations, not a
	  requirement to use any particular path-computation algorithm. </t>
      </section> <!-- Redundancy Protection Scenario Example -->
    </section>  <!-- Redundancy Protection in Segment Routing Scenario -->

    <section title="SRv6 Segment Behavior to Support Redundancy Protection">
      <t>To achieve Redundancy Protection in an SRv6 network, the following packet processing 
	  rules are defined regarding the Redundancy SID: (i) End.R, 
	  (ii) H.Encaps.R, (iii) H.Encaps.R.Red, (iv) H.Encaps.R.L2, and 
	  (v) H.Encaps.R.L2.Red.</t>
	  
	  <t>Note that, the algorithm used by the redundancy functionality is not 
	  within the scope of this document. For example, <xref target="IEEE8021CB"/> 
	  provides algorithms (VectorRecoveryAlgorithm and MatchRecoveryAlgorithm) used for reliability.</t>

      <section title="Redundancy Segment Endpoint Behavior">
  	  <t> This section describes the redundancy-specific behaviors that can be associated
	  with a SID.</t> 

 <figure title="Redundancy Endpoint Behavior" anchor="End.R">
 <artwork align="center"><![CDATA[
+-------------+-------------------------------------------------------+
| End.R       | Endpoint with decapsulation and Redundancy Processing |
+-------------+-------------------------------------------------------+]]>
 </artwork></figure>
	  
        <t> An RSID identifies a local SRv6 endpoint behavior for packets
		requesting redundancy processing. The R-node extracts the FID and
		SeqNum according to Section 3.2, selects a configured Redundancy
		Policy entry, and invokes its ordered RedInst actions. Receipt of an
		RSID alone does not authorize processing without a matching entry.
		</t>

        <t>R-nodes terminate SRv6 member-flow tunnels and maintain flow-specific
		replication or elimination state. Ordinary SRv6 transit nodes need no
		additional per-flow redundancy state. This function therefore adds
		per-protected-flow state at service endpoints, including elimination
		nodes that can be transit nodes in the wider SR topology. It is not
		equivalent to the stateless transit behavior highlighted in
		<xref target="RFC8402"/>. This distinction affects scaling, and failure
		handling; Sections 7 and 8 discuss those consequences.</t> 

		<t> The Redundancy SID MUST be the final segment in an SR Policy (i.e., 
		Segment List[0]) and it is associated with the redundancy functionality. </t>
		
        <t>A Redundancy Segment is associated with service instructions, indicating the 
		following operations:</t>

        <t><list style="symbols">
            <t>Decapsulates the received SRv6 packet and extracts the flow identifier 
			and sequence number from it.</t>

            <t>Steers the packet (and its extracted metadata) via the Redundancy Policy 
			into the corresponding redundancy instance (RedInst).</t>
          </list>
		The RedInst is selected by the flow-specific Redundancy Policy entry
		and executes its configured ordered actions. An R-node MUST discard
		and account for packets addressed to an active End.R SID if the
		extracted FID has no active, authorized mapping or the selected
		RedInst cannot execute its required actions. A node MUST NOT silently
		bypass elimination and forward such a packet as an ordinary data
		packet; doing so could release duplicates or introduce out-of-policy
		traffic.</t>

        <t>The management or control-plane entity provisioning a Redundancy
		Policy, whether centralized or distributed, MUST account for the
		capabilities of all participating R-nodes. At a minimum these include
		admitted flow count, supported SeqNum widths and redundancy algorithms, packet
		processing rate, and elimination-history capacity. The provisioning
		entity MUST NOT activate a policy whose admitted requirements exceed
		the reported or locally configured capacity. How such capabilities
		are discovered and signaled is outside the scope of this document; no
		centralized controller is required by this specification.</t>

        <t>When an SRv6-capable node (N) receives an IPv6 packet whose
        destination address matches a local IPv6 address instantiated as an
        SRv6 SID (S), and S is a Redundancy SID, N does:</t>

        <t><figure>
            <artwork><![CDATA[
S01. When an SRH is processed {
S02.  If (Segments Left != 0) {
S03.   Send an ICMP Parameter Problem message to the Source Address
            with Code 0 (Erroneous header field encountered),
            and Pointer set to the Segments Left field,
            interrupt packet processing and discard the packet;
S04.  }
S05.  Proceed to process the next header in the packet;
S06. }
]]></artwork>
          </figure></t>

  <t>
     When processing the Upper-Layer header of a packet matching a FIB entry
	 locally instantiated as an End.R SID, N does the following:
  </t>

        <t><figure>
            <artwork><![CDATA[
S01. If (Upper-Layer header type == 
       ( 4(IPv4) OR 41(IPv6) OR 143(Ethernet) )) 
	   {
S02.   Extract the FID, SeqNum, and any padding bits from the ARG
       using the configured layout in Section 3.2;
S03.   If no active matching (RSID, FID) entry exists, or if the
       layout, padding, or RedInst is invalid, discard the packet
       and increment the appropriate error counter;
S04.   Remove the outer IPv6 header and its extension headers;
S05.   Pass the exposed payload type, FID, and SeqNum to the
       configured RedInst; if processing fails, discard the packet;
S06. } Else {
S07.   Process the Upper-Layer Header as in [RFC8986];
S08. }
]]></artwork>
          </figure> 
		  The upper-layer type is determined only after any valid SRH has been
		  processed with Segments Left equal to zero. The recognized values are
		  4 for IPv4, 41 for IPv6, and 143 for Ethernet. For unrecognized Next
		  Header values, the generic local upper-layer processing of <xref target="RFC8986"/>
		  applies; such packets are not delivered to the RedInst. A packet
		  addressed to a configured End.R SID but lacking the required
		  decapsulatable payload MUST be discarded. A received 128-bit SID
		  cannot be physically shorter; insufficient argument width is a
		  configuration error that MUST be rejected before installation.
		  Counter behavior is defined in Section 4.3.
</t>

      </section> <!-- Redundancy Segment Endpoint Behavior -->


<section anchor="SRv6-Headend" title="SR Policy Headend Behaviors">

    <t> 
	This section describes a set of SRv6 Redundancy Policy Headend 
	<!-- <xref target="RFC8986"/> --> behaviors.
    </t> 

<figure title="Redundancy-specific SR Policy Headend Behaviors" anchor="R-Encap">
<artwork align="center"><![CDATA[
+--------------------+--------------------------------------------------+
| H.Encaps.R         | SR Headend with Redundancy Encapsulation         |
+--------------------+--------------------------------------------------+
| H.Encaps.R.Red     | H.Encaps with Reduced Redundancy Encapsulation   |
+--------------------+--------------------------------------------------+
| H.Encaps.R.L2      | H.Encaps.R Applied to Received L2 Frames         |
+--------------------+--------------------------------------------------+
| H.Encaps.R.L2.Red  | H.Encaps.R.Red Applied to Received L2 Frames     |
+--------------------+--------------------------------------------------+]]>
 </artwork></figure>

 <section anchor="H-Encaps-R" title="H.Encaps.R: SR Headend with Redundancy"> 
    <t> 
        Node "N" receives a packet P=(A, B) identified by its configured
		ingress classifier as belonging to an original flow requiring
		redundancy protection. B is neither a local address nor a SID of "N". "N"
		applies the RedInst actions to the packet and produces one or more
		egress member-flow packets, each with its downstream-assigned FID and
		the SeqNum.
    </t> 
    <t> 		
		Node "N" executes the 
		flow-related redundancy function, resulting in one or more member flows 
		(P1=(A, B), P2=(A, B), ...) with related parameters ([FID1, SeqNum], 
		[FID2, SeqNum], ...).
    </t>
	<t>
		Note: The number of resulting member flows depends on the configuration
		of the flow related function. For example, in the case of elimination 
		there is only one egress member flow.
	</t>
    <t>
        Node "N" is configured with an IPv6 address "T" (e.g., assigned to its 
		loopback).
	</t>
    <t>
		For example, N steers P1 with source address T over an ordered
		execution path SP1=&lt;S11, S12, S13&gt;. S11 is executed first, and S13 is
		the final End.R SID. In an SRH that carries the full list, S13 is
		Segment List[0] and S11 is the initial IPv6 Destination Address. The
		placeholder ARG=0 in the configured End.R SID is overwritten for
		transmission with the downstream-allocated FID and the flow's SeqNum.
		The same procedure is executed independently for every additional
		egress member flow, using that member's path and FID.
    </t>
    <t>
        The H.Encaps.R encapsulation behavior for one member flow is defined as follows 
		(SA: source address, DA: destination address):
    </t>
        <artwork name="" type="" align="left" alt=""><![CDATA[
S01. Push an IPv6 header with its own SRH;
S02. Encode the downstream FID and common SeqNum in the ARG of
     the final End.R SID (Segment List[0]), using Section 3.2;
S03. Set outer IPv6 SA = T and outer IPv6 DA to the first SID
     in the segment list;
S04. Set outer Payload Length, Traffic Class, Hop Limit, and
     Flow Label fields;
S05. With an SRH, set the outer IPv6 Next Header to 43 and the
     SRH Next Header to 4 for IPv4 or 41 for IPv6;
S06. Decrement inner IPv6 Hop Limit or IPv4 TTL;
S07. Submit the packet to the IPv6 module for transmission;
       ]]></artwork>
    <t>
        The IPv6 Next Header value 43 identifies the Routing Header
		containing the SRH; it is not the encapsulated payload protocol. The
		SRH Next Header identifies the payload: 4 for IPv4 or 41 for IPv6. If
		the SRH is omitted for a one-segment path, the outer IPv6 Next Header
		identifies that payload directly, using 4 or 41 respectively. The
		Ethernet equivalent is specified in Section 4.2.3.
    </t>	
    <t>
        After the H.Encaps.R behavior, P1 and P2, if P2 exists, look like:
	 <list style="symbols">
         <t>(T, S11) (S13, S12, S11; SL=2) (A, B), note: S13.ARG=FID1,SeqNum </t>
         <t>(T, S21) (S23, S22, S21; SL=2) (A, B), note: S23.ARG=FID2,SeqNum </t>
     </list>
    </t>
    <t>
        The member flow packet is encapsulated unmodified (with the exception 
		of the IPv4 TTL or IPv6 Hop Limit that is decremented).
    </t>	
    <t>
        The push of the SRH MAY be omitted when the SRv6 Policy only contains 
		one segment and there is no need to use any flag, tag, or TLV. In such 
		cases the outer destination address is the Redundancy SID and the Next Header 
		field of the IPv6 packet is set to 4 (IPv4 payload) or 41 (IPv6 payload).
    </t>	
 </section>  <!-- end of H.Encaps.R -->

 <section anchor="H.Encaps.R.Red" title="H.Encaps.R.Red: H.Encaps.R with Reduced Encapsulation"> 
    <t>
        The H.Encaps.R.Red behavior is an optimization of the 
		H.Encaps.R behavior. 
    </t>
    <t>
        H.Encaps.R.Red reduces the length of the SRH by excluding the 
		first SID in the SRH of the pushed IPv6 header. The first SID is only 
		placed in the Destination Address field of the pushed IPv6 header.
    </t>
    <t>
        After the H.Encaps.R.Red behavior, P1, and P2 respectively look like:
	 <list style="symbols">
         <t>(T, S11) (S13, S12; SL=2) (A, B), note: S13.ARG=FID1, SeqNum </t>
         <t>(T, S21) (S23, S22; SL=2) (A, B), note: S23.ARG=FID2, SeqNum </t>
     </list>
    </t>
 </section>  <!-- end of H.Encaps.R.Red -->

 <section anchor="H.Encaps.R.L2" title="H.Encaps.R.L2: H.Encaps.R applied to received L2 Frames"> 
    <t>
        The H.Encaps.R.L2 behavior encapsulates a received Ethernet frame 
		and its attached VLAN header, if present, in an IPv6 packet with an 
		SRH. The Ethernet frame becomes the payload of the new IPv6 packet.
    </t>
    <t>
        The H.Encaps.R.L2 encapsulation behavior is similar to 
		H.Encaps.R but sets an Ethernet-specific outer Next Header and 
		lacks the TTL- or Hop-Limit-related action. H.Encaps.R.L2 is defined 
		as follows:
    </t>

        <artwork name="" type="" align="left" alt=""><![CDATA[
S01. Push an IPv6 header with its own SRH
S02. Encode the downstream FID and common SeqNum in the ARG of
     the final End.R SID (Segment List[0]), using Section 3.2;
S03. Set outer IPv6 SA = T and outer IPv6 DA to the first SID
     in the segment list;
S04. Set outer Payload Length, Traffic Class, Hop Limit, and
     Flow Label fields;
S05. With an SRH, set outer IPv6 Next Header to 43 and set the
     SRH Next Header to 143 (Ethernet);
S06. Submit the packet to the IPv6 module for transmission;
       ]]></artwork>

    <t>
        The outer IPv6 Next Header MUST be 43 when an SRH is present; the SRH
		Next Header MUST be 143 to indicate the Ethernet payload. When the
		SRH is omitted for a one-segment path, the outer IPv6 Next Header
		MUST be 143.
    </t>	
    <t>
        The push of the SRH MAY be omitted when the SRv6 Policy only contains 
		one segment and there is no need to use any flag, tag, or TLV. In such 
		cases the outer destination address is the Redundancy SID and the Next Header 
		field of the IPv6 packet is set to 143 (Ethernet payload).
    </t>	    
	<t>
        The encapsulating node MUST remove the preamble (if any) and frame 
		check sequence (FCS) from the Ethernet frame upon encapsulation, and 
		the decapsulating node MUST regenerate, as required, the preamble and 
		FCS before forwarding the Ethernet frame.
    </t>	  
 </section>  <!-- end of H.Encaps.R.L2 -->

 <section anchor="H.Encaps.R.L2.Red" title="H.Encaps.R.L2.Red: H.Encaps.R.L2 with Reduced Encapsulation"> 
    <t>
        The H.Encaps.R.L2.Red behavior is an optimization of the 
		H.Encaps.R.L2 behavior. 
    </t>
    <t>
        H.Encaps.R.L2.Red reduces the length of the SRH by excluding the 
		first SID in the SRH of the pushed IPv6 header. The first SID is only 
		placed in the Destination Address field of the pushed IPv6 header.
    </t>
    <t>
        The push of the SRH MAY be omitted when the SRv6 Policy only contains 
		one segment and there is no need to use any flag, tag, or TLV.
    </t>
	<t>
        The encapsulating node MUST remove the preamble (if any) and frame 
		check sequence (FCS) from the Ethernet frame upon encapsulation, and 
		the decapsulating node MUST regenerate, as required, the preamble and 
		FCS before forwarding the Ethernet frame.
    </t>	
    </section>  <!-- end of H.Encaps.R.L2.Red -->

    </section>  <!-- end of SR Policy Headend Behaviors -->

 <section anchor="Counters" title="Counters"> 
   <t>A node supporting this document SHOULD implement a pair of traffic
   counters (one for packets and one for bytes) per local RSID entry, for
   traffic that matched that RSID and was processed successfully (i.e.,
   packets that generate ICMP Error Messages or are dropped are not
   counted).  The retrieval of these counters from MIB, NETCONF/YANG, or
   any other data structure is outside the scope of this document.
   </t>
   <t>Implementations of End.R SHOULD provide per-RSID counters for packets
   discarded because of unknown FIDs, invalid or inconsistent
   configurations, nonzero padding, failed RedInst processing, and
   resource exhaustion, to the extent each condition is distinguishable.
   Detailed per-flow elimination, duplicate, out-of-order, and
   sequence-gap counters are algorithm dependent; operators SHOULD make
   those counters and relevant alarms available through a management
   interface. This document does not define a YANG module.
   </t>
    </section> <!-- Counters -->

    </section> <!-- SRv6 Segment Behavior to Support Redundancy Protection -->


    <section title="IANA Considerations">
<!--      <t>This document requires registration of End.R behavior 
	  in "SRv6 Endpoint Behaviors" sub-registry of "Segment Routing
      Parameters" registry.</t>
-->
      <t>IANA maintains the "SRv6 Endpoint Behaviors" sub-registry of the
      "Segment Routing" registry. IANA is requested to make one new
      assignment from the First Come First Served portion of the registry as
      follows:</t>

      <t><figure>
          <artwork>
<![CDATA[ Value | Hex   | Endpoint Behavior | Reference  | Change Controller
 ------+-------+-------------------+------------+------------------
 TBD   | TBD   | End.R             | [This.I-D] | IETF]]></artwork>
        </figure></t>
    </section> <!-- IANA -->



    <section title="Implementation Description">
     <t>
	 Note to the RFC Editor: this section is to be removed before publication.
	 </t>
     <t>
	 This section records the status of known implementations of the
	 Redundancy Protection defined by this specification at the time of
	 posting of this Internet-Draft, based on <xref target="RFC7942"/>.  
	 The description of implementations in this section is
	 intended to assist the IETF in its decision-making processes in
	 progressing drafts to RFCs. Please note that the listing of any
     individual implementation here does not imply endorsement by the
     IETF.  Furthermore, no effort has been spent to verify the
     information presented here that was supplied by IETF contributors.
     This is not intended as, and must not be construed to be, a
     catalog of available implementations or their features.  Readers
     are advised to note that other implementations may exist.
	 </t>
     <t>
	 According to RFC 7942, "this will allow reviewers and working
     groups to assign due consideration to documents that have the
     benefit of running code, which may serve as evidence of valuable
     experimentation and feedback that have made the implemented
     protocols more mature.  It is up to the individual working groups
     to use this information as they see fit".
	 </t>
     <t>
     Known implementations:
	 <list style="symbols">
      <t>The organization responsible for the implementation: open-source project by Ericsson.</t>
      <t>Link to the implementation: https://github.com/EricssonResearch/xdpfrer.</t>
      <t>Brief general description: this software is an experimental implementation 
	  of the algorithms and functions defined in IEEE 802.1CB standard, and the 
	  SRv6 Redundancy SID. It is able to replicate packets 
	  over redundant network paths to protect against network failures. The implemented 
	  functions are called replication (generates copies and sends them over different 
	  paths) and elimination (accepts the first copy and drops the duplicates).</t>
      <t>The implementation's level of maturity: prototype. </t>
      <t>Coverage: RSID and Redundancy Policy are fully implemented. Flow 
	  identification on the ingress node is limited to IPv6 Flow Label. Maximum SID Depth (MSD) is 6.</t>
      <t>Version compatibility: v08</t>
      <t>Licensing: BSD 2-Clause "Simplified" License, see 
	  https://github.com/EricssonResearch/xdpfrer/blob/main/LICENSE</t>
      <t>Implementation experience: detailed description at implementation link.</t>
      <t>Contact information: Ferenc Fejes ferenc.fejes at ericsson.com </t>
      <t>Date: 2026-07-10.</t>
     </list>
    </t>	 
    </section> <!-- Implementation Description -->


    <section title="Operational Considerations">
     <t>This section addresses the operational and management aspects of SRv6 Redundancy 
	 Protection, covering deployment, configuration, monitoring, and maintenance guidance. 
	 It is targeted for operators managing this functionality to effectively integrate the 
	 capability into their networks while maintaining security, performance, and 
	 consistency. This is a non-exhaustive list of operational considerations.</t>

    <section title="Installation and Initial Setup">
	 <t>The operational defaults for this mechanism are as follows:
	 An R-node performs ordinary IPv6 processing for traffic that is not
	 directed to an installed End.R SID. Redundancy processing is inactive
	 until an RSID and matching Redundancy Policy entries have been
	 explicitly installed. Once End.R is installed, packets addressed to
	 that SID without an authorized active entry are discarded; they are
	 not passed through as unprotected payloads.</t>
	 
	 <t>The default FID width is 20 bits and the default SeqNum width is 16
	 bits. Both 16-bit and 28-bit sequence numbers MUST be supported as
	 specified in Section 3.2. A deployment using a non-default length
	 MUST configure that length consistently at all R-nodes serving the flow.
	 Operators ought to verify that running configurations match the
	 intended RSID layouts, member-flow mappings, and activation state
	 before sending redundancy-protected traffic. </t>
    </section> <!-- X -->


    <section title="Migration Path and Deployment">
	 <t> Redundancy Protection needs to be integrated incrementally into existing SRv6 networks:
	  <list style="symbols">
      <t>Coexistence: R-nodes need to support both Redundancy Endpoint behavior (End.R) and 
	  existing SRv6 behaviors. Traffic not served by the redundancy protection 
	  function needs to be unaffected. </t>
      <t>Staged Deployment: Operators ought to deploy to a subset of nodes or flows 
	  before network-wide adoption. </t>
      <t>Configuration Rollback: Operators need to have the ability to disable 
	  redundancy policies on R-nodes without disrupting other services, enabling 
	  rapid rollback if issues arise during deployment. </t>
      </list>
	 </t>
    </section> <!-- X -->

    <section title="Protocol Dependencies and Network Impact">
	 <t>Dependencies: All R-nodes MUST support SRv6. In many scenarios external systems (PCE, 
	 SDN controllers) are expected to compute protection paths, however they are not mandatory. </t>
	 <t> Resource Consumption:
	  <list style="symbols">
      <t>Bandwidth: Redundancy protection duplicates traffic (i.e., 100% 
	  overhead per additional full-rate protection copy), including
      additional forwarding load on transit nodes and shared links.
      Admission and capacity planning must include the total load on
      every transit path, not just on the R-nodes. </t>
      <t>R-node Processing: Replication and elimination consume CPU and 
	  memory. Operators need to ensure, that flow counts do not exceed R-node capacity. </t>
      <t>ECMP and Load Balancing Impact: Per-packet ARG changes in RSID can 
	  alter ECMP hashing.  Operators should verify the hashing behavior
      of each relevant forwarding node and mitigate unintended path
      changes, for example by using an additional node SID before the
      RSID.  Exclusion of ARG bits from a hash cannot be assumed. </t>
      <t>Fast Reroute (FRR): Redundancy protection can coexist with other 
	  protection mechanisms. Operators are advised to carefully consider the 
	  interaction to avoid unnecessary resource usage. </t>
      </list>
	 </t>
	 <t>Traffic Pattern Changes: Protection benefits depend on the
	 independence of paths used by member flows.  Monitoring should account for expected
	 duplication patterns to avoid false security alarms. </t>
   
   	 <t>Topology and failure-domain placement: Replication should generally
	 occur near the traffic source and elimination near its destination,
	 while avoiding unnecessary resource use outside the protected region.
	 Paths used by member-flows should avoid common links, nodes, facilities, power
	 dependencies, and shared-risk link groups (SRLGs), where the
	 requested service objective warrants that diversity. Placing
	 nominally separate R-nodes or paths in the same failure domain can
	 defeat the intended protection. Complete path disjointness is not a
	 wire-protocol requirement; the operator must document the
	 disjointness assumptions used to meet the service objective. </t>
   
   	 <t>Differential delay and sequence-number sizing: The maximum expected
	 differential delay, packet reordering, loss bursts, and peak packet
	 rate determine how much elimination history and buffering a RedInst
	 needs. The provisioning entity should size the SeqNum space and
	 recovery window together, so that wraparound and delayed packets
	 cannot be confused within the chosen algorithm's observation
	 interval. A configured 16-bit sequence space can wrap rapidly at high
	 packet rates. The maximum supported differential delay is an
	 admission and management parameter of a given network scenario. If the predicted
	 delay exceeds an R-node's admitted recovery capability, the policy
	 MUST NOT be activated for that R-node. </t>
    </section> <!-- X -->

    <section title="Security Operations">
	 <t> Security operations related to the redundancy-protection function include:
	  <list style="symbols">
      <t>Indicators of Compromise: Security operators need to account for 
	  simultaneous traffic on multiple paths. Sequence number analysis 
	  can detect replay attacks or anomalies. Implemented algorithms on
	  R-nodes need to provide counters to support such analysis.  </t>
      <t>Logging: replication/elimination events, policy changes, and error 
	  conditions need to be logged with timestamps for audit trails. </t>
      <t>Management Access Control: Management channels should use
      authenticated and integrity-protected transport, such as NETCONF
      over SSH <xref target="RFC6242"/> or RESTCONF over HTTPS with TLS <xref target="RFC8040"/>
      <xref target="RFC8446"/>.  Role-based authorization can use the NETCONF Access
      Control Model <xref target="RFC8341"/>.  The mechanism must fit the security
      properties of the deployed management protocol. </t>
      </list>
	 </t>
    </section> <!-- X -->

    <section title="Verifying Correct Operation">
	 <t> Operators can verify redundancy protection through several mechanisms:
	  <list style="symbols">
      <t>Redundancy Policy Status: each R-node supports active query of redundancy 
	  policy entries and served flows. </t>
      <t>Replication/Elimination Counters: monitor the number of duplicate 
	  packets on a per-flow basis. </t>
      <t>Path Verification: confirm traffic follows intended protection 
	  paths via SRH inspection. </t>
      <t>Connectivity Tests: end-to-end connectivity testing for a served 
	  flow is needed, for example, for troubleshooting. </t>
      </list>
	 </t>
    </section> <!-- X -->

    <section title="Management Information and Data Models">
	 <t>The following manageable entities are described in this document: Redundancy Node 
	 (R-node), Redundancy SID (RSID), Redundancy Policy, and Redundancy 
	 Instance (having per-flow state). </t>
	 <t> Standardized technologies can be used for management of Redundancy Protection:
	  <list style="symbols">
      <t>YANG-based Management: Recommended for configuration and state via 
	  NETCONF <xref target="RFC6241"/> or RESTCONF <xref target="RFC8040"/>. </t>
      <t>Syslog: For operational events and error logging <xref target="RFC5424"/>. </t>
      <t>IPFIX: For flow-level statistics export <xref target="RFC7011"/>. </t>
      </list>
	 </t>
	 <t>YANG model is outside the scope of this document. </t>
    </section> <!-- X -->

    <section title="Fault and Configuration Management">
	 <t> Fault Management needs to provide:
	  <list style="symbols">
      <t>Monitor liveness via Connectivity Fault Management tools.</t>
      <t>Detect packet arrival on protection paths. </t>
      <t>Track packet-replication rate, duplicate-elimination rate, and sequence number gaps to identify path failures. </t>
      <t>Count malformed RSIDs to detect configuration errors. </t>
      <t>Generate alerts when approaching flow capacity limits. </t>
      </list>
	 </t>
	 <t>Configuration Management needs to provide:
	  <list style="symbols">
      <t>Allow operators to define, modify, and delete redundancy policies. </t>
      <t>Support atomic multi-device configuration transactions. </t>
      <t>Enable configuration consistency verification across R-nodes. </t>
      <t>Persist configurations across device restarts. </t>
      </list>
	 </t>
    </section> <!-- X -->

    <section title="Performance and Accounting Management">
	 <t> Operators may use the following monitoring and accounting tools:
	  <list style="symbols">
      <t>Protocol Monitoring: Track replication rate, elimination rate,
	  out-of-order delivery rate, and packet loss via sequence number discontinuities. </t>
      <t>Device Monitoring: Monitor CPU utilization, memory consumption, and 
	  forwarding performance impact on R-nodes. </t>
      <t>Network Monitoring: Monitor link utilization on protection paths and 
	  path efficiency relative to direct routes. </t>
      <t>Service Monitoring: Measure flow-level metrics (throughput, latency, 
	  jitter) against SLA targets. </t>
      <t>Accounting: Collect usage statistics (protected flows, replicated bandwidth) 
	  for capacity planning, cost allocation, and trend analysis. </t>
      </list>
	 </t>
    </section> <!-- X -->

    <section title="Tooling Considerations">
	 <t> Operators need to first assess whether existing management systems 
	 (NETCONF clients, syslog aggregators, monitoring platforms) can be 
	 adapted to support redundancy protection before developing new tools. 
	 New tooling development needs to focus only on functions existing tools 
	 cannot provide (e.g., specialized path computation and validation).
	 </t>
    </section> <!-- X -->
	  
    <section title="Redundancy State">
	 <t>Elimination algorithms are outside of the scope of this document. </t>
	 <t>Elimination state includes at least the association of member FIDs to
	 the RedInst, the configured sequence-number width, and the
	 implementation-specific history of accepted packets. Time synchronization
	 between R-nodes is not required for the on-wire FID/SeqNum mechanism;
	 if timestamps are used by a particular implementation for telemetry
	 or an algorithm, their synchronization requirements must be specified
	 by that implementation. </t>
	 <t>If the available elimination capacity is exceeded at runtime, the
	 affected R-node MUST reject new admissions and MUST discard packets
	 for RedInsts that cannot safely complete their configured actions; it
	 MUST NOT silently convert them into unprotected pass-through
	 forwarding. Service loss, not seamless fallback, is therefore
	 possible under overload. Operators should monitor per-flow and
	 aggregate occupancy, alarm on capacity exhaustion, and allow safe
	 rollback or re-establishment with new identities. </t>
    </section> <!-- X -->

    </section> <!-- Operational Considerations -->



    <section title="Security Considerations">
	  <t>The segment routing security considerations in <xref target="RFC8402"/>, the SRH
	  considerations in <xref target="RFC8754"/>, and SRv6 network programming
	  considerations in <xref target="RFC8986"/> apply. Additional deployment guidance is
	  discussed in <xref target="I-D.ietf-spring-srv6-security"/>. </t>
	
      <t>Redundancy protection introduces flow-specific state and replication behavior whose risks
	  are not fully covered by ordinary SRv6 forwarding. The examples below
	  do not replace the security mechanisms of the routing,
	  policy-distribution, or management protocols in use. </t>

      <section title="Packet Duplication">
        <t>Replication amplifies an admitted packet by the number of active
		copies and consumes forwarding, bandwidth, and queueing resources on
		all traversed paths, including transit nodes. An unauthorized flow,
		compromised replication node, or disabled elimination function can
		amplify denial-of-service traffic, including traffic forwarded beyond
		the intended elimination point. Provisioning systems MUST enforce
		admission controls and authorize the creation of replication entries.
		Operators should rate-limit admitted traffic as appropriate and
		account for aggregate replication load along each path. On an
		elimination failure, the node MUST NOT silently forward all replicas
		as ordinary traffic.</t>
      </section>

      <section title="Sequence Number Spoofing and Replay">
        <t>An attacker who can inject packets with a valid RSID and FID, modify
		sequence numbers, or replay delayed copies can cause incorrect
		duplicate elimination, out-of-order delivery, added state retention,
		or legitimate packet loss. Merely restricting deployment to a trusted
		SR domain does not mitigate a compromised insider or R-node. The
		domain should filter unauthorized access to RSIDs, secure the ingress
		and provisioning plane, and monitor sequence gaps, late duplicates,
		and anomalous FIDs. The implemented elimination algorithm determines
		the exact replay and reordering limits; those limits should be
		considered when selecting the SeqNum width and history window.</t>
      </section>

      <section title="Information Disclosure and Provisioning Compromise">
        <t>Redundancy path selections can disclose topology, disjointness, or
		service characteristics. The <xref target="RFC8402"/> restriction against leaking
		explicit routing information beyond the administered domain applies.
		Unauthorized or compromised management and control-plane access can
		install conflicting FIDs, change member-path associations, redirect
		traffic, disable replication, or exhaust state. Operators should use
		the authentication, authorization, filtering, and
		integrity-protection mechanisms of their selected protocols and
		restrict management roles; Section 7.4 provides applicable
		references. This document does not impose additional
		transport-security requirements on unrelated SR advertisements.	</t>
      </section>

      <section title="State Exhaustion and Failure Modes">
        <t>An elimination node maintains per-protected-flow packet history and
		related state. An attacker can exhaust capacity by provisioning or
		injecting many FIDs, creating partially active flows, submitting
		sparse sequence numbers, or triggering large reorder windows.
		Conflicting allocation sources can also cause different flows to
		share a FID and lead to incorrect elimination. Provisioning and
		receiving R-nodes MUST prevent ambiguous FID mappings, reject
		unauthorized or over-capacity policies, and account for rejected
		traffic. Capacity planning must include sequence-window resources,
		per-flow state, replication rate, and transit load.</t>
        <t>If state is lost on reboot, an elimination instance cannot safely
		assume the previous accepted sequence history. If overloaded, the
		node can drop affected traffic or reject new flows, causing service
		disruption, even when other paths remain available. Silent
		pass-through is not an acceptable default because it can deliver
		duplicates. Section 7.10 specifies recovery, drain, and alarm
		guidance. Protection against a compromised ingress, controller, or
		downstream R-node requires the domain's normal trust and
		authorization controls as well as operational monitoring.</t> 
      </section>
	  
    </section>

    <section anchor="contributors"><name>Contributors</name>
      <contact initials="F." surname="Yang" fullname="Fan Yang">
        <organization showOnFrontPage="true">Huawei</organization>
        <address>
          <postal>
            <country>China</country>
          </postal>
          <email>shirley.yangfan@huawei.com</email>
        </address>
      </contact>
  
      <contact fullname="Ferenc Fejes" initials="F." surname="Fejes">
        <organization showOnFrontPage="true">Ericsson</organization>
        <address>
          <postal>
            <country>Hungary</country>
          </postal>
          <email>ferenc.fejes@ericsson.com</email>
        </address>
      </contact>
	  
    </section>

    <section title="Acknowledgements">
      <t>The authors would like to thank Bruno Decraene, Alvaro Retana, Andy Smith, 
	  Ron Bonica, James Guichard, Jeffrey Zhang, and Adrian Farrel for their valuable
      comments and discussions.</t>
    </section>
	
	

<section title="Appendix A. Redundancy SID Usage Example">
 <t>
   This appendix shows how the described End.R mechanisms can
   be used in an SRv6 network.
  </t>
  
 <figure title="Example Topology" anchor="ref-detnet">
 <artwork align="center"><![CDATA[

                   +----+ Link3       +----+ 
                   |    |----->-------|    | Link6
              +->--| N3 |----->-------| E5 |--->--+
              |    +----+ Link4       +----+      |
              | Link1                   |         |
+---+       +----+                      |       +----+       +---+
|src|--->---| R1 |                  +->-+       | E6 |--->---|dst|
+---+       +----+                  |           +----+       +---+
              | Link2               | Link7       | 
              |    +----+         +----+          | 
              +->--| n4 |--->-----| R2 |----->----+
                   +----+ Link5   +----+ Link8

n: non-SRv6 IPv6 node
N: SRv6-capable node
R: Node with Replication Function 
E: Node with Elimination Function 
]]>
</artwork></figure>

  <t>The packet traces below use a formal symbolic notation: "x"
   denotes an abstract 128-bit IPv6 address template x, not a literal
   parseable IPv6 address. Tokens K, L, P, U, X, src, dst, arg, i, j,
   and m are symbolic fields to be replaced by valid hex-encoded
   locator, function, and argument bits in an implementation. The
   examples do not prescribe their widths or byte-aligned encodings. All
   addresses containing such tokens are enclosed in "..."; actual
   deployments use syntactically valid 128-bit addresses consistent with
   Section 3.2. For example, "2001:db8:K:2:P:arg::" denotes the RSID
   associated with node R2, not an IPv6 literal.
  </t>
  
  <t>
      In the reference topology:
  <list style="symbols">
       <t> Nodes N3, R1, R2, E5 and E6 are SRv6-capable nodes. </t>
       <t> Nodes R1, R2, E5 and E6 are Redundancy nodes. </t>
       <t> Node n4 is an IPv6 node that is not SRv6-capable. </t>
       <t> Node j has an IPv6 loopback address "2001:db8:L:j::/128". </t>
	   <t> A SID at node j with locator block "2001:db8:K::/48" and function U
           is represented by "2001:db8:K:j:U::". </t>
	   <t> "2001:db8:K:j:P::" is explicitly allocated as the End.R SID at 
	       node j.  For example, "2001:db8:K:2:P::" represents End.R at node
		   R2. </t>
	   <t> "2001:db8:K:j:Xim::" is explicitly allocated as the End.X SID at 
	       node j towards neighboring node i via the m-th link between nodes i 
		   and j.  For example, "2001:db8:K:3:X51::" represents End.X at node N3
		   towards node E5 via Link3 (the first link between nodes N3 and E5).
		   Similarly, "2001:db8:K:3:X52::" represents the End.X at node N3 
		   towards node E5 via Link4 (the second link between nodes N3 and 
		   E5). </t>
  </list>
  </t>

  <t>
   If the src node sends a packet to the dst node for which per-packet 
   redundancy is configured, then the nodes with Redundancy functions provide the 
   required replication or elimination functions. For instance, in the example in
   <xref target="ref-detnet"/>:
  <list style="symbols">
       <t> Node src sends a UDP packet as follows:
	   ("2001:db8:src::1", "2001:db8:dst::1", NH=UDP)(UDP payload). </t>
	   
       <t> Node R1, which is an SRv6-capable Redundancy node, identifies the flow to which 
	   the packet belongs. As replication is defined by the Redundancy Policy for the given flow, 
	   R1 performs the replication action and intends to send the packet to the next 
	   R-nodes (E5 and R2). These nodes are reachable via SRv6, so R1 performs 
	   H.Encaps.R(.Red) on the replicas with a path-specific SRH. The 
	   argument part of the End.R SID contains the FID and the 
	   SeqNum. </t> 
	   <t>Specifically, one replica is sent on Link1 towards E5 as: 
	   ("2001:db8:L:1::", "2001:db8:K:3:X51::") ("2001:db8:K:5:P:arg::", "2001:db8:K:3:X51::", 
	   SL=1, NH=IPv6) ("2001:db8:src::1", "2001:db8:dst::1", NH=UDP)(UDP payload). </t>
	   <t>The other replica is sent on Link2 towards R2 as: 
	   ("2001:db8:L:1::", "2001:db8:K:2:P:arg::", NH=IPv6) ("2001:db8:src::1", 
	   "2001:db8:dst::1", NH=UDP)(UDP payload). </t>

	   <t> Node N3, which is an SRv6-capable node, performs the standard SRH
	   processing.  Specifically, it executes the End.X behavior indicated by 
	   the "2001:db8:K:3:X51::" SID and forwards the packet on Link3 to node E5. </t> 

	   <t> Node n4, which is a non-SRv6-capable node, performs the standard 
	   IPv6 processing.  Specifically, it forwards the UDP packet based on 
	   DA "2001:db8:K:2:P:arg::" in the IPv6 header towards node R2. 
	   Each R-node's Redundancy Policy selects its action pipeline
	   independently. In this example, R2 is configured to replicate the
	   incoming member flow without first performing elimination, whereas E5
	   and E6 eliminate duplicates. A node can perform both functions when
	   its policy entry explicitly specifies that sequence of actions.</t> 

       <t> Node R2, which is an SRv6-capable Redundancy node, identifies the packet 
	   as targeted to the local Redundancy function. R2 performs the decapsulation 
	   and forwards the exposed payload and the ARG part to the redundancy
       functionality. The redundancy function identifies the flow to which the packet belongs. 
	   As replication is defined by the Redundancy Policy for the given flow, 
	   R2 performs the replication action and 
	   intends to send the packet to the next redundancy nodes (E5 and E6).
	   These nodes are reachable via SRv6, so R2 performs H.Encaps.R.Red 
	   on the replicas; and no path-specific SRH is needed for these 
	   single-SID member paths. The argument part of the 
	   End.R SID contains the FID and the SeqNum. </t> 
	   <t>Specifically, one replica is sent on Link7 towards E5 as: 
	   ("2001:db8:L:2::", "2001:db8:K:5:P:arg::", NH=IPv6) ("2001:db8:src::1", 
	   "2001:db8:dst::1", NH=UDP)(UDP payload).</t> 
	   <t>The other replica is sent on Link8 towards E6 as: 
	   ("2001:db8:L:2::", "2001:db8:K:6:P:arg::", NH=IPv6) ("2001:db8:src::1", 
	   "2001:db8:dst::1", NH=UDP)(UDP payload). </t>

       <t> Node E5, which is an SRv6-capable Redundancy node, identifies the packets 
	   as targeted to the local redundancy function. E5 performs the decapsulation 
	   and forwards the payload and the ARG part to the redundancy
       functionality. The redundancy function identifies the flow to which the packet belongs. 
	   As elimination is defined by the Redundancy Policy for the given flow, the elimination action is performed on 
	   the packets received over Link3 and Link7. E5 intends to send the packet 
	   to the next redundancy node (E6), which is reachable via SRv6, so E5 performs 
	   H.Encaps.R.Red; no path-specific SRH is needed for this single-SID member path. 
	   The argument part of the End.R SID contains the FID and the SeqNum. </t> 
	   <t>Specifically, 
	   the replica received first is sent on Link6 towards E6 as: 
	   ("2001:db8:L:5::", "2001:db8:K:6:P:arg::", NH=IPv6) ("2001:db8:src::1", 
	   "2001:db8:dst::1", NH=UDP)(UDP payload). </t>

       <t> Node E6, which is an SRv6-capable redundancy node, identifies the packets 
	   as targeted to the local redundancy function. It performs the decapsulation 
	   and forwards the payload and the ARG part to the redundancy
       functionality. The redundancy function identifies the flow to which the packet belongs. 
	   As elimination is defined by the Redundancy Policy for the given flow, the elimination action is performed on 
	   the packets received over Link6 and Link8. E6 is the last redundancy node, so
	   after the redundancy function it sends the UDP packet towards the destination.
	   Specifically, the replica received first is sent towards the destination as: 
	   ("2001:db8:src::1", "2001:db8:dst::1", NH=UDP)(UDP payload). </t>
  </list>
  </t>

 <t>
   The example topology shown in <xref target="ref-detnet"/> is constructed to 
   show the usage of RSID. Note that any of the links can be replaced with 
   an SRv6 network segment. The principles described above are applicable to 
   more complex network topologies as well.
  </t>
</section> <!-- Appendix A. Illustrations -->


	
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119"?>
      <?rfc include="reference.RFC.8655"?>
      <?rfc include="reference.RFC.8754"?>
      <?rfc include="reference.RFC.8986"?>
      <?rfc include="reference.RFC.8964"?>
      <?rfc include="reference.RFC.8939"?>
      <?rfc include="reference.RFC.8174"?>
      <?rfc include='reference.RFC.8402'?>
    </references>

    <references title="Informative References">
      <?rfc include='reference.I-D.ietf-spring-srv6-security'?>
      <?rfc include='reference.RFC.9855'?>	  
      <?rfc include='reference.RFC.7942'?>	  
      <?rfc include='reference.RFC.6242'?>	  
      <?rfc include='reference.RFC.8341'?>	  
      <?rfc include='reference.RFC.8446'?>	  



      <?rfc include='reference.RFC.6241'?>	  
      <?rfc include='reference.RFC.8040'?>	  
      <?rfc include='reference.RFC.5424'?>	  
      <?rfc include='reference.RFC.7011'?>	  
      <?rfc include='reference.RFC.9550'?>	  
      <?rfc include='reference.RFC.9256'?>	  
      <?rfc include='reference.I-D.ietf-detnet-srv6-svc-protection'?>

        <reference anchor="IEEE8021CB" target="https://standards.ieee.org/standard/802_1CB-2017.html" quoteTitle="true" derivedAnchor="IEEE8021CB">
          <front>
            <title>IEEE Standard for Local and metropolitan area networks--Frame Replication and Elimination for Reliability</title>
            <author>
              <organization showOnFrontPage="true">IEEE</organization>
            </author>
            <date month="October" year="2017"/>
          </front>
          <seriesInfo name="DOI" value="10.1109/IEEESTD.2017.8091139"/>
          <refcontent>IEEE 802.1CB-2017</refcontent>
        </reference>

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