<?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-idr-ts-flowspec-srv6-policy-18"
     ipr="trust200902" updates="">
  <front>
    <title abbrev="FlowSpec with SR Policy">Traffic Steering using BGP
    FlowSpec with SR Policy</title>

    <author fullname="Wenying Jiang" initials="W. " surname="Jiang">
      <organization>China Mobile</organization>

      <address>
        <postal>
          <street>No.32 XuanWuMen West Street</street>

          <city>Beijing</city>

          <code>100053</code>

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

        <email>jiangwenying@chinamobile.com</email>
      </address>
    </author>

    <author fullname="Yisong Liu" initials="Y. " surname="Liu">
      <organization>China Mobile</organization>

      <address>
        <postal>
          <street>No.32 XuanWuMen West Street</street>

          <city>Beijing</city>

          <code>100053</code>

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

        <email>liuyisong@chinamobile.com</email>
      </address>
    </author>

    <author fullname="Shunwan Zhuang" initials="S." surname="Zhuang">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street>Huawei Bld., No.156 Beiqing Rd.</street>

          <city>Beijing</city>

          <region/>

          <code>100095</code>

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

        <phone/>

        <facsimile/>

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

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

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

      <address>
        <postal>
          <street>13101 Columbia Pike</street>

          <city>Silver Spring, MD 20904</city>

          <region/>

          <code/>

          <country>United States of America</country>
        </postal>

        <phone/>

        <facsimile/>

        <email>hayabusagsm@gmail.com</email>

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

    <author fullname="Shuanglong Chen" initials="S." surname="Chen">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street>Huawei Bld., No.156 Beiqing Rd.</street>

          <city>Beijing</city>

          <region/>

          <code>100095</code>

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

        <phone/>

        <facsimile/>

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

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

    <date day="5" month="September" year="2026"/>

    <area>Routing</area>

    <workgroup>IDR Working Group</workgroup>

    <abstract>
      <t>BGP Flow Specification (FlowSpec) provides mechanisms to distribute
      traffic filtering and steering rules across BGP networks. This document
      specifies BGP FlowSpec procedures to steer matching traffic flows into
      Segment Routing (SR) Policies. Specifically, it defines protocol
      mechanisms for combining FlowSpec NLRIs with specific BGP Extended
      Communities for transport policy steering (Mode 1) in SR-MPLS and SRv6
      networks, and optionally with the BGP Prefix-SID Attribute when egress
      service action execution is required (Mode 2) in SRv6 networks.</t>
    </abstract>

    <note 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>
    </note>
  </front>

  <middle>
    <section title="Introduction">
      <t>Segment Routing (SR) <xref target="RFC8402"/> leverages the source
      routing paradigm for both SR-MPLS <xref target="RFC8660"/> and SRv6
      <xref target="RFC8754"/><xref target="RFC8986"/>. An SR Policy <xref
      target="RFC9256"/> defines an explicit ordering of segments to steer
      traffic through a network, which may be instantiated locally or signaled
      via BGP SR Policy <xref target="RFC9830"/> or PCEP for SR Policy <xref
      target="RFC9862"/>.</t>

      <t>BGP Flow Specification (FlowSpec) <xref target="RFC8955"/><xref
      target="RFC8956"/><xref target="RFC9117"/> enables the dissemination of
      traffic filtering rules and associated actions using MP_REACH_NLRI /
      MP_UNREACH_NLRI <xref target="RFC4760"/> and Extended Community
      attributes <xref target="RFC4360"/>.</t>

      <t>This document specifies BGP FlowSpec mechanisms to steer matching
      traffic flows into an SR Policy <xref target="RFC9256"/>. It defines two
      operational modes:</t>

      <t><list style="symbols">
          <t>Transport Steering Only (Mode 1): Steers traffic into a transport
          SR Policy toward a target Endpoint.</t>

          <t>Steering with Egress Service Action (Mode 2): Steers traffic into
          an SRv6 Policy while conveying an Egress Service SID for egress
          service action processing (e.g., decapsulation and routing table
          lookup in a specific VRF or the global table, or L3 interface
          cross-connect, as defined in <xref target="RFC8986"/> and signaled
          via <xref target="RFC9252"/>).</t>
        </list>This document does not modify the base Segment Routing
      architecture <xref target="RFC8402"/> or SR Policy constructs <xref
      target="RFC9256"/>, but establishes the BGP FlowSpec interworking
      semantics for SR Policy steering.</t>
    </section>

    <section title="Definitions and Acronyms">
      <t/>

      <section title="Terminology">
        <t><list style="symbols">
            <t>Mode 1 (Transport Steering Only): Steering traffic into an SR
            Policy (SR-MPLS or SRv6) toward a target Endpoint solely for
            transport path selection.</t>

            <t>Mode 2 (Steering with Egress Service Action): Steering traffic
            into an SRv6 Policy toward a target Endpoint while executing an
            Egress Service SID function (e.g., decapsulation followed by
            routing table lookup via End.DT4/DT6/DT46, or L3 interface
            cross-connect via End.DX4/DX6 <xref target="RFC8986"/><xref
            target="RFC9252"/>) at the egress PE.</t>

            <t>Redirect-to-IP: The FlowSpec Redirect-to-IP Extended Community
            defined in <xref target="I-D.ietf-idr-flowspec-redirect-ip"/>.</t>
          </list></t>
      </section>

      <section title="Acronyms">
        <t><list style="symbols">
            <t>BGP FS: BGP Flow Specification <xref target="RFC8955"/><xref
            target="RFC8956"/><xref target="RFC9117"/></t>

            <t>EC: Extended Community <xref target="RFC4360"/></t>

            <t>LPM: Longest Prefix Match</t>

            <t>NLRI: Network Layer Reachability Information <xref
            target="RFC4271"/></t>

            <t>SID: Segment Identifier <xref target="RFC8402"/></t>

            <t>SR-MPLS: Segment Routing over MPLS data plane <xref
            target="RFC8660"/></t>

            <t>SRH: Segment Routing Header <xref target="RFC8754"/></t>

            <t>SRv6: Segment Routing over IPv6 data plane <xref
            target="RFC8754"/><xref target="RFC8986"/></t>

            <t>USD: Ultimate Segment Decapsulation (Flavor defined in <xref
            target="RFC8986"/>)</t>
          </list></t>
      </section>
    </section>

    <section title="Protocol Procedures">
      <t>BGP FlowSpec NLRI <xref target="RFC8955"/><xref target="RFC8956"/>
      can be combined with BGP Extended Communities and, where applicable, the
      BGP Prefix-SID Attribute to steer matching traffic into a Segment
      Routing (SR) Policy <xref target="RFC9256"/> in either SR-MPLS or SRv6
      data planes.</t>

      <t>This specification relies on a two-tier control plane
      architecture:</t>

      <t><list style="symbols">
          <t>Transport Steering: The Color Extended Community <xref
          target="RFC9012"/> is combined with the FlowSpec Redirect-to-IP
          Extended Community <xref
          target="I-D.ietf-idr-flowspec-redirect-ip"/> to form an explicit
          (Color, Endpoint) tuple. This tuple binds the matching FlowSpec
          traffic to an SR Policy (SR-MPLS or SRv6) at the head-end router
          (Ingress PE) <xref target="RFC9256"/>.</t>

          <t>Egress Service Action (SRv6-specific): For SRv6 scenarios
          requiring a specific egress service action (e.g., decapsulation and
          routing table lookup in a VRF or the global table, or L3 interface
          cross-connect, as defined in <xref target="RFC8986"/> and <xref
          target="RFC9252"/>) at the tailend router (Egress PE), the BGP
          Prefix-SID Attribute <xref target="RFC9252"/> may be attached to
          convey an SRv6 Service SID.</t>
        </list></t>

      <t>The procedures in this document apply strictly to IPv4 and IPv6
      FlowSpec address families in the global routing context (AFI=1/2,
      SAFI=133).</t>

      <section title="Operational Steering Modes">
        <t>Traffic steering specified in this document leverages BGP FlowSpec
        filtering rules to steer flows into SR Policies <xref
        target="RFC9256"/>.</t>

        <t>FlowSpec-based steering corresponds to Policy-Based Routing (PBR)
        steering per Section 8.7 of <xref target="RFC9256"/> and does not
        perform per- destination steering (Section 8.4 of <xref
        target="RFC9256"/>). Implementations MUST NOT apply per-destination
        route resolution, BGP multipath path selection, or On-Demand BSID
        recursion <xref target="RFC9256"/> to FlowSpec routes.</t>

        <t>A BGP FlowSpec sender MUST construct the BGP UPDATE message using
        one of two operational modes: Mode 1 (Transport Steering Only) or Mode
        2 (Steering with Egress Service Action).</t>

        <section title="Mode 1: Steering Without Egress Service Action (SR-MPLS / SRv6)">
          <t>When matching traffic requires steering into an SR Policy
          (SR-MPLS or SRv6) toward an Endpoint without a specific egress
          service action, Mode 1 steering applies:</t>

          <t><list style="symbols">
              <t>Sender Behavior: The sender MUST attach a Redirect-to-IP
              Extended Community and a Color Extended Community <xref
              target="RFC9012"/>, and MUST NOT attach the BGP Prefix-SID
              Attribute (see Section 4 for attribute validation).</t>

              <t>Headend Steering: Upon resolving the (Endpoint, Color) tuple
              per Section 4, the headend steers matching traffic into the
              resolved SR Policy by encapsulating it solely with the policy's
              segment list (MPLS label stack or SRH).</t>

              <t>Egress Behavior: Decapsulation or label popping at the egress
              PE relies on the final segment behavior of the target SR Policy
              (e.g., Implicit Null for SR-MPLS or End function with Ultimate
              Segment Decapsulation (USD) flavor <xref target="RFC8986"/> for
              SRv6).</t>
            </list></t>
        </section>

        <section title="Mode 2: Steering With Egress Service Action (SRv6-specific)">
          <t>When matching traffic requires steering into an SRv6 Policy and a
          specific service context or decapsulation behavior at the egress PE,
          Mode 2 steering applies:</t>

          <t><list style="symbols">
              <t>Sender Behavior: The sender MUST attach a Redirect-to-IP
              Extended Community, a Color Extended Community <xref
              target="RFC9012"/>, and the BGP Prefix-SID Attribute <xref
              target="RFC9252"/> carrying the Egress Service SID (encoded per
              Section 3.6).</t>

              <t>Headend Steering: The headend resolves the target SRv6 Policy
              using the (Endpoint, Color) tuple per Section 4, and synthesizes
              the active segment list in the SRH by combining the SR Policy
              segment list with the Egress Service SID per Section 3.3.</t>

              <t>Egress Behavior: Upon packet arrival, the egress PE
              decapsulates the SRH and executes the specific function bound to
              the Egress Service SID (e.g., End.DT4/DT6/DT46 for routing table
              lookup in a specific VRF or the global table, or End.DX4/DX6 for
              L3 interface cross-connect <xref target="RFC8986"/> <xref
              target="RFC9252"/>).</t>
            </list></t>
        </section>

        <section title="Data-Plane Encapsulation Considerations">
          <t>When matching traffic is successfully resolved and steered into
          an SR Policy or Segment Routing path, the headend encapsulates the
          packet with an outer header (e.g., an outer IPv6 header with an SRH
          for SRv6) as specified in <xref target="RFC8754"/> and <xref
          target="RFC9256"/>.</t>

          <t>If SRv6 SID compression (e.g., micro-segments <xref
          target="RFC9800"/>) is deployed within the SR domain, or if the
          resolved active segment list consists of a single Segment Identifier
          (SID), an explicit Segment Routing Header (SRH) MAY be omitted
          during IPv6 encapsulation in accordance with <xref
          target="RFC8754"/> and <xref target="RFC9800"/>.</t>
        </section>
      </section>

      <section title="Procedures for the Sending BGP Speaker / Controller">
        <t>A BGP speaker or controller originating or re-advertising a
        FlowSpec route to steer traffic into an SR Policy MUST perform the
        following:</t>

        <t><list style="numbers">
            <t>Construct the explicit (Color, Endpoint) tuple by attaching the
            Color Extended Community <xref target="RFC9012"/> and setting the
            target IP address in the Redirect-to-IP Extended Community <xref
            target="I-D.ietf-idr-flowspec-redirect-ip"/>.</t>

            <t>For Mode 2 steering (Section 3.1.2), attach the BGP Prefix-SID
            Attribute carrying the SRv6 Service SID constructed per Section
            3.6. For Mode 1 steering (Section 3.1.1), the BGP Prefix-SID
            Attribute MUST NOT be attached.</t>
          </list>A BGP speaker re-advertising a FlowSpec route MUST preserve
        these steering attributes unless local policy explicitly modifies
        them.</t>
      </section>

      <section title="Procedures for the Receiving BGP Speaker (Headend / Ingress PE)">
        <t>The procedures specified in this section apply exclusively to BGP
        FlowSpec receivers acting as SR Headends. Intermediate BGP speakers
        (e.g., Route Reflectors) that do not perform data-plane steering MUST
        transparently reflect and propagate FlowSpec routes and their attached
        attributes per <xref target="RFC8955"/> without attempting SR Policy
        binding.</t>

        <t>Upon receiving a FlowSpec route, the headend performs evaluation
        and forwarding programming strictly per the sequential logic in
        Section 4.1:</t>

        <t><list style="numbers">
            <t>Validation and Mode Determination: Syntactic validation follows
            <xref target="RFC7606"/> and <xref target="RFC8955"/>. Co-existing
            steering attributes dictate whether the route is Mode 1 or Mode 2
            per Section 4.1.</t>

            <t>SR Policy Binding &amp; Synthesis: The headend uses the
            extracted (Color, Endpoint) tuple to resolve an active SR Policy
            Candidate Path per Section 8.8.1 of <xref target="RFC9256"/>.<list
                style="symbols">
                <t>For Mode 1, traffic is encapsulated using the active
                Segment List.</t>

                <t>For Mode 2, the headend MUST synthesize the effective
                Segment List with the Egress Service SID extracted per <xref
                target="RFC9252"/> and Section 3.6 by applying one of the
                following rules:<list style="symbols">
                    <t>Replace: If the final segment of the resolved Segment
                    List is an Endpoint SID (e.g., End SID) belonging to the
                    target Egress PE that matches the Locator prefix (or
                    longest matching Locator mask) of the Egress Service SID,
                    the headend MUST replace that final segment with the
                    Egress Service SID.</t>

                    <t>Append: Otherwise (or if explicit path preservation is
                    required), the headend MUST append the Egress Service SID
                    as the final segment (innermost SID) of the Segment
                    List.</t>
                  </list></t>
              </list></t>
          </list><list style="empty">
            <t>Default Longest Prefix Match (LPM) redirection <xref
            target="I-D.ietf-idr-flowspec-redirect-ip"/> MUST NOT be applied
            when an SR Policy is successfully resolved. Non-steering FlowSpec
            actions in the same route remain applicable.</t>
          </list><list hangIndent="4" style="hanging">
            <t hangText="3.">Control Plane Retention &amp; Decoupling: If a
            matching active SR Policy cannot be resolved for a received
            FlowSpec route carrying an explicit steering intent, or if the
            resolved SR Policy subsequently transitions to Down state:<list
                style="symbols">
                <t>Control Plane: The FlowSpec route MUST be retained in the
                BGP Loc-RIB as a valid route (unless rendered invalid by
                standard BGP path validation rules) and MUST continue to be
                advertised to downstream BGP peers according to standard BGP
                path selection and propagation rules. The headend MUST NOT
                implicitly invalidate or withdraw the BGP FlowSpec route
                solely due to underlay transport-layer resolution or SR Policy
                failures.</t>

                <t>Forwarding Plane: The associated SR steering forwarding
                state (e.g., Policy-Based Routing / PBR entry or ACL action)
                MUST NOT be activated in the forwarding plane (FIB/TCAM), or
                MUST be marked as Down/Inactive. Flow traffic matching the
                FlowSpec filtering rules MUST be handled according to the
                configured local failure policy (e.g., Drop as specified in
                Section 3.7 and Section 4.3), preventing silent fallback to
                default IP forwarding.</t>
              </list></t>
          </list></t>
      </section>

      <section title="Interaction with Redirect-to-IP Extended Community">
        <t>When a FlowSpec route carries both a Color Extended Community <xref
        target="RFC9012"/> and a Redirect-to-IP Extended Community <xref
        target="I-D.ietf-idr-flowspec-redirect-ip"/>, the target IP address
        MUST be interpreted as the target SR Policy Endpoint to form the
        explicit (Color, Endpoint) tuple <xref target="RFC9256"/>.</t>

        <t>In accordance with Section 2.2.2 of <xref
        target="I-D.ietf-idr-flowspec-redirect-ip"/>, SR Policy steering
        defined herein takes precedence over default LPM IP redirection. LPM
        lookup toward the target IP address MUST NOT be performed when an SR
        Policy is resolved. If multiple Color Extended Communities are
        present, color evaluation and fallback follow Section 8.4.1 of <xref
        target="RFC9256"/>.</t>
      </section>

      <section title="Scope Constraints">
        <t>Steering procedures defined in this document strictly require an
        explicit (Color, Endpoint) tuple. Color-Only (CO) steering per Section
        8.8.1 of <xref target="RFC9256"/> is outside the scope of this
        specification. If a received route contains non-zero CO bits in the
        Color Extended Community, the receiver MUST treat CO bits as zero and
        attempt explicit (Color, Endpoint) matching. If no matching SR Policy
        exists, steering failure procedures (Section 3.7) apply.</t>

        <t>VPN FlowSpec address families (SAFI=134) and the Redirect-to-VRF
        Extended Community <xref target="RFC8955"/><xref target="RFC8956"/>
        are outside the scope of this document and MUST NOT be processed under
        these procedures.</t>
      </section>

      <section title="BGP Prefix-SID Attribute Encoding Rules">
        <t>The BGP Prefix-SID Attribute is used strictly for conveying SRv6
        Service SIDs in SRv6 Mode 2 (Section 3.1.2) and MUST NOT be attached
        for SR-MPLS. Encoding rules per <xref target="RFC9252"/> and <xref
        target="RFC8986"/> apply:</t>

        <t><list style="symbols">
            <t>SRv6 Service TLVs: The SRv6 L3 Service TLV (Type 5) MUST be
            used, containing an SRv6 SID Information Sub-TLV (Type 1). The
            SRv6 SID Structure Sub-Sub-TLV (Type 1) MAY be included. SRv6 L2
            Service TLVs (e.g., Type 6) MUST NOT be included for Layer 3
            FlowSpec (SAFI 133) and MUST be ignored if received, treating the
            route as lacking an Egress Service SID.</t>

            <t>Endpoint Behaviors: Supported codepoints are restricted to
            Layer 3 behaviors (End.DT4, End.DT6, End.DT46, End.DX4, End.DX6)
            <xref target="RFC8986"/>. Layer 2 and transit behaviors MUST NOT
            be used.</t>

            <t>Disallowance of Transposition: Transposition Schemes <xref
            target="RFC9252"/> MUST NOT be used because FlowSpec NLRIs lack an
            MPLS Label field. The full SRv6 Service SID MUST be encoded
            entirely within the SRv6 SID Information Sub-TLV.</t>
          </list></t>
      </section>

      <section title="Steering Failure and Fallback Procedures">
        <t>Steering failure scenarios are classified into two distinct
        operational cases: Attribute Incompleteness (Control Plane) and Policy
        Unavailability (Forwarding Plane).</t>

        <section title="Attribute Incompleteness (Control Plane Fallback)">
          <t>If a received FlowSpec route explicitly expresses SR steering
          intent (e.g., contains a BGP Prefix-SID Attribute, or an
          invalid/corrupted Color Extended Community) alongside a
          Redirect-to-IP Extended Community, but lacks a valid Color Extended
          Community, the steering intent for SR Policy selection is
          incomplete. In this scenario:</t>

          <t><list style="symbols">
              <t>The headend MUST NOT attempt to resolve or steer traffic into
              any default, fallback, or "null-color" SR Policy.</t>

              <t>Any attached BGP Prefix-SID Attribute MUST NOT be used for SR
              Policy steering.</t>

              <t>To prevent unintentional redirection and silent SLA
              violations, the headend MUST NOT fall back to standard
              Redirect-to-IP forwarding for such incomplete SR routes. The
              matching traffic MUST be processed according to Section 4.3
              (i.e., dropped or handled per local failure policy).</t>
            </list>Note: A FlowSpec route containing solely a valid
          Redirect-to-IP Extended Community (without any SR-specific
          attributes or invalid Color ECs) represents standard IP redirection
          and MUST be processed per <xref
          target="I-D.ietf-idr-flowspec-redirect-ip"/>.</t>
        </section>

        <section title="Policy and SID Resolution Failures (Forwarding Plane Failure)">
          <t>If a FlowSpec route contains both a valid Redirect-to-IP Extended
          Community and a Color Extended Community (expressing explicit SR
          steering intent), but:</t>

          <t><list style="symbols">
              <t>The corresponding (Endpoint, Color) SR Policy is Down,
              unresolvable, or not programmed in the forwarding plane; or</t>

              <t>The target SR Policy is active, but the Egress Service SID
              (Prefix-SID) carried in the BGP Prefix-SID Attribute (Mode 2) is
              unreachable in the headend's local routing table (FIB/RIB);</t>
            </list>Then, to prevent silent SLA violations and unexpected path
          leakage, the headend MUST NOT silently fall back to shortest-path IP
          forwarding toward the Target IP address.</t>

          <t>Matching traffic MUST be processed according to local
          administrative failure policy. The default local action SHOULD be to
          drop the matching traffic (Drop-on-Failure).</t>

          <t>Other non-steering FlowSpec actions present in the same route
          (e.g., Traffic-Rate, DSCP remarking) MUST continue to be
          enforced.</t>
        </section>
      </section>

      <section title="Handling of the Redirect-to-IP C-bit">
        <t>The Redirect-to-IP Extended Community <xref
        target="I-D.ietf-idr-flowspec-redirect-ip"/> includes a C-bit (Copy
        Bit) in its Local Administrator field:</t>

        <t><list style="symbols">
            <t>C-bit = 0 (Direct Redirection): Matching packets MUST be
            encapsulated and steered into the resolved SR Policy, bypassing
            normal IP routing.</t>

            <t>C-bit = 1 (Traffic Copying): The headend MUST duplicate
            matching packets. The original packet continues along normal IP
            routing without encapsulation, while the copy is encapsulated and
            steered into the resolved SR Policy per Section 3.1.</t>
          </list>Setting C-bit = 1 does not alter SR Policy resolution logic;
        (Endpoint, Color) resolution and BGP Prefix-SID Attribute processing
        remain unchanged for the copied stream.</t>
      </section>

      <section title="Load Balancing Considerations">
        <t>When matching traffic is steered into an SR Policy with multiple
        active Segment Lists <xref target="RFC9256"/>, the headend MUST
        distribute traffic across active Segment Lists according to their
        defined weights (ECMP/UCMP). FlowSpec filtering actions direct traffic
        into the policy as a single aggregate stream and MUST NOT alter
        Segment List selection.</t>

        <t>For both SR-MPLS and SRv6, multipath hashing MUST use inner packet
        fields (e.g., 5-tuple). In SRv6 scenarios, the outer IPv6 Flow Label
        MUST NOT be overwritten by FlowSpec rules and SHOULD be computed from
        inner packet fields per Section 5.5 of <xref target="RFC8754"/> to
        prevent hash polarization. If the headend lacks line-rate capabilities
        to compute the IPv6 Flow Label from inner packet fields, the headend
        MAY set the Flow Label to zero or a fixed value, provided that
        entropy-based load balancing is handled by downstream SRv6 transit
        nodes or alternative path hashing mechanisms.</t>
      </section>

      <section title="Backward Compatibility and Coexistence">
        <t>A non-supporting BGP speaker that implements base FlowSpec <xref
        target="RFC8955"/><xref target="RFC8956"/> and Redirect-to-IP, but not
        this specification, processes updates under standard protocol
        rules:</t>

        <t><list style="symbols">
            <t>Attribute Pass-Through: As an optional transitive attribute, an
            unrecognized BGP Prefix-SID Attribute is propagated unmodified to
            peers per <xref target="RFC4271"/> and <xref
            target="RFC9252"/>.</t>

            <t>Forwarding Fallback on non-supporting headends: A
            non-supporting headend ignores unrecognized BGP Prefix-SID
            Attributes <xref target="RFC4271"/> and falls back to default
            Redirect-to-IP behavior <xref
            target="I-D.ietf-idr-flowspec-redirect-ip"/>.</t>
          </list>To prevent unintended forwarding paths due to fallback,
        implementations MUST support administrative controls to enable or
        disable advertisement of SRv6 service steering attributes per neighbor
        and per service <xref target="RFC9252"/>. Operators SHOULD apply
        attribute filtering at domain boundaries per Section 3.2.1 of <xref
        target="RFC9252"/>. An exception to this SHOULD requirement occurs
        when multiple BGP domains (e.g., multiple ASes) reside within a single
        administrative control domain where end-to-end SRv6 policy propagation
        across domain boundaries is explicitly intended. In such controlled
        deployments, boundary filtering MAY be relaxed, provided that strict
        ingress filtering remains enforced at the untrusted edge of the single
        administrative domain.</t>
      </section>
    </section>

    <section title="Multi-Attribute Interworking and Steering Resolution">
      <t>When a router receives a BGP FlowSpec route carrying a combination of
      the Redirect-to-IP Extended Community, the Color Extended Community, and
      the BGP Prefix-SID Attribute, it MUST evaluate these attributes in a
      sequential pipeline to resolve the steering action.</t>

      <section title="Sequential Resolution Logic">
        <t>The headend evaluates received attribute containers
        step-by-step:</t>

        <t>Step 1: Redirect-to-IP Extended Community</t>

        <t><list style="symbols">
            <t>Absent: Procedures in this document do not apply. Process route
            per standard BGP FlowSpec <xref target="RFC8955"/><xref
            target="RFC8956"/>.</t>

            <t>Present: Extract target IP as SR Policy Endpoint, process C-bit
            (Section 3.8), and proceed to Step 2.</t>
          </list>Step 2: Color Extended Community</t>

        <t><list style="symbols">
            <t>Absent: Check for other explicit SR steering attributes.<list
                style="symbols">
                <t>If the route contains a BGP Prefix-SID Attribute, or
                contains an unparseable/malformed Color Extended Community,
                the steering intent for SR Policy selection is considered
                incomplete. The headend MUST NOT steer traffic into an SR
                Policy, MUST ignore the BGP Prefix-SID Attribute, and MUST
                process the matching traffic according to Section 4.3 (i.e.,
                dropped or handled per local failure policy, rather than
                falling back to standard Redirect-to-IP forwarding).</t>

                <t>If the route contains solely a valid Redirect-to-IP
                Extended Community and no SR-specific attributes (e.g., no BGP
                Prefix-SID Attribute), the route represents standard IP
                redirection. The headend MUST process the route per <xref
                target="I-D.ietf-idr-flowspec-redirect-ip"/> (out of scope for
                SR Policy steering defined in this document).</t>
              </list></t>

            <t>Present: Extract Color value C to form the (Endpoint, Color)
            tuple, and proceed to Step 3.</t>
          </list>Step 3: BGP Prefix-SID Attribute (PSID)</t>

        <t><list style="symbols">
            <t>Note: This step applies when steering into an SRv6 Policy
            (regardless of whether the Endpoint is encoded as an IPv4 or IPv6
            address <xref target="RFC9256"/>).</t>

            <t>Absent (Mode 1): Resolve and steer traffic into the SR Policy
            corresponding to (Endpoint, Color) per Section 3.3.</t>

            <t>Present (Mode 2):<list style="symbols">
                <t>For SRv6 Steering: Extract the Egress Service SID from the
                PSID, resolve the SR Policy via (Endpoint, Color), and
                synthesize the active segment list per Section 3.3 and Section
                3.6.</t>

                <t>For SR-MPLS Steering: In accordance with Section 3.6, the
                BGP Prefix-SID Attribute MUST NOT be used for SR-MPLS
                steering. If the resolved (Endpoint, Color) tuple maps to an
                SR-MPLS Policy, the headend MUST ignore the BGP Prefix-SID
                Attribute, process the route as Mode 1 (Section 3.3), and
                SHOULD generate a diagnostic log entry.</t>
              </list></t>
          </list></t>
      </section>

      <section title="Valid Attribute Combinations Summary">
        <t>Table 1 summarizes all possible attribute combinations and their
        corresponding resolution modes after applying the sequential logic
        above.</t>

        <t><figure anchor="Deterministic_Interworking_Matrix"
            suppress-title="true" title="">
            <artwork align="left"><![CDATA[
Table 1: FlowSpec to SR Policy Steering Resolution

+-------------+----------+-----------+------------------------------+
| Redirect-   | Color EC | Prefix-SID| Steering Resolution Mode     |
| to-IP       |          |           |                              |
+-------------+----------+-----------+------------------------------+
| Present     | Present  | Absent    | Mode 1: Transport Steering   |
|             |          |           | (SR-MPLS / SRv6 USD)         |
+-------------+----------+-----------+------------------------------+
| Present     | Present  | Present   | Mode 2: Transport Steering + |
|             |          |           | Egress Service Action (SRv6) |
+-------------+----------+-----------+------------------------------+
| Present     | Invalid/ | Any*      | Incomplete Steering Intent:  |
|             | Missing* |           | Drop / Local Failure Policy  |
|             |          |           | (Section 3.7.1 / 4.3)        |
+-------------+----------+-----------+------------------------------+
| Present     | Absent   | Absent    | Out of Scope for SR Policy   |
|             |          |           | (Standard Redirect-to-IP)    |
+-------------+----------+-----------+------------------------------+
| Absent      | Ignored  | Ignored   | Out of Scope for SR Policy   |
|             |          |           | (Standard FlowSpec)          |
+-------------+----------+-----------+------------------------------+

* Note: "Invalid/Missing" refers to scenarios where explicit SR
  steering intent is present (e.g., carries a BGP Prefix-SID
  Attribute or a malformed/unparseable Color EC) but lacks a valid
  Color Extended Community. In such cases, the Prefix-SID state is
  marked as "Any" because steering intent is considered incomplete
  regardless of whether the BGP Prefix-SID Attribute is Present or
  Absent.
]]></artwork>
          </figure></t>
      </section>

      <section title="Protection Against Silent SLA Violations">
        <t>To prevent unintentional redirection and SLA violations,
        implementations MUST strictly enforce the following rules:</t>

        <t><list style="numbers">
            <t>Handling Invalid Steering Intent and Unreachable SIDs: If a
            route expresses SR steering intent (e.g., contains a Prefix-SID
            Attribute or a Color Extended Community) but required steering
            attributes (such as a valid Color EC) are invalid or incomplete,
            OR if the associated Egress Service SID (or its covering SRv6
            Locator prefix) is unreachable in the local routing table, the
            receiver MUST NOT fall back to standard IP forwarding or
            Redirect-to-IP forwarding toward the target IP address. Matching
            traffic MUST be dropped or processed per local failure policy.</t>

            <t>Enforcement of Non-Steering Actions: In all failure cases,
            other valid non-steering actions present in the FlowSpec route
            (e.g., Traffic-Rate/Drop <xref target="RFC8955"/>, DSCP remarking)
            MUST continue to be enforced in the forwarding plane.</t>

            <t>Multiple Redirect-to-IP Communities: When multiple valid
            Redirect-to-IP Extended Communities are attached alongside a Color
            Extended Community, load-sharing across the resulting target SR
            Policies MUST follow EC-level load-sharing defined in Section 2.2
            of <xref target="I-D.ietf-idr-flowspec-redirect-ip"/>.</t>

            <t>Logging and Diagnostics: Implementations SHOULD generate
            diagnostic log entries whenever an SR Policy steering route
            contains corrupted or invalid steering attributes. An exception to
            this SHOULD requirement occurs during high-volume error events or
            flood conditions (e.g., malformed route injection attacks), where
            strict per-route logging could exhaust control plane CPU or
            storage resources. In such scenarios, implementations MAY
            rate-limit, aggregate, or temporarily suppress individual
            diagnostic log entries, provided that summary metrics or
            counter-based telemetry remain available to operators.</t>
          </list></t>

        <t/>
      </section>
    </section>

    <section title="Operational Considerations">
      <t>Deploying BGP FlowSpec for SR-MPLS and SRv6 Policies provides a
      lightweight mechanism to dynamically steer specified traffic flows into
      Segment Routing paths without requiring full-mesh state maintenance or
      complex per-flow manual provisioning across distributed nodes, thereby
      ensuring minimal impact on network operations and control plane
      scalability.</t>

      <t>The mechanisms defined in this document are scoped strictly for
      deployment within an SR Trusted Domain under unified administrative
      control (which may span single or multiple ASes). As detailed in Section
      6.3, network operators MUST enforce BGP trust boundaries at domain
      ingress/egress interfaces to filter unauthorized FlowSpec routes
      carrying SR-related Extended Communities or BGP Prefix-SID attributes,
      preventing unauthorized traffic steering or label/SID injection outside
      the trusted domain, except where explicitly relaxed across BGP domain
      boundaries within a single administrative domain per Section 3.10.</t>

      <t>For concrete application scenarios, detailed flow steering sequences,
      and an overall operational workflow summary, readers should refer to
      Appendix A (with a high-level summary provided in Section A.2.3).</t>

      <t>When a headend router fails to program a FlowSpec SR Policy steering
      entry into the forwarding plane (Section 3.7.2), or when a received
      FlowSpec route contains incomplete steering intent resulting in traffic
      dropping (Section 3.7.1 and Section 4.3), the implementation SHOULD make
      relevant diagnostic information available to operators. This includes
      generating appropriate management notifications, such as YANG
      subscription notifications <xref target="RFC8639"/>, Syslog messages
      <xref target="RFC5424"/>, or SNMP notifications <xref
      target="RFC3411"/>, detailing the affected FlowSpec NLRI, the associated
      (Color, Endpoint) tuple (if present), and the specific failure reason
      (e.g., missing Color EC, unresolvable SR Policy, or forwarding resource
      exhaustion). An exception to this SHOULD requirement occurs during rapid
      sequence failures, route flood conditions, or resource exhaustion
      storms, where notification rate-limiting, aggregation, or suppression
      MAY be applied to protect control plane stability (Section 4.3).</t>

      <t>Implementations SHOULD monitor forwarding plane resource
      availability. When sufficient resources become available, the router
      SHOULD automatically re-attempt to program any previously uninstalled
      FlowSpec steering entries. An exception occurs if an administrative
      policy explicitly disables auto-recovery or if rapid retry thrashing is
      detected; in such cases, implementations MAY apply backoff timers or
      require manual operator intervention before retrying.</t>

      <t>Implementations SHOULD also provide hardware or software counter
      metrics (e.g., byte/packet drop counters) associated with uninstalled,
      programming-failed, or intentionally dropped FlowSpec steering entries
      (due to incomplete intent) for operational visibility. An exception
      occurs when underlying hardware forwarding platforms lack granular
      per-entry counter registers; in such cases, implementations MAY provide
      aggregated software-level counters instead.</t>
    </section>

    <section title="Security Considerations">
      <t>The security considerations of BGP FlowSpec <xref
      target="RFC8955"/><xref target="RFC8956"/>, Redirect-to-IP <xref
      target="I-D.ietf-idr-flowspec-redirect-ip"/>, BGP Prefix-SID <xref
      target="RFC9252"/>, and core Segment Routing <xref target="RFC8402"/>
      apply to this document. Combining FlowSpec redirection with SR Policy
      selection and SRv6 Service SIDs introduces specific threat vectors that
      MUST be mitigated.</t>

      <section title="Cross-Table/VRF Traffic Injection and Service Hijacking">
        <t>The BGP Prefix-SID Attribute in a FlowSpec route conveys an SRv6
        Service SID (e.g., End.DT4/DT6/DT46, End.DX4/DX6 <xref
        target="RFC8986"/><xref target="RFC9252"/>) that determines the egress
        routing table (e.g., a specific VRF or the global table) or specific
        egress interface at the egress PE. A malicious or compromised speaker
        could steer traffic into an arbitrary remote VRF, the global routing
        context, or an unauthorized interface, causing unauthorized traffic
        injection, cross-table/VRF data leakage, or traffic interception.</t>

        <t>To mitigate this, receiving PEs MUST validate that any SRv6 Service
        SID belongs to an authorized Locator range allocated for the target
        VRF, global table, or service context. BGP sessions with FlowSpec
        controllers MUST be secured using TCP-AO <xref target="RFC5925"/> and
        restricted to trusted entities.</t>
      </section>

      <section title="Scope and Validation Limits of BGP FlowSpec Attributes">
        <t>Standard BGP FlowSpec validation <xref target="RFC8955"/><xref
        target="RFC8956"/><xref target="RFC9117"/> validates the NLRI and
        Redirect-to-IP Extended Community against the origin of the
        destination prefix, but does not define validation for the Color
        Extended Community or BGP Prefix-SID Attribute. These unvalidated
        attributes dictate path selection and service contexts.</t>

        <t>An attacker could alter or strip these attributes. Injecting an
        unauthorized Color EC could hijack traffic onto unintended SR paths.
        Conversely, stripping the Color EC from an SR-steering FlowSpec route
        causes an incomplete intent condition (Section 3.7.1), triggering drop
        behavior and resulting in a Denial of Service (DoS) for legitimate
        redirected traffic.</t>

        <t>Headends MUST apply local policy checks to verify that the (Color,
        Endpoint) tuple resolves to an authorized SR Policy before binding
        traffic. Implementations MUST filter, strip, or reject unknown or
        unauthorized Color Extended Communities and BGP Prefix-SID Attributes
        at administrative boundaries. Implementations SHOULD generate log
        messages or management alarms when unexpected attribute stripping is
        detected. An exception to this SHOULD requirement occurs during
        high-volume route thrashing, rapid update sequences, or flood
        conditions, where logging rate-limiting, aggregation, or suppression
        MAY be applied to protect control plane stability.</t>
      </section>

      <section title="SR Domain Leakage and Boundary Security">
        <t>SRv6 SIDs and BGP Prefix-SID Attributes are intended strictly for
        use within a trusted SR domain <xref target="RFC8402"/><xref
        target="RFC8754"/><xref target="RFC8986"/><xref target="RFC9252"/>.
        Propagation across untrusted EBGP boundaries leaks internal SRv6
        Locators and topology, exposing the domain to external steering
        attacks.</t>

        <t>Autonomous System Border Routers (ASBRs) MUST filter or strip the
        BGP Prefix-SID Attribute and SRv6-related Extended Communities from
        BGP FlowSpec routes traversing administrative boundaries. An exception
        occurs when multiple BGP Autonomous Systems reside within a single
        administrative control domain with explicit inter-domain trust
        agreements, as specified in Section 3.10; in such controlled
        deployments, boundary filtering MAY be relaxed provided strict ingress
        filtering remains enforced at the untrusted domain edge.</t>
      </section>

      <section title="Traffic Amplification and Path Pinning">
        <t>A single FlowSpec route can match high-volume distributed flows
        across multiple Ingress PEs and redirect them to a single destination
        <xref target="RFC9117"/>. Binding redirected flows to an SR Policy
        allows an attacker to pin amplified traffic to a specific engineered
        path, potentially overloading transit nodes or egress interfaces.</t>

        <t>Ingress PEs SHOULD combine FlowSpec redirect actions with Traffic
        Rate Extended Communities <xref target="RFC8955"/> to bound redirected
        bandwidth. An exception to this SHOULD requirement occurs when a
        FlowSpec route is deployed for legitimate traffic steering and rate
        limiting would cause unwanted packet drops, where adequate capacity
        planning guarantees sufficient bandwidth along the candidate path.</t>

        <t>Implementations SHOULD monitor path utilization on SR Policies used
        for FlowSpec steering to detect and mitigate link congestion
        dynamically. An exception to this SHOULD requirement occurs in
        centralized control plane architectures where automated
        Controller-based TE or PCE monitoring dynamically adjusts policy
        pathing and prevents link congestion automatically.</t>
      </section>
    </section>

    <section title="Implementation Status">
      <t>[Note to the RFC Editor: Please remove this section before
      publication, as well as remove the reference to <xref
      target="RFC7942"/>. This section records the status of known
      implementations of the protocol defined by this specification at the
      time of posting of this Internet-Draft, and is based on a proposal
      described in <xref target="RFC7942"/>. The description of
      implementations in this section is intended to assist the IETF in its
      decision 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 <xref target="RFC7942"/>, "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>

      <section title="Interop-test Status">
        <t>The traffic steering mechanism using BGP FlowSpec with SR-MPLS and
        SRv6 Policies described in this specification has been implemented by
        multiple major networking vendors across hardware platforms, router
        operating systems, and SDN controllers.</t>

        <t>These implementations successfully participated in multi-vendor
        joint interoperability testing events organized by China Mobile
        between July 2021 and October 2021. The following hardware devices,
        software versions, and controllers passed the interoperability suite
        (listed in alphabetical order by vendor):</t>

        <t><figure>
            <artwork align="left"><![CDATA[Routers:
+---------+---------------+--------------------------------+
| Vendor  | Device Model  | Version                        |
+---------+---------------+--------------------------------+
| Huawei  | NE40E-X8A     | NE40E V800R021C00SPC091T       |
+---------+---------------+--------------------------------+
| New H3C | CR16010H-FA   | Version 7.1.075, ESS 8305      |
+---------+---------------+--------------------------------+
| Ruijie  | RG-N8010-R    | N8000-R_RGOS 12.8(1)B08T1      |
+---------+---------------+--------------------------------+
| ZTE     | M6000-8S Plus | V5.00.10(5.60.5)               |
+---------+---------------+--------------------------------+

Controllers:
+----------------+---------------+-------------------------+
| Vendor         | System Name   | Version                 |
+----------------+---------------+-------------------------+
| China Unitechs | I-T-E SC      | V1.3.6P3                |
+----------------+---------------+-------------------------+
| Huawei         | NCE-IP        | V100R021C00             |
+----------------+---------------+-------------------------+
| Ruijie         | RG-ONC-AIO-H  | RG-ION-WAN-CLOUD_2.00T1 |
+----------------+---------------+-------------------------+
| ZTE            | ZENIC ONE     | R22V16.21.20            |
+----------------+---------------+-------------------------+
]]></artwork>
          </figure></t>

        <t/>
      </section>

      <section title="Deployment Status">
        <t>The mechanisms specified in this document have been natively
        deployed and in active production use on large-scale IP backbone
        networks, including China Mobile's production network, since August
        2022.</t>

        <t>In production deployments featuring pure SRv6 architectures,
        traffic steering driven by FlowSpec routes with Color Extended
        Communities and IPv6 Redirect addresses operates seamlessly over SRv6
        Policies. In hybrid or multi-AS network environments where SR-MPLS and
        SRv6 coexist, policy selection for FlowSpec traffic steering adheres
        strictly to the steering framework defined in <xref
        target="RFC9256"/>.</t>
      </section>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>This document requires no IANA actions.</t>
    </section>

    <section title="Contributors ">
      <t>The following people made significant contributions to this
      document:</t>

      <t><figure>
          <artwork align="left"><![CDATA[Yunan Gu
Huawei Technologies
Email: guyunan@huawei.com

Haibo Wang
Huawei Technologies
Email: rainsword.wang@huawei.com

Jie Dong
Huawei Technologies
Email: jie.dong@huawei.com

Xue Yang
China Mobile
Email: yangxuewl@chinamobile.com
]]></artwork>
        </figure></t>
    </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>The authors would like to thank:</t>

      <t><list style="symbols">
          <t>Nat Kao for suggesting the inclusion of SR-MPLS use cases and
          providing detailed recommendations regarding failure and fallback
          procedures.</t>

          <t>Ketan Talaulikar for his in-depth review and valuable input,
          which substantially enhanced the precision and overall quality of
          this document.</t>

          <t>Donald E. Eastlake, 3rd for his thorough review and insightful
          suggestions.</t>
        </list>The authors also gratefully acknowledge the reviews, comments,
      and contributions from Jeffrey Haas, Susan Hares, Keyur Patel, Weiqiang
      Cheng, Kaliraj Vairavakkalai, Robin Li, Acee Lindem, Gunter Van De
      Velde, John Scudder, Rainbow Wu, Linda Dunbar, Gang Yan, Feng Yang, Wim
      Henderickx, Robert Raszuk, Changwang Lin, Aijun Wang, Hao Li, Huaimo
      Chen, Sheng Fang, Yuanxiang Qiu, Ran Chen, Cheng Li, Zheng Zhang
      (Sandy), Xuewei Wang, Yanrong Liang, Xuhui Cai, Haojie Wang, Lili Wang,
      Nan Geng, Stephane Litkowski, Zhenqiang Li, Jinming Li, Shengnan Yue,
      Yao Liu, Yujia Gao, Zhiyuan Wang, Guanming Zeng, Jianwei Mao, Xiaoming
      He, Ziqing Cao and Giuseppe Fioccola.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include='reference.I-D.ietf-idr-flowspec-redirect-ip'?>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      <?rfc include='reference.RFC.9256'?>
    </references>

    <references title="Informative References">
      <?rfc include='reference.RFC.3411'?>

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

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

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

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

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

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

      <?rfc include='reference.RFC.9862'?>
    </references>

    <section title="Application Examples (Informative)">
      <t>This section provides illustrative examples for steering BGP FlowSpec
      traffic into SR Policies in SR-MPLS and SRv6 networks per Section 3 and
      Section 4.</t>

      <section title="SR-MPLS Steering Example (Mode 1)">
        <t><xref target="SR_MPLS_Policy_Case"/> illustrates steering FlowSpec
        traffic into an SR-MPLS Policy without egress service actions (Section
        3.1.1).</t>

        <t><figure anchor="SR_MPLS_Policy_Case"
            title="Steering Traffic into SR-MPLS Policy (Mode 1)">
            <artwork align="center"><![CDATA[
   +------------+
   |  BGP FS    |
   | Controller |
   +------------+
      | FlowSpec Route:
      |   NLRI: Filter Rules
      |   Redirect-to-IP: Tailend Address
      |   Color EC: C0
      |   (Prefix-SID: Absent)
      |          .-----.
      |         (       )
      V     .--(         )--.
+-------+  (                 )  +-------+
|       |_(  SR-MPLS Network  )_|       |
|Headend| ( ================> ) |Tailend|
+-------+  (SR List<S1,S2,S3>)  +-------+
            '--(         )--'   
                (       )       
                 '-----'

]]></artwork>
          </figure></t>

        <t>Control Plane: The BGP FS Controller advertises a FlowSpec route
        with matching rules, Redirect-to-IP (Tailend Address), and Color C0.
        The BGP Prefix-SID Attribute is omitted.</t>

        <t>Headend Resolution: The headend resolves the SR-MPLS Policy
        matching the tuple (Endpoint: Tailend, Color: C0).</t>

        <t>Encapsulation: Matching traffic is encapsulated into the policy's
        MPLS label stack:</t>

        <t><figure anchor="MPLS_label_stack" suppress-title="true" title="">
            <artwork align="center"><![CDATA[+---------------------------------------------+
| Outer IP / Ethernet Header                  |
+---------------------------------------------+
| MPLS Label S1 (Top)                         |
| MPLS Label S2                               |
| MPLS Label S3 (Bottom with S=1)             |
+---------------------------------------------+
| Inner Payload (Original IPv4/IPv6 Packet)   |
+---------------------------------------------+
]]></artwork>
          </figure></t>
      </section>

      <section title="SRv6 Steering Examples">
        <t>In SRv6 networks, FlowSpec traffic steering operates under either
        Mode 2 (Transport Steering with Egress Service Action) or Mode 1
        (Transport Steering Only).</t>

        <section title="SRv6 Mode 2: Transport Steering with Egress Service Action">
          <t><xref target="SRv6_Policy_Case1"/> illustrates signaling an
          explicit egress service action (Egress_Service_SID) alongside
          transport steering (Section 3.1.2).</t>

          <t><figure anchor="SRv6_Policy_Case1"
              title="Steering Traffic into SRv6 Policy with Egress Service Action (Mode 2)">
              <artwork align="center"><![CDATA[
   +------------+
   |  BGP FS    |
   | Controller |
   +------------+
      | FlowSpec Route:
      |   NLRI: Filter Rules
      |   Redirect-to-IPv6: Tailend Address
      |   Color EC: C1
      |   Prefix-SID: Egress_Service_SID
      |          .-----.
      |         (       )
      V     .--(         )--.
+-------+  (                 )  +-------+
|       |_( SRv6 Core Network )_|       |
|Headend| ( ================> ) |Tailend|
+-------+  (SR List<S1,S2,S3>)  +-------+
            '--(         )--'   SRv6 SID: Egress_Service_SID
                (       )       (e.g., End.DT4, End.DT6, etc.)
                 '-----'

]]></artwork>
            </figure></t>

          <t>Control Plane &amp; Resolution: The route carries Color C1,
          Redirect-to-IPv6 (Tailend Address), and a BGP Prefix-SID Attribute
          carrying Egress_Service_SID. The headend resolves the SRv6 Policy
          matching (Endpoint: Tailend, Color: C1), yielding candidate Segment
          List &lt;S1, S2, S3&gt;.</t>

          <t>Segment List Synthesis (Section 3.3):</t>

          <t><list style="symbols">
              <t>Scenario A (Locator Match / Replacement): If
              Egress_Service_SID shares the SRv6 Locator of S3 (e.g., S3 is an
              End/End.X SID allocated from the same Locator), S3 is replaced,
              yielding the synthesized Segment List &lt;S1, S2,
              Egress_Service_SID&gt;.</t>

              <t>Scenario B (No Locator Match / Appending): Otherwise,
              Egress_Service_SID is appended, yielding the synthesized Segment
              List &lt;S1, S2, S3, Egress_Service_SID&gt;.</t>
            </list></t>

          <t>Packet Encapsulation Format:</t>

          <t>At the headend, matching traffic is encapsulated into an outer
          IPv6 header and SRH with the corresponding synthesized Segment
          List:</t>

          <t><figure anchor="Mode_2_A_B" suppress-title="true" title="">
              <artwork align="center"><![CDATA[
+-----------------------------------------------------+
| Outer IPv6 Header (DA = S1)                         |
+-----------------------------------------------------+
| SRH (Segments Left = 2 for Scenario A,              |
|      Segments Left = 3 for Scenario B)              |
|   Segment List: <S1, S2, Egress_Service_SID> (A)    |
|             OR: <S1, S2, S3, Egress_Service_SID> (B)|
+-----------------------------------------------------+
| Inner Payload (Original IPv4/IPv6 Packet)           |
+-----------------------------------------------------+
]]></artwork>
            </figure></t>

          <t>Upon reaching the tailend device, the packet is decapsulated and
          processed per the function denoted by Egress_Service_SID (e.g.,
          routing table lookup in a specific VRF or the global table, such as
          End.DT4/DT6 <xref target="RFC8986"/>).</t>
        </section>

        <section title="SRv6 Mode 1: Transport Steering Only (USD-Flavored End SID)">
          <t>When the final SID S3 instantiated on the tailend supports the
          Ultimate Segment Decapsulation (USD) flavor <xref
          target="RFC8986"/>, an explicit Egress Service SID MAY be omitted
          from the FlowSpec route.</t>

          <t><figure anchor="SRv6_Policy_Case2"
              title="Steering Traffic into SRv6 Policy (Mode 1)">
              <artwork align="center"><![CDATA[
   +------------+
   |  BGP FS    |
   | Controller |
   +------------+
      | FlowSpec Route:
      |   NLRI: Filter Rules
      |   Redirect-to-IPv6: Tailend Address
      |   Color EC: C2
      |   (Prefix-SID: Absent)
      |          .-----.
      |         (       )
      V     .--(         )--.
+-------+  (                 )  +-------+
|       |_( SRv6 Core Network )_|       |
|Headend| ( ================> ) |Tailend|
+-------+  (SR List<S1,S2,S3>)  +-------+
            '--(         )--'    
                (       )       
                 '-----'
Note: S3 is an SRv6 SID with USD flavor on the tailend.
]]></artwork>
            </figure></t>

          <t>The controller advertises the route with Color C2 and
          Redirect-to-IPv6 without a BGP Prefix-SID. The headend encapsulates
          traffic using Segment List &lt;S1, S2, S3&gt;. Upon arrival, the
          tailend executes USD behavior, pops the outer IPv6 header/SRH, and
          performs standard table lookup on the inner packet in the
          default/global routing context.</t>
        </section>

        <section title="Summary of Operational Workflow">
          <t>In typical network operations:</t>

          <t><list style="numbers">
              <t>The Centralized Controller maintains full visibility of
              topology and SR Policies across the network domain.</t>

              <t>When dynamic traffic steering or mitigation is triggered, the
              Controller advertises a FlowSpec route combining packet matching
              criteria with explicit steering attributes (Color EC,
              Redirect-to-IP, and optional BGP Prefix-SID Attribute).</t>

              <t>Ingress PEs parse these received attributes, resolve and bind
              the matching traffic to the designated SR Policies, and
              synthesize the encapsulation headers dynamically without
              requiring manual per-flow provisioning across distributed
              nodes.</t>
            </list></t>
        </section>
      </section>
    </section>
  </back>
</rfc>
