<?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-wu-idr-flowspec-redirect-group-01"
     ipr="trust200902">
  <front>
    <title abbrev="Flowspec Redirect Load Balancing">BGP Flowspec Redirect
    Load Balancing Group Community</title>

    <author fullname="Zhiwen Wu" initials="Z." surname="Wu">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street>No. 156 Beiqing Road</street>

          <city>Beijing</city>

          <region/>

          <code>100095</code>

          <country>P.R. China</country>
        </postal>

        <phone/>

        <facsimile/>

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

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

    <author fullname="Haibo Wang" initials="H." surname="Wang">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street>No. 156 Beiqing Road</street>

          <city>Beijing</city>

          <region/>

          <code>100095</code>

          <country>P.R. China</country>
        </postal>

        <phone/>

        <facsimile/>

        <email>rainsword.wang@huawei.com</email>

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

    <author fullname="Lili Wang" initials="L." surname="Wang">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street>No. 156 Beiqing Road</street>

          <city>Beijing</city>

          <region/>

          <code>100095</code>

          <country>P.R. China</country>
        </postal>

        <phone/>

        <facsimile/>

        <email>lily.wong@huawei.com</email>

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

    <author fullname="Zhen Tan" initials="Z." surname="Tan">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street>No. 156 Beiqing Road</street>

          <city>Beijing</city>

          <region/>

          <code>100095</code>

          <country>P.R. China</country>
        </postal>

        <phone/>

        <facsimile/>

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

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

    <author fullname="Xiangfeng Ding" initials="X." surname="Ding">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street>No. 156 Beiqing Road</street>

          <city>Beijing</city>

          <region/>

          <code>100095</code>

          <country>P.R. China</country>
        </postal>

        <phone/>

        <facsimile/>

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

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

    <date day="6" month="March" year="2023"/>

    <workgroup>IDR Working Group</workgroup>

    <abstract>
      <t>This document defines an extension to "BGP Community Container
      Attribute" [draft-ietf-idr-wide-bgp-communities], which allows flowspec
      redirection to multiple paths. This extended community serves to
      redirect traffic to a load balancing group and supports both equal-cost
      multi-path(ECMP) and unequal-cost multi-path(UCMP) scenarios.</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 <xref
      target="RFC2119">RFC 2119</xref>.</t>
    </note>
  </front>

  <middle>
    <section title="Introduction">
      <t>"Redirect to IP Extended Community", defined in <xref
      target="I-D.ietf-idr-flowspec-redirect-ip"/>, allows traffic to be
      redirected to a specific IPv4 or IPv6 address, and <xref
      target="I-D.ietf-idr-ts-flowspec-srv6-policy"/> defines the redirection
      action to a SRv6 tunnel by additionally carrying the <xref
      target="RFC8955">"Color Extended Community"</xref>.</t>

      <t>However, scenarios involving redirection load balancing are not
      described in both documents. Although in some implementations,
      Equal-cost multi-path(ECMP) of "Redirect to IP" action can be achieved
      by encoding multiple redirect Extended Communities, the current set of
      mechanisms can hardly support neither ECMP of SRv6 tunnels nor
      unequal-cost multi-path(UCMP) of either types.</t>

      <t>This document defines an extension to <xref
      target="I-D.ietf-idr-wide-bgp-communities">"BGP Community Container
      Attribute"</xref>, the "Redirect Load Balancing Group" community. It is
      a new type of wide community container attribute with encoding format of
      multiple redirection path TLVs. Each of these TLVs represents a
      different redirection action. It allows traffic redirection to a load
      balancing group and supports both ECMP and UCMP scenarios.</t>

      <t>The "Redirect Load Balancing Group" community is intended to be used
      within flowspec-v1 scenarios, the compatibility and interactions with
      flowspec-v2 is outside the scope of this document.</t>

      <section title="Terminology">
        <t>This document introduces the following terms:</t>

        <t><list style="hanging">
            <t hangText="ECMP:">Equal-Cost Multi-Path</t>

            <t hangText="UCMP:">Unequal-Cost Multi-Path</t>

            <t hangText="Redirect Group:">Redirect Load Balancing Group
            Community, a new type of BGP Community Container Attribute defined
            by this document</t>

            <t hangText="Path-tlv:">Sub-tlv of the BGP Wide Community
            Parameter TLV, each represents a redirection path</t>
          </list></t>
      </section>
    </section>

    <section title="Redirect Load Balancing Group Community">
      <t>This document defines a new type of "BGP Community Container
      Attribute", the "Redirect Load Balancing Group" community type. The
      format complies with <xref
      target="I-D.ietf-idr-wide-bgp-communities">"BGP Community Container
      Attribute"</xref> and is shown below:</t>

      <t><figure title="Redirect Load Balancing Group Community Format">
          <artwork align="left"><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             Type              |    Flags  |C|T|   Reserved    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            Length             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Community Value: Redirect Load Balancing Group        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        Source AS Number                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                       Context AS Number                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   Param TLV   |           Length              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                        sub-TLVs                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
        </figure></t>

      <t>The Type, Flags, Reserved and Length fields comply with the "BGP
      Community Container Attribute Common Header" definition.</t>

      <t>The container type MUST be 1, which represents BGP Wide
      Community.</t>

      <t>The Length field represents the total length of the container's
      contents in octets.</t>

      <section title="Community Value">
        <t>The Community Value, Source AS Number and Context AS Number fields
        comply with the corresponding definition in "BGP Community Container
        Attribute".</t>

        <t>Community Value: 4 octets value that represents the "Redirect Load
        Balancing Group" community type. The value is TBD and requires IANA
        registration; See Section 5.1.</t>
      </section>

      <section title="Param TLV">
        <t>The BGP Wide Community Parameter TLV (Sub-Type 3) contains a list
        of path-tlvs, comply with "BGP Wide Community Parameter(s) TLV"
        section of "BGP Community Container Attribute".</t>

        <t>The Parameter TLV MUST present and SHOULD appear only once in a
        "Redirect Load Balancing Group" community container, no or multiple
        present SHOULD be considered malformed.</t>

        <t>Sub-Type: Type 3 (BGP Wide Community Parameter TLV)</t>

        <t>Length: Length of all the sub-TLVs in octets.</t>
      </section>

      <section title="Sub-TLVs(Path-tlvs)">
        <t>The list of path-tlvs that Param Tlv contains. Each path-tlv
        represents a different redirection path.</t>

        <t>The general format of the sub-TLVs comply with path-tlvs' format
        defined in "BGP Community Container Attribute", as below:</t>

        <t><figure title="Param Sub-TlV Format">
            <artwork align="left"><![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
+-+-+-+-+-+-+-+-+
|     Type      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            Length             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            Value                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
          </figure></t>

        <t>The Type field is an octet from 1~254 (0 and 255 are reserved).
        Supported type of the sub-TLVs includes:</t>

        <t><list style="hanging">
            <t hangText="Type 1:">IPv4 Prefix Only</t>

            <t hangText="Type 2:">IPv4 Prefix with Weight</t>

            <t hangText="Type 3:">IPv4 Prefix with Color</t>

            <t hangText="Type 4:">IPv4 Prefix with Color and Weight</t>

            <t hangText="Type 5:">IPv6 Prefix Only</t>

            <t hangText="Type 6:">IPv6 Prefix with Weight</t>

            <t hangText="Type 7:">IPv6 Prefix with Color</t>

            <t hangText="Type 8:">IPv6 Prefix with Color and Weight</t>
          </list></t>

        <t>These sub-TLV types SHOULD be used exclusively within "Redirect
        Load Balancing Group" community containers.</t>

        <t>The Length represents the length of the "Value" field in octets,
        and it is fixed for each specific sub-TLV.</t>

        <t>If the length and type of a sub-TLV do not match, the "Redirect
        Load Balancing Group" community container SHOULD be considered
        malformed.</t>

        <t>If a sub-TLV is a total dupilication of a previous one, the latter
        sub-TLV MUST be ignored.</t>

        <t>In principle, sub-TLVs of different types may be combined in any
        mode. The supported combinations depend on the specific
        implementation.</t>

        <section title="Path-tlv Type  1: IPv4 Prefix Only">
          <t>Indicating the redirection path is unweighted and to a IPv4
          address. The format is shown below:</t>

          <t><figure title="Path-tlv Type  1: IPv4 Prefix Only">
              <artwork align="left"><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    Type: 1    |   Length: 6                   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            Flag(2)            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            IPv4(4)                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
            </figure></t>

          <t>Length: MUST be 6.</t>

          <t>Flags: 2 octets, reserved for future use, MUST be set to 0 upon
          the sender and MUST be ignored upon the receiver.</t>

          <t>IPv4: 4-octet IPv4 address, redirection destination</t>
        </section>

        <section title="Path-tlv Type  2: IPv4 Prefix with Weight">
          <t>Indicating the redirection path is weighted and to a IPv4
          address. The format is shown below:</t>

          <t><figure title="Path-tlv Type  2: IPv4 Prefix with Weight">
              <artwork align="left"><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    Type: 2    |   Length: 7                   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            Flag(2)            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            IPv4(4)                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    Weight(1)  |
+-+-+-+-+-+-+-+-+
]]></artwork>
            </figure></t>

          <t>Length: MUST be 7.</t>

          <t>Flags: 2 octets, reserved for future use, MUST be set to 0 upon
          the sender and MUST be ignored upon the receiver.</t>

          <t>IPv4: 4-octet IPv4 address, redirection destination</t>

          <t>Weight: 1 octet, values from 1~255, load balancing weight</t>
        </section>

        <section title="Path-tlv Type  3: IPv4 Prefix with Color">
          <t>Indicating the redirection path is unweighted and to a SR-TE
          tunnel. The format is shown below:</t>

          <t><figure title="Path-tlv Type  3: IPv4 Prefix with Color">
              <artwork align="left"><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    Type: 3    |   Length: 10                  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            Flag(2)            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            IPv4(4)                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            Color(4)                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
            </figure></t>

          <t>Length: MUST be 10.</t>

          <t>Flags: 2 octets, reserved for future use, MUST be set to 0 upon
          the sender and MUST be ignored upon the receiver.</t>

          <t>IPv4: 4-octet IPv4 address, SR-TE tunnel Endpoint for
          redirection</t>

          <t>Color: 4 octets, SR-TE tunnel Color for redirection</t>
        </section>

        <section title="Path-tlv Type  4: IPv4 Prefix with Color and Weight">
          <t>Indicating the redirection path is weighted and to a SR-TE
          tunnel. The format is shown below:</t>

          <t><figure
              title="Path-tlv Type  4: IPv4 Prefix with Color and Weight">
              <artwork align="left"><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    Type: 4    |   Length: 11                  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            Flag(2)            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            IPv4(4)                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            Color(4)                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    Weight(1)  |
