<?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-01"
     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@huawei.com</email>
      </address>
    </author>

    <author fullname="Fan Yang" initials="F." surname="Yang, Ed.">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>

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

        <phone/>

        <facsimile/>

        <email>shirley.yangfan@huawei.com</email>

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

    <author fullname="Pablo Camarillo Garvia" initials="P."
            surname="Camarillo">
      <organization>Cisco Systems, Inc.</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/>
        </postal>

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

    <date day="15" month="February" year="2022"/>

    <workgroup>SPRING Working Group</workgroup>

    <abstract>
      <t>Redundancy Protection is a generalized protection mechanism to
      achieve the high reliability of service transmission in Segment Routing
      network. The mechanism inherits the "Live-Live" methodology, targeting
      to enhance the functionalities of Segment Routing over IPv6. Inspired by
      DetNet Packet Replication and Packet Elimination functions, two new
      Segments are introduced to provide replication and elimination functions
      on specific network nodes by leveraging SRv6 Segment programming
      capabilities.</t>
    </abstract>

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

  <middle>
    <section title="Introduction">
      <t>Redundancy Protection is a generalized protection mechanism to
      achieve the high reliability of service transmission in Segment Routing
      network. Specifically, packets of flows are replicated at a network node
      into two or more copies, which are transported via different and
      disjoint paths in parallel. When copies of packets are received and
      merged at one network node, the redundant packets are determined and
      further eliminated to guarantee only one copy of packets is transmitted.
      The mechanism inherits the "Live-Live" methodology, targeting to enhance
      the functionalities of Segment Routing over IPv6 <xref
      target="RFC8986"/>. Inspired by DetNet <xref target="RFC8655"/> Packet
      Replication and Packet Elimination Functions, two new Segments are
      introduced to provide the replication and elimination functions on
      specific network nodes by leveraging SRv6 Segment programming
      capabilities. As it is unnecessary to perform switchover of recieving
      packets between different paths, redundancy protection can facilitate to
      achieve zero packet loss target when failure on either path happens.</t>

      <t>Redundancy protection provides ultra reliable protection to many
      services, for example Cloud VR/Game, IPTV service and other type of
      video services, high value private line service etc. In this document,
      redundancy protection is applied to point-to-point service. The
      mechanism for point-to-multipoint service stays out of the scope of this
      document.</t>

      <t>Segment Routing (SR) leverages the source routing paradigm. An
      ingress node steers a packet through an ordered list of instructions,
      called "segments". A segment can be associated to an arbitrary
      processing of the packet in the node identified by the segment.</t>

      <t>This document extends the Segment Routing capabilities to support the
      redundancy protection in an SRv6 environment, including the definitions
      of two new Segments, meta data encapsulation, and a variation of Segment
      Routing Policy.</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>URLLC: Ultra-Reliable Low-Latency Communication</t>

        <t>VR: Virtual Reality</t>

        <t>Red node: Redundancy node</t>

        <t>Mer node: Merging node</t>

        <t>FID: Flow IDentification</t>

        <t>SN: Sequence Number</t>
      </section>
    </section>

    <section title="Redundancy Protection in Segment Routing Scenario">
      <t><figure>
          <artwork align="center"><![CDATA[              |                                              |
              |<--------------- SRv6 Domain ---------------->|
              |                                              |
              |                    +-----+                   |
              |              +-----+  R3 +-----+             |
              |              |     +-----+     |             |
           +-----+        +--+--+           +--+--+       +-----+ 
    -------+  R1 +--------+ Red |           | Mer +-------+  R2 +-------
           +-----+        +--+--+           +--+--+       +-----+
                            |      +-----+     |             
                            +------+  R4 +-----+  
                                   +-----+
]]></artwork>

          <postamble>Figure 1: Example Scenario of Redundancy Protection in
          SRv6 Domain</postamble>
        </figure></t>

      <t>This figure shows an example of redundancy protection used in SRv6
      domain. R1, R2, R3, R4, Red and Mer are SR-capable nodes. When a flow is
      sent into 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) When the packet flow arrives at Red node, known as Redundancy
      node, each packet is replicated into two or more copies. Each copy of
      the packet is encapsulated with a new segment list, which represents
      different disjoint forwarding paths.</t>

      <t>3) Meta data information such as flow identification (FID) and
      sequence number (SN) is used to facilitate the packet elimination on
      Merging node (Mer). Flow identification identifies the specific flow,
      and sequence number distinguishes the packet sequence of a flow. Meta
      data is either carried in the packet before it arrives at redundancy
      node, or added to each of the replicas at redundancy node.</t>

      <t>4) The multiple replicas go through different paths until the Mer
      node, known as Merging node. The first received copy of each flow packet
      is transmitted from Merging node to R2, and the redundant packets are
      eliminated.</t>

      <t>5) When there is any failures or packet loss in one path, the service
      transmission continues through the other path non-disruptively.</t>

      <t>6) Sometimes, out-of-order packets may occur since service packets
      are recovered from different forwarding paths. In this case, the merging
      node or other network nodes behind merging node is desired to include a
      reordering function, which is implementation specific and out of the
      scope of this document.</t>

      <t>In this example, service protection is supported by utilizing two
      packet flows transmitted over two forwarding paths. It is noted that
      there is no limitation of the number of replicas. For a unidirectional
      flow, Red node supports replication function, and Mer node supports
      elimination function. Reordering function MAY be required in combination
      of elimination function on merging node. To minimize the jitter caused
      by random packet loss, the disjoint paths are recommended to have
      similar path forwarding delay.</t>
    </section>

    <section title="Segment to Support Redundancy Protection">
      <t>To achieve the packet replication and elimination functions,
      Redundancy Segment and Merging Segment, as well as the related SRv6
      Endpoint Behavior are introduced.</t>

      <section title="Redundancy Segment">
        <t>Redundancy Segment is the identifier of packets which need to be
        replicated on redundancy node. It is a variation of Binding SID (BSID)
        to associate with a Redundancy Policy, instantiation of which provides
        segment lists of different disjoint paths. Similar to the relationship
        between BSID and SR Policy <xref
        target="I-D.ietf-spring-segment-routing-policy"/>, the use of
        Redundancy Segment would trigger the Redundancy Policy instantiation
        on redundancy node.</t>

        <t>Redundancy Segment is associated with service instructions,
        indicating the following operations:</t>

        <t><list style="symbols">
            <t>Steers the packet into the corresponding redundancy policy</t>

            <t>Encapsulates flow identification and sequence number in packets
            if the two information is not carried in packets</t>

            <t>Packet replication and segment encapsulation based on the
            information of redundancy policy, e.g., the number of replication
            copies, an ordered list of segments with a topological
            instruction</t>
          </list>In the case of SRv6, a new behavior End.R for Redundancy
        Segment is defined. An instance of a redundancy SID is associated with
        a redundancy policy B and a source address A. In the following
        description, End.R behavior is specified in the encapsulation mode.
        The End.R behavior in the insertion mode is for further study.</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.     Decrement IPv6 Hop Limit by 1
