<?xml version="1.0" encoding="utf-8"?>
<!-- name="GENERATOR" content="github.com/mmarkdown/mmark Mmark Markdown Processor - mmark.miek.nl" -->
<rfc version="3" ipr="trust200902" docName="draft-wu-idr-flowspec-redirect-group-02" submissionType="IETF" category="std" xml:lang="en" xmlns:xi="http://www.w3.org/2001/XInclude" indexInclude="true">

<front>
<title abbrev="Flowspec Redirect Load Balancing">BGP Flowspec Redirect Load Balancing Group Community</title><seriesInfo value="draft-wu-idr-flowspec-redirect-group-02" stream="IETF" status="standard" name="Internet-Draft"></seriesInfo>
<author initials="Z." surname="Wu" fullname="Zhiwen Wu"><organization>Huawei Technologies</organization><address><postal><street>No. 156 Beiqing Road</street>
<city>Beijing</city>
<code>100095</code>
<country>P.R. China</country>
</postal><email>wuzhiwen1@huawei.com</email>
</address></author><author initials="H." surname="Wang" fullname="Haibo Wang"><organization>Huawei Technologies</organization><address><postal><street>No. 156 Beiqing Road</street>
<city>Beijing</city>
<code>100095</code>
<country>P.R. China</country>
</postal><email>rainsword.wang@huawei.com</email>
</address></author><author initials="L." surname="Wang" fullname="Lili Wang"><organization>Huawei Technologies</organization><address><postal><street>No. 156 Beiqing Road</street>
<city>Beijing</city>
<code>100095</code>
<country>P.R. China</country>
</postal><email>lily.wong@huawei.com</email>
</address></author><author initials="Z." surname="Tan" fullname="Zhen Tan"><organization>Huawei Technologies</organization><address><postal><street>No. 156 Beiqing Road</street>
<city>Beijing</city>
<code>100095</code>
<country>P.R. China</country>
</postal><email>tanzhen6@huawei.com</email>
</address></author><author initials="X." surname="Ding" fullname="Xiangfeng Ding"><organization>Huawei Technologies</organization><address><postal><street>No. 156 Beiqing Road</street>
<city>Beijing</city>
<code>100095</code>
<country>P.R. China</country>
</postal><email>dingxiangfeng@huawei.com</email>
</address></author><date/>
<area>Routing</area>
<workgroup>IDR Working Group</workgroup>
<keyword>BGP</keyword>
<keyword>Flowspec</keyword>
<keyword>Redirect</keyword>
<keyword>Load Balancing</keyword>
<keyword>ECMP</keyword>
<keyword>UCMP</keyword>

<abstract>
<t>This document defines an extension to the BGP Community Container Attribute, 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>

</front>

<middle>

<section anchor="introduction"><name>Introduction</name>
<t>&quot;Redirect to IP Extended Community&quot;, defined in <xref target="I-D.ietf-idr-flowspec-redirect-ip"></xref>, allows traffic to be redirected to a specific IPv4 or IPv6 address, and <xref target="I-D.ietf-idr-ts-flowspec-srv6-policy"></xref> defines the redirection action to a SRv6 tunnel by additionally carrying the &quot;Color Extended Community&quot; <xref target="RFC8955"></xref> <xref target="RFC8956"></xref>.</t>
<t>However, scenarios involving redirection load balancing are not described in either document. Although in some implementations, equal-cost multi-path (ECMP) of &quot;Redirect to IP&quot; action can be achieved by encoding multiple redirect Extended Communities, the current set of mechanisms can hardly support either ECMP of SRv6 tunnels or unequal-cost multi-path (UCMP) of either type.</t>
<t>This document defines an extension to &quot;BGP Community Container Attribute&quot; <xref target="I-D.ietf-idr-wide-bgp-communities"></xref>, the &quot;Redirect Load Balancing Group&quot; 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 &quot;Redirect Load Balancing Group&quot; community is intended to be used within flowspec-v1 scenarios, How this community interacts with flowspec-v2 is outside the scope of this document.</t>