+-+-+-+-+-+-+-+-+
]]></artwork>
            </figure></t>

          <t>Length: MUST be 11.</t>

          <t>Flags: 2 octets, reserved for future use, MUST be set to 0 upon
          the sender and MUST be ignored upon the receiver.</t>

          <t>IPv4: 4-octet IPv4 address, SR-TE tunnel Endpoint for
          redirection</t>

          <t>Color: 4 octets, SR-TE tunnel Color for redirection</t>

          <t>Weight: 1 octet, values from 1~255, load balancing weight</t>
        </section>

        <section title="Path-tlv Type  5: IPv6 Prefix Only">
          <t>Indicating the redirection path is unweighted and to a IPv6
          address. The format is shown below:</t>

          <t><figure title="Path-tlv Type  5: IPv6 Prefix Only">
              <artwork align="left"><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    Type: 5    |   Length: 18                  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            Flag(2)            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           IPv6(16)                            |
~                                                               ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
            </figure></t>

          <t>Length: MUST be 18.</t>

          <t>Flags: 2 octets, reserved for future use, MUST be set to 0 upon
          the sender and MUST be ignored upon the receiver.</t>

          <t>IPv6: 16-octet IPv6 address, redirection destination</t>
        </section>

        <section title="Path-tlv Type  6: IPv6 Prefix with Weight">
          <t>Indicating the redirection path is weighted and to a IPv6
          address. The format is shown below:</t>

          <t><figure title="Path-tlv Type  6: IPv6 Prefix with Weight">
              <artwork align="left"><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    Type: 6    |   Length: 19                  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            Flag(2)            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           IPv6(16)                            |