S04.     Decrement Segments Left by 1
S05.     Update IPv6 DA with Segment List[Segments Left]
S06.     Add flow identification and sequence number if indicated*
S07.     Duplicate the packets (as number of active SID lists in B)          
S08.     Push the new IPv6 headers to each replica. The IPv6 header 
         contains an SRH with the SID list in B
S09.     Set the outer IPv6 SA to A
S10.     Set the outer IPv6 DA to the first SID of new SRH SL
S11.     Set the outer Payload Length, Traffic Class, Flow Label,
         Hop Limit and Next-Header fields
S12.     Submit the packet to the egress IPv6 FIB lookup
         for transmission to the new destination
S13.   }
S14. }
* Adding flow identification and sequence number is an optional behavior
for Redundancy Segment. The instruction execution is determined and
explicitly indicated by SR policy or Segment itself. 
]]></artwork>
          </figure></t>
      </section>

      <section title="Merging Segment">
        <t>Merging Segment is associated with service instructions, indicates
        the following operations:</t>

        <t><list style="symbols">
            <t>Packet merging and elimination: forward the first received
            packets and eliminate the redundant packets</t>
          </list>In order to eliminate the redundant packet of a flow, merging
        node utilizes sequence number to evaluate the redundant status of a
        packet. Note that implementation specific mechanism could be applied
        to control the amount of state monitored on sequence number, so that
        system memory usage can be limited at a reasonable level.</t>

        <t>As merging node needs to maintain the state of flows, a centralized
        controller should have a knowledge of merging nodes capability, and
        never provision the redundancy policy to redundancy node when the
        computation result goes beyond the flow recovery capability of merging
        node. The capability advertisement of merging node will be specified
        separately elsewhere, which is not within the scope of this
        document.</t>

        <t>In the case of SRv6, a new behavior End.M for Merging Segment is
        defined.</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 Merging SID, N does:</t>

        <t><figure>
            <artwork><![CDATA[S01. When an SRH is processed {
S02.  If (Segments Left> or ==0)   {
S03.    Acquire the sequence number of received packet and 
        look it up in table
S04.      If (this sequence number does not exist in the table) {
S05.       Store this sequence number in table
S06.       Remove the outer IPv6+SRH header
S07.       Decrement IPv6 Hop Limit by 1 in inner SRH
S08.       Decrement Segments Left by 1 in inner SRH
S09.       Update IPv6 DA with Segment List[Segments Left] in inner SRH
S10.       Submit the packet to the egress IPv6 FIB lookup and transmit
S11.      }
S12.      ELSE {
S13.           Drop the packet
S14.      }
S15.    }
S16. }
]]></artwork>
          </figure></t>
      </section>
    </section>

    <section title="Meta Data to Support Redundancy Protection">
      <t>To support the redundancy protection function, flow identification
      and sequence number are added in the packet and further used at merging
      node when the merging function is executed. Flow identification
      identifies one specific flow of redundancy protection, and is usually
      allocated from centralized controller to SR ingress node or redundancy
      node in SR network. Note that flow identification can also be allocated
      and advertised by merging node. BGP, PCEP or Netconf protocols can
      facilitate the advertisement and distribution of flow identification
      among controller, redundancy node and merging node. Sequence number
      distinguishes the packets within a flow by specifying the order of
      packets. Not like the uniqueness of flow identification to one specific
      flow, sequence number keeps changing to each packet within a flow. It is
      RECOMMENDED to add the sequence number in forwarding plane as
      performance and scalability is required.</t>

      <t>Figure 4 suggests an encapsulation of flow identification and
      sequence number in Segment Routing Header (SRH)<xref target="RFC8754"/>
      when redundancy protection is used in SRv6 network.<figure>
          <preamble/>

          <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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Next Header   |  Hdr Ext Len  |  Routing Type | Segments Left |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    Last Entry |    Flags      |     Tag (Sequence Number)     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   ~          Merging Segment (Locator+Function+Arg:Flow ID)       ~
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   ~                              ...                              ~
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   ~                  Segment List[n] (128 bits)                   ~
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>

          <postamble>Figure 4 Encapsulation of Flow Identification and
          Sequence Number</postamble>
        </figure></t>

      <t>Since the flow identification is only used at merging node to
      identify the specific flow of redundancy protection, it is RECOMMENDED
      to be encapsulated in the Arguments of Merging Segment in SRH. The
      length of flow identification is not limited, however in practice it is
      suggested to be 16 bits.</t>

      <t>All the duplicates of the same packet need to be tagged for
      deduplication at the merging node. For this purpose, we will use a
      sequence number. It is RECOMMENDED to encode the seq number in the Tag
      field of the SRH, with a length of 16bits.</t>
    </section>

    <section title="Segment Routing Policy to Support Redundancy Protection">
      <t>Redundancy Policy is a variation of SR Policy to conduct the replicas
      to multiple disjoint paths for redundancy protection. It extends SR
      policy <xref target="I-D.ietf-spring-segment-routing-policy"/> to
      include more than one active and parallel ordered lists of segments
      between redundancy node and merging node, and all the ordered lists of
      segments are used at the same time to steer each copy of flow into
      different disjoint paths.</t>
    </section>

    <section title="IANA Considerations">
      <t>This document requires registration of End.R behavior and End.M
      behavior in "SRv6 Endpoint Behaviors" sub-registry of "Segment Routing
      Parameters" registry.</t>
    </section>

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

    <section title="Acknowledgements">
      <t>The authors would like to thank Bruno Decraene, Ron Bonica, James
      Guichard, Jeffrey Zhang, Balazs Varga for their valuable comments and
      discussions.</t>
    </section>
  </middle>

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

      <?rfc include="reference.RFC.8986"
?>

      <?rfc include="reference.RFC.8174"?>

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

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

      <?target ?>

      <?target ?>
    </references>

    <references title="Informative References">
      <?rfc include='reference.RFC.8655'?>
    </references>
  </back>
</rfc>