<section anchor="terminology"><name>Terminology</name>
<t>This document introduces the following terms:</t>

<ul>
<li><t>ECMP: Equal-Cost Multi-Path</t>
</li>
<li><t>UCMP: Unequal-Cost Multi-Path</t>
</li>
<li><t>Redirect Group: Redirect Load Balancing Group Community, a new type of
BGP Community Container Attribute defined by this document</t>
</li>
<li><t>Path-tlv: Sub-tlv of the BGP Wide Community Parameter TLV, each
represents a redirection path</t>
</li>
</ul>
</section>
</section>

<section anchor="requirements-language"><name>Requirements Language</name>
<t anchor="requirements">The key words &quot;MUST&quot;, &quot;MUST NOT&quot;, &quot;REQUIRED&quot;, &quot;SHALL&quot;, &quot;SHALL NOT&quot;, &quot;SHOULD&quot;, &quot;SHOULD NOT&quot;, &quot;RECOMMENDED&quot;, &quot;NOT RECOMMENDED&quot;, &quot;MAY&quot;, and &quot;OPTIONAL&quot; in this document are to be interpreted as described in BCP 14 <xref target="RFC2119"></xref> <xref target="RFC8174"></xref> when, and only when, they appear in all capitals, as shown here.</t>
</section>

<section anchor="redirect-load-balancing-group-community"><name>Redirect Load Balancing Group Community</name>
<t>This document defines a new type of &quot;BGP Community Container Attribute&quot;, the &quot;Redirect Load Balancing Group&quot; community type. The format complies with &quot;BGP Community Container Attribute&quot; <xref target="I-D.ietf-idr-wide-bgp-communities"></xref> and is shown below:</t>
<figure><name>Redirect Load Balancing Group Community Format
</name>
<sourcecode type="ascii-art"><![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                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></sourcecode>
</figure>
<t>The Type, Flags, Reserved and Length fields comply with the &quot;BGP Community Container Attribute Common Header&quot; 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 anchor="community-value"><name>Community Value</name>
<t>The Community Value, Source AS Number and Context AS Number fields comply with the corresponding definition in &quot;BGP Community Container Attribute&quot;.</t>
<t>Community Value: 4 octets value that represents the &quot;Redirect Load Balancing Group&quot; community type. The value is TBD and requires IANA registration; see Section 7.1.</t>
</section>

<section anchor="param-tlv"><name>Param TLV</name>
<t>The BGP Wide Community Parameter TLV (Sub-Type 3) contains a list of path-tlvs, complying with &quot;BGP Wide Community Parameter(s) TLV&quot; section of &quot;BGP Community Container Attribute&quot;.</t>
<t>The Parameter TLV MUST be present and SHOULD appear only once in a &quot;Redirect Load Balancing Group&quot; 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 anchor="sub-tlvs-path-tlvs"><name>Sub-TLVs(Path-tlvs)</name>
<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 &quot;BGP Community Container Attribute&quot;, as below:</t>
<figure><name>Param Sub-TlV Format
</name>
<sourcecode type="ascii-art"><![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(2)            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            Flags(2)       |T|D|F|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            Value                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></sourcecode>
</figure>
<t>Type: 1 octet, values from 1~254 (0 and 255 are reserved). Supported type of the sub-TLVs includes:</t>
<table><name>Sub-TLV Path-tlv Types
</name>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>

<tbody>
<tr>
<td>1</td>
<td>IPv4 Prefix Only</td>
</tr>

<tr>
<td>2</td>
<td>IPv4 Prefix with Weight</td>
</tr>

<tr>
<td>3</td>
<td>IPv4 Prefix with Color</td>
</tr>

<tr>
<td>4</td>
<td>IPv4 Prefix with Color and Weight</td>
</tr>

<tr>
<td>5</td>
<td>IPv6 Prefix Only</td>
</tr>

<tr>
<td>6</td>
<td>IPv6 Prefix with Weight</td>
</tr>

<tr>
<td>7</td>
<td>IPv6 Prefix with Color</td>
</tr>

<tr>
<td>8</td>
<td>IPv6 Prefix with Color and Weight</td>
</tr>
</tbody>
</table><t>These sub-TLV types SHOULD be used exclusively within &quot;Redirect Load Balancing Group&quot; community containers.</t>
<t>Length: The length of the &quot;Value&quot; field in octets, and it is fixed for each specific sub-TLV.</t>
<t>Flags: 2 octets. The following flag bits are defined:</t>

<ul>
<li><t>T - Redirect to only Tunnel: When set, the redirection path is forced
to use a tunnel (e.g., SR-Policy or SRv6 tunnel) to reach the redirection
destination. For Path-tlv types that redirect to an IP address (e.g.,
IPv4 Prefix Only), this flag forces the redirection to a tunnel
regardless; if the tunnel is unreachable, the redirection rule does not
take effect. Which tunnel to use is determined by the tunnel policy
already configured on the device. For Path-tlv types that already
redirect to a tunnel (e.g., IPv4 Prefix with Color), this flag
indicates that the redirection MUST NOT be downgraded to a redirect to
IP when the tunnel is unreachable.</t>
</li>
<li><t>D - Redirect to only Direct Route: When set, the redirection path is
forced to use a direct route to reach the redirection destination,
avoiding longest-prefix match to other prefixes. If the specified
redirection destination is unreachable, the redirection rule does not
take effect. For Path-tlv types that redirect to a tunnel, this flag
only takes effect when the tunnel is unreachable and the redirection is
downgraded to a redirect to IP, in that case, the redirect to IP is
forced to use a direct route.</t>
</li>
<li><t>F - Redirect to only FlowSpec FIB: When set, the redirection path is
forced to look up the redirection destination in the FlowSpec FIB.
For Path-tlv types that redirect to a tunnel, this flag only takes
effect when the tunnel is unreachable and the redirection is
downgraded to a redirect to IP, in that case, the redirect to IP is
forced to look up the FlowSpec FIB.</t>
</li>
</ul>
<t>For Path-tlv types that redirect to a tunnel (e.g., IPv4 Prefix with
Color, IPv6 Prefix with Color), when the tunnel is unreachable and the T
flag is not set, the redirection is downgraded to a redirect to the
tunnel endpoint IP address. If the T flag is set, this downgrade MUST NOT
be performed, and the redirection rule does not take effect.</t>
<t>The three flags are mutually exclusive and cannot be set simultaneously.
When a Path-tlv has more than one of these flags set, it MUST be treated
as invalid. Other flags are reserved for future use, MUST be set to 0
upon the sender and MUST be ignored upon the receiver.</t>
<t>If the length and type of a sub-TLV do not match, the &quot;Redirect Load Balancing Group&quot; community container SHOULD be considered malformed.</t>
<t>If a sub-TLV is a total duplication 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 anchor="path-tlv-type-1-ipv4-prefix-only"><name>Path-tlv Type 1: IPv4 Prefix Only</name>
<t>Indicates the redirection path is unweighted and to an IPv4 address. The format is shown below:</t>
<figure><name>Path-tlv Type 1: IPv4 Prefix Only
</name>
<sourcecode type="ascii-art"><![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)      |T|D|F|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            IPv4(4)                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></sourcecode>
</figure>

<ul>
<li><t>Length: MUST be 6.</t>
</li>
<li><t>Flags: As defined in Section 3.3.</t>
</li>
<li><t>IPv4: 4-octet IPv4 address, redirection destination</t>
</li>
</ul>
</section>

<section anchor="path-tlv-type-2-ipv4-prefix-with-weight"><name>Path-tlv Type 2: IPv4 Prefix with Weight</name>
<t>Indicates the redirection path is weighted and to an IPv4 address. The format is shown below:</t>
<figure><name>Path-tlv Type 2: IPv4 Prefix with Weight
</name>
<sourcecode type="ascii-art"><![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)      |T|D|F|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            IPv4(4)                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    Weight(1)  |
+-+-+-+-+-+-+-+-+
]]></sourcecode>
</figure>