~                                                               ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    Weight(1)  |
+-+-+-+-+-+-+-+-+
]]></artwork>
            </figure></t>

          <t>Length: MUST be 19.</t>

          <t>Flags: 2 octets, reserved for future use, MUST be set to 0 upon
          the sender and MUST be ignored upon the receiver.</t>

          <t>IPv6: 16-octet IPv6 address, redirection destination</t>

          <t>Weight: 1 octet, values from 1~255, load balancing weight</t>
        </section>

        <section title="Path-tlv Type  7: IPv6 Prefix with Color">
          <t>Indicating the redirection path is unweighted and to a SRv6
          tunnel. The format is shown below:</t>

          <t><figure title="Path-tlv Type  7: IPv6 Prefix with Color">
              <artwork align="left"><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    Type: 7    |   Length: 22                  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            Flag(2)            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           IPv6(16)                            |
~                                                               ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            Color(4)                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
            </figure></t>

          <t>Length: MUST be 22.</t>

          <t>Flags: 2 octets, reserved for future use, MUST be set to 0 upon
          the sender and MUST be ignored upon the receiver.</t>

          <t>IPv6: 16-octet IPv6 address, SRv6 tunnel Endpoint for
          redirection</t>

          <t>Color: 4 octets, SRv6 tunnel Color for redirection</t>
        </section>

        <section title="Path-tlv Type  8: IPv6 Prefix with Color and Weight">
          <t>Indicating the redirection path is weighted and to a SRv6 tunnel.
          The format is shown below:</t>

          <t><figure
              title="Path-tlv Type  8: IPv6 Prefix with Color and Weight">
              <artwork align="left"><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    Type: 8    |   Length: 23                  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            Flag(2)            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           IPv6(16)                            |