<ul>
<li><t>Length: MUST be 7.</t>
</li>
<li><t>Flags: As defined in Section 3.3.</t>
</li>
<li><t>IPv4: 4-octet IPv4 address, redirection destination</t>
</li>
<li><t>Weight: 1 octet, values from 1~255, load balancing weight</t>
</li>
</ul>
</section>

<section anchor="path-tlv-type-3-ipv4-prefix-with-color"><name>Path-tlv Type 3: IPv4 Prefix with Color</name>
<t>Indicates the redirection path is unweighted and to an SR-Policy tunnel. The format is shown below:</t>
<figure><name>Path-tlv Type 3: IPv4 Prefix with Color
</name>
<sourcecode type="ascii-art"><![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)      |T|D|F|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            IPv4(4)                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            Color(4)                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></sourcecode>
</figure>

<ul>
<li><t>Length: MUST be 10.</t>
</li>
<li><t>Flags: As defined in Section 3.3.</t>
</li>
<li><t>IPv4: 4-octet IPv4 address, SR-Policy tunnel Endpoint for redirection</t>
</li>
<li><t>Color: 4 octets, SR-Policy tunnel Color for redirection</t>
</li>
</ul>
</section>

<section anchor="path-tlv-type-4-ipv4-prefix-with-color-and-weight"><name>Path-tlv Type 4: IPv4 Prefix with Color and Weight</name>
<t>Indicates the redirection path is weighted and to an SR-Policy tunnel. The format is shown below:</t>
<figure><name>Path-tlv Type 4: IPv4 Prefix with Color and Weight
</name>
<sourcecode type="ascii-art"><![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)      |T|D|F|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            IPv4(4)                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            Color(4)                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    Weight(1)  |
+-+-+-+-+-+-+-+-+
]]></sourcecode>
</figure>