~                                                               ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            Color(4)                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    Weight(1)  |
+-+-+-+-+-+-+-+-+
]]></artwork>
            </figure></t>

          <t>Length: MUST be 23.</t>

          <t>Flags: 2 octets, reserved for future use, MUST be set to 0 upon
          the sender and MUST be ignored upon the receiver.</t>

          <t>IPv6: 16-octet IPv6 address, SRv6 tunnel Endpoint for
          redirection</t>

          <t>Color: 4 octets, SRv6 tunnel Color for redirection</t>

          <t>Weight: 1 octet, values from 1~255, load balancing weight</t>
        </section>
      </section>
    </section>

    <section title="Scenarios">
      <t>This section describes a few use-case scenarios when deploying
      "Redirect Load Balancing Group" community type.</t>

      <t><list style="hanging">
          <t hangText="Weighted path-tlv types:">Path-tlvs contain a Weight
          field, such as Type 2, 4, 6, 8</t>

          <t hangText="Unweighted path-tlv types:">Path-tlvs do not contain a
          Weight field, such as Type 1, 3, 5, 7</t>
        </list></t>

      <section title="ECMP">
        <t>A system that originates a flowspec route with a "Redirect Load
        Balancing Group" community, among which its parameter TLV contains
        more than 1 path-tlvs. If not all path-tlvs are of a weighted type,
        these path-tlvs will form a ECMP group.</t>

        <t>Implementations MUST be prepared to accept a Parameter TLV with
        both weighted and unweighted path-tlvs. In this case, the Weight field
        of the weighted path-tlv SHOULD be ignored.</t>
      </section>

      <section title="UCMP">
        <t>A system that originates a flowspec route with a "Redirect Load
        Balancing Group" community, among which its parameter TLV contains
        more than 1 path-tlvs. If all path-tlvs are of a weighted type, these
        path-tlvs will form a UCMP group.</t>

        <t>In this case, the Weight field value of these path-tlvs SHOULD NOT
        be ignored, and the values are used as the ratio of the UCMP
        group.</t>
      </section>
    </section>

    <section title="Validation Procedure">
      <t>In the absence of explicit configuration, a Redirect Group attribute
      MUST be validated before it is used for redirection action or sent to a
      BGP peer.</t>

      <t>The validation procedure for a Redirect Group attribute follows the
      following rules:</t>

      <t><list style="symbols">
          <t>Each Path-tlv of the Redirect Group attribute SHOULD be validated
          separately. The validation of each path follows the validation
          procedure of <xref
          target="I-D.ietf-idr-flowspec-redirect-ip">Redirect to IP
          Action</xref>.</t>

          <t>A Redirect Group attribute SHOULD be considered verified, only
          after all path-tlvs in the Redirect Group attribute are
          verified.</t>

          <t>If any path-tlvs are invalid, these paths SHOULD NOT participate
          in load-balance calculation and used for redirection actions.</t>

          <t>If any path-tlvs are invalid, the Redirect Group attribute SHOULD
          NOT be sent to a BGP peer.</t>
        </list></t>
    </section>

    <section title="Error Handling">
      <t>Comply with Error Handling Procedure in <xref
      target="I-D.ietf-idr-wide-bgp-communities">"BGP Community Container
      Attribute"</xref>.</t>

      <t>In addition:</t>

      <section title="Redirect Group Wide Community Parameter TLV">
        <t>A "Redirect Load Balancing Group" community container with no or
        multiple parameter TLVs SHOULD be considered malformed, and a "treat
        as withdraw" behavior is expected.</t>
      </section>

      <section title="Redirect Group Wide Community Parameter Sub-TLVs">
        <t>If the length and type of a sub-TLV do not match, the "Redirect
        Load Balancing Group" community container SHOULD be considered
        malformed, and a "treat as withdraw" behavior is expected.</t>
      </section>
    </section>

    <section title="Operational Considerations">
      <t>The Extended Community attributes for redirection mentioned in this
      section include:</t>

      <t><list style="symbols">
          <t><xref target="I-D.ietf-idr-flowspec-redirect-ip">Redirect to IP
          Extended Community</xref></t>

          <t><xref target="I-D.ietf-idr-flowspec-redirect-ip">Redirect to IPv6
          Extended Community</xref></t>

          <t><xref target="I-D.ietf-idr-ts-flowspec-srv6-policy">Redirect to
          SRv6 Policy</xref></t>
        </list></t>

      <section title="Configuration Control">
        <t>There SHOULD be an explicit configuration to control whether the
        Redirect Group attribute is used for redirection actions. In the
        absence of the explicit configuration(by default), the Redirect Group
        attribute MAY NOT take precedence over Extended Community attribute.
        With the explicit configuration, the Redirect Group attribute MAY take
        precedence over Extended Community attribute for redirection.</t>

        <t>For clarity, the first scenario, in which the Redirect Group
        attribute does not take precedence, is called configuration situation
        A. And the second scenario is called configuration situation B.</t>
      </section>

      <section title="Parsing">
        <t>While receiving a flowspec route with Redirect Group attribute from
        a BGP peer:</t>

        <t><list style="symbols">
            <t>In configuration situation A, the Redirect Group attribute
            SHOULD NOT be used for redirection actions. If the route carries
            Extended Community attributes for redirection, these attributes
            MAY be used to generate the redirection actions. The Redirect
            Group attribute SHOULD still be saved locally and advertised with
            the fowspec route to other appropriate peers.</t>

            <t>In configuration situation B, the Redirect Group attribute
            SHOULD take precedence over Extended Community attribute for
            redirection. If the route carries Extended Community attributes
            for redirection, these attributes SHOULD NOT be used to generate
            the redirection actions, but SHOULD still be saved locally and
            advertised with the fowspec route to other appropriate peers.</t>
          </list></t>
      </section>

      <section title="Formating">
        <t>While encoding a local-generated flowspec route:</t>

        <t><list style="symbols">
            <t>In configuration situation A, a Redirect Group attribute SHOULD
            NOT be encoded. Appropriate Extended Community attributes MAY be
            used for specifying redirection actions.</t>

            <t>In configuration situation B, the Redirect Group attribute
            SHOULD be encoded for specifying redirection actions, despite of
            there is one or more paths. For the sake of compatibility, we MAY
            select the path with the lowest IP address from the paths of the
            Redirect Group attribute and encode it with appropriate Extended
            Community attributes. During this selection, an IPv4 address is
            preferred over an IPv6 address.</t>
          </list>While encoding a flowspec route learned from other BGP
        peers:</t>

        <t><list style="symbols">
            <t>In configuration situation A, the Redirect Group attribute MUST
            be encoded without modification.</t>

            <t>In configuration situation B, the Redirect Group attribute MUST
            pass the validation procedure before it is encoded and sent to a
            BGP peer.</t>
          </list></t>
      </section>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t/>

      <section title="BGP Wide Communities Community Type : Redirect Group">
        <t>This document requests a new community value under "Registered Type
        1 BGP Wide Community Community Types" registery. This registery is
        defined and requested in <xref
        target="I-D.ietf-idr-wide-bgp-communities">"BGP Community Container
        Attribute"</xref>.</t>

        <t>Requested value:</t>

        <t><figure>
            <artwork align="center"><![CDATA[Name                             Type Value
----                             ----------
Redirect Load Balancing Group       TBD
]]></artwork>
          </figure></t>
      </section>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>A system that originates a flowspec route with a "Redirect Load
      Balancing Group" BGP wide community can cause many receivers of that
      route to redirect traffic to a single next-hop, overwhelming that
      next-hop and resulting in inadvertent or deliberate denial-of-service.
      This is also a concern about the "redirect to IP" extended community,
      therefore this document introduces no additional security considerations
      than those already covered in <xref target="RFC8955"/>.</t>
    </section>
  </middle>

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

      <?rfc include="reference.I-D.ietf-idr-wide-bgp-communities"?>

      <?rfc include="reference.I-D.ietf-idr-flowspec-redirect-ip"?>
    </references>

    <references title="References">
      <?rfc include="reference.RFC.8955"?>

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

      <?rfc include="reference.I-D.ietf-idr-ts-flowspec-srv6-policy"?>
    </references>
  </back>
</rfc>