<ul>
<li><t>Length: MUST be 11.</t>
</li>
<li><t>Flags: As defined in Section 3.3.</t>
</li>
<li><t>IPv4: 4-octet IPv4 address, SR-Policy tunnel Endpoint for redirection</t>
</li>
<li><t>Color: 4 octets, SR-Policy tunnel Color for redirection</t>
</li>
<li><t>Weight: 1 octet, values from 1~255, load balancing weight</t>
</li>
</ul>
</section>

<section anchor="path-tlv-type-5-ipv6-prefix-only"><name>Path-tlv Type 5: IPv6 Prefix Only</name>
<t>Indicates the redirection path is unweighted and to an IPv6 address. The format is shown below:</t>
<figure><name>Path-tlv Type 5: IPv6 Prefix Only
</name>
<sourcecode type="ascii-art"><![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)      |T|D|F|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           IPv6(16)                            |
~                                                               ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></sourcecode>
</figure>

<ul>
<li><t>Length: MUST be 18.</t>
</li>
<li><t>Flags: As defined in Section 3.3.</t>
</li>
<li><t>IPv6: 16-octet IPv6 address, redirection destination</t>
</li>
</ul>
</section>

<section anchor="path-tlv-type-6-ipv6-prefix-with-weight"><name>Path-tlv Type 6: IPv6 Prefix with Weight</name>
<t>Indicates the redirection path is weighted and to an IPv6 address. The format is shown below:</t>
<figure><name>Path-tlv Type 6: IPv6 Prefix with Weight
</name>
<sourcecode type="ascii-art"><![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)      |T|D|F|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           IPv6(16)                            |
~                                                               ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    Weight(1)  |
+-+-+-+-+-+-+-+-+
]]></sourcecode>
</figure>

<ul>
<li><t>Length: MUST be 19.</t>
</li>
<li><t>Flags: As defined in Section 3.3.</t>
</li>
<li><t>IPv6: 16-octet IPv6 address, redirection destination</t>
</li>
<li><t>Weight: 1 octet, values from 1~255, load balancing weight</t>
</li>
</ul>
</section>

<section anchor="path-tlv-type-7-ipv6-prefix-with-color"><name>Path-tlv Type 7: IPv6 Prefix with Color</name>
<t>Indicates the redirection path is unweighted and to an SRv6 tunnel. The format is shown below:</t>
<figure><name>Path-tlv Type 7: IPv6 Prefix with Color
</name>
<sourcecode type="ascii-art"><![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)      |T|D|F|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           IPv6(16)                            |
~                                                               ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            Color(4)                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></sourcecode>
</figure>

<ul>
<li><t>Length: MUST be 22.</t>
</li>
<li><t>Flags: As defined in Section 3.3.</t>
</li>
<li><t>IPv6: 16-octet IPv6 address, SRv6 tunnel Endpoint for redirection</t>
</li>
<li><t>Color: 4 octets, SRv6 tunnel Color for redirection</t>
</li>
</ul>
</section>

<section anchor="path-tlv-type-8-ipv6-prefix-with-color-and-weight"><name>Path-tlv Type 8: IPv6 Prefix with Color and Weight</name>
<t>Indicates the redirection path is weighted and to an SRv6 tunnel. The format is shown below:</t>
<figure><name>Path-tlv Type 8: IPv6 Prefix with Color and Weight
</name>
<sourcecode type="ascii-art"><![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)      |T|D|F|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           IPv6(16)                            |
~                                                               ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            Color(4)                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    Weight(1)  |
+-+-+-+-+-+-+-+-+
]]></sourcecode>
</figure>

<ul>
<li><t>Length: MUST be 23.</t>
</li>
<li><t>Flags: As defined in Section 3.3.</t>
</li>
<li><t>IPv6: 16-octet IPv6 address, SRv6 tunnel Endpoint for redirection</t>
</li>
<li><t>Color: 4 octets, SRv6 tunnel Color for redirection</t>
</li>
<li><t>Weight: 1 octet, values from 1~255, load balancing weight</t>
</li>
</ul>
</section>
</section>
</section>

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

<ul>
<li><t>Weighted path-tlv types: Path-tlvs that contain a Weight field, such as Type 2, 4, 6, 8</t>
</li>
<li><t>Unweighted path-tlv types: Path-tlvs that do not contain a Weight field, such as Type 1, 3, 5, 7</t>
</li>
</ul>

<section anchor="ecmp"><name>ECMP</name>
<t>A system that originates a flowspec route with a &quot;Redirect Load Balancing Group&quot; community, among which its parameter TLV contains more than one path-tlv. If not all path-tlvs are of a weighted type, these path-tlvs will form an 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 anchor="ucmp"><name>UCMP</name>
<t>A system that originates a flowspec route with a &quot;Redirect Load Balancing Group&quot; community, among which its parameter TLV contains more than one path-tlv. 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 ratios of the UCMP group.</t>
</section>
</section>

<section anchor="validation-procedure"><name>Validation Procedure</name>
<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>

<ul>
<li><t>Each Path-tlv of the Redirect Group attribute SHOULD be validated separately. The validation of each path follows the validation procedure of Redirect to IP Action <xref target="I-D.ietf-idr-flowspec-redirect-ip"></xref>.</t>
</li>
<li><t>A Redirect Group attribute SHOULD be considered verified, only after all path-tlvs in the Redirect Group attribute are verified.</t>
</li>
<li><t>If any path-tlvs are invalid, these paths SHOULD NOT participate in load-balance calculation and be used for redirection actions.</t>
</li>
<li><t>If any path-tlvs are invalid, the Redirect Group attribute SHOULD NOT be sent to a BGP peer.</t>
</li>
</ul>
</section>

<section anchor="error-handling"><name>Error Handling</name>
<t>This document follows the Error Handling Procedure in &quot;BGP Community Container Attribute&quot; <xref target="I-D.ietf-idr-wide-bgp-communities"></xref>.</t>
<t>In addition:</t>

<section anchor="redirect-group-wide-community-parameter-tlv"><name>Redirect Group Wide Community Parameter TLV</name>
<t>A &quot;Redirect Load Balancing Group&quot; community container with no or multiple parameter TLVs SHOULD be considered malformed, and a &quot;treat as withdraw&quot; behavior is expected.</t>
</section>

<section anchor="redirect-group-wide-community-parameter-sub-tlvs"><name>Redirect Group Wide Community Parameter Sub-TLVs</name>
<t>If the length and type of a sub-TLV do not match, the &quot;Redirect Load Balancing Group&quot; community container SHOULD be considered malformed, and a &quot;treat as withdraw&quot; behavior is expected.</t>
</section>
</section>

<section anchor="operational-considerations"><name>Operational Considerations</name>
<t>The Extended Community attributes for redirection mentioned in this section include:</t>

<ul>
<li><t>Redirect to IP Extended Community <xref target="I-D.ietf-idr-flowspec-redirect-ip"></xref></t>
</li>
<li><t>Redirect to IPv6 Extended Community <xref target="I-D.ietf-idr-flowspec-redirect-ip"></xref></t>
</li>
<li><t>Redirect to SRv6 Policy <xref target="I-D.ietf-idr-ts-flowspec-srv6-policy"></xref></t>
</li>
</ul>

<section anchor="configuration-control"><name>Configuration Control</name>
<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 does 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 anchor="parsing"><name>Parsing</name>
<t>While receiving a flowspec route with Redirect Group attribute from a BGP peer:</t>

<ul>
<li><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 flowspec route to other appropriate peers.</t>
</li>
<li><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 flowspec route to other appropriate peers.</t>
</li>
</ul>
</section>

<section anchor="formatting"><name>Formatting</name>
<t>While encoding a locally-generated flowspec route:</t>

<ul>
<li><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>
</li>
<li><t>In configuration situation B, the Redirect Group attribute SHOULD be encoded for specifying redirection actions, regardless of whether there are 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>
</li>
</ul>
<t>While encoding a flowspec route learned from other BGP peers:</t>

<ul>
<li><t>In configuration situation A, the Redirect Group attribute MUST be encoded without modification.</t>
</li>
<li><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>
</li>
</ul>
</section>
</section>

<section anchor="iana-considerations"><name>IANA Considerations</name>

<section anchor="bgp-wide-communities-community-type-redirect-load-balancing-group"><name>BGP Wide Communities Community Type : Redirect Load Balancing Group</name>
<t>This document requests a new community value under &quot;Registered Type 1 BGP Wide Community Community Types&quot; registry. This registry is defined and requested in &quot;BGP Community Container Attribute&quot; <xref target="I-D.ietf-idr-wide-bgp-communities"></xref>.</t>
<t>Requested value:</t>
<table><name>New Wide Communities Community Type
</name>
<thead>
<tr>
<th>Name</th>
<th>Type Value</th>
</tr>
</thead>

<tbody>
<tr>
<td>Redirect Load Balancing Group</td>
<td>TBD</td>
</tr>
</tbody>
</table></section>
</section>

<section anchor="security-considerations"><name>Security Considerations</name>
<t>A system that originates a flowspec route with a &quot;Redirect Load Balancing Group&quot; 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 &quot;redirect to IP&quot; extended community, therefore this document introduces no additional security considerations than those already covered in <xref target="RFC8955"></xref> <xref target="RFC8956"></xref>.</t>
</section>

</middle>

<back>
<references><name>Normative References</name>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-idr-flowspec-redirect-ip.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-idr-ts-flowspec-srv6-policy.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-idr-wide-bgp-communities.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8955.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8956.xml"/>
</references>

</back>

</rfc>
