<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC0791 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.0791.xml">
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC3032 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3032.xml">
<!ENTITY RFC4271 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4271.xml">
<!ENTITY RFC4360 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4360.xml">
<!ENTITY RFC4760 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4760.xml">
<!ENTITY RFC5065 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5065.xml">
<!ENTITY RFC5701 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5701.xml">
<!ENTITY RFC6241 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6241.xml">
<!ENTITY RFC6482 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6482.xml">
<!ENTITY RFC7153 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7153.xml">
<!ENTITY RFC7606 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7606.xml">
<!ENTITY RFC8040 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8040.xml">
<!ENTITY RFC8174 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml">
<!ENTITY RFC8205 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8205.xml">
<!ENTITY RFC8206 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8206.xml">
<!ENTITY RFC8955 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8955.xml">
<!ENTITY RFC8956 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8956.xml">
<!ENTITY RFC9015 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.9015.xml">
<!ENTITY RFC9117 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.9117.xml">
<!ENTITY RFC9015 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.9015.xml">
<!ENTITY RFC9184 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.9184.xml">
<!ENTITY I-D.ietf-idr-wide-bgp-communities SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-idr-wide-bgp-communities.xml">
<!ENTITY I-D.ietf-idr-flowspec-l2vpn SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-idr-flowspec-l2vpn.xml">
<!ENTITY I-D.ietf-idr-flowspec-nvo3 SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-idr-flowspec-nvo3.xml">
<!ENTITY I-D.ietf-idr-flowspec-srv6 SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-idr-flowspec-srv6.xml">
<!ENTITY I-D.ietf-idr-flowspec-mpls-match SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-idr-flowspec-mpls-match.xml">
<!ENTITY I-D.ietf-idr-bgp-flowspec-label SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-idr-bgp-flowspec-label.xml">
<!ENTITY I-D.ietf-idr-flowspec-interfaceset SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-idr-flowspec-interfaceset.xml">
<!ENTITY I-D.ietf-idr-flowspec-path-redirect SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-idr-flowspec-path-redirect.xml">
<!ENTITY I-D.ietf-idr-flowspec-redirect-ip SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-idr-flowspec-redirect-ip.xml">
<!ENTITY I-D.ietf-idr-flowspec-v2 SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-idr-flowspec-v2.xml">
<!ENTITY I-D.ietf-idr-rpd SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-idr-rpd.xml">
<!ENTITY I-D.hares-idr-fsv2-ip-basic SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.hares-idr-fsv2-ip-basic.xml">
<!ENTITY I-D.hares-idr-fsv2-more-ip-filters SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.hares-idr-fsv2-more-ip-filters.xml">
<!ENTITY I-D.hares-idr-fsv2-more-ip-actions SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.hares-idr-fsv2-more-ip-actions.xml">
<!ENTITY I-D.xiong-idr-detnet-flow-mapping SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.xiong-idr-detnet-flow-mapping.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<?rfc iprnotified="no" ?>
<?rfc strict="no" ?>
<rfc category="std" docName="draft-hares-idr-fsv2-more-ip-actions-01"  ipr="trust200902">
  <front>
    <title abbrev="BGP FSv2 More IP Actions ">BGP Flow Specification Version 2 - More IP Actions </title>
    <author fullname="Susan Hares" initials="S" surname="Hares">
      <organization>Hickory Hill Consulting</organization>
      <address>
        <postal>
          <street>7453 Hickory Hill</street>
          <city>Saline</city>
          <region>MI</region>
          <code>48176</code>
          <country>USA</country>
        </postal>
		<phone>+1-734-604-0332</phone>
        <email>shares@ndzh.com</email>
      </address>
    </author>
    <date year="2024" />
    <area>Routing Area</area>
    <workgroup>IDR Working Group</workgroup>
    <keyword>RFC</keyword>
    <keyword>Request for Comments</keyword>
    <keyword>I-D</keyword>
    <keyword>Internet-Draft</keyword>
    <keyword>FSv2 More IP Filters </keyword>
	<abstract>
	   <t>The BGP flow specification version 2 (FSv2) for Basic IP 
       defines user ordering of filters along with FSv1 IP Filters and 
	   FSv1 actions. This draft suggests additional IP actions for 
	   Flow Specification FSv2 in Extended Communities and 
       Community path attribute. 	   
	   </t>
    </abstract>
  </front>
  <middle>
  <section anchor="intro" title="Introduction">
      <t>
	  Version 2 of BGP flow specification was originally defined in 
	  <xref target="I-D.ietf-idr-flowspec-v2"></xref> (denoted FSv2).  However, the full 
	  FSv2 specification contains more than initial implementers desired.  Therefore, this 
	  original FSv2 draft remains an WG draft, but the content will be split out into 
	  functions that implementers can manage. Section 1.3 contains the list of documents
	  resulting from the split of the original FSv2 documents. 
	  </t> 
	  <t> FSv2 defines new user-ordered filters that will be used with the IPv4 (AFI=1) and 
	  IPv6 (AFI=2) 2 new SAFIs (TBD1, TBD2) for FSv2 to be used with 5 AFIs   
	  (1, 2, 6, 25, and 31) to allow user-ordered lists of traffic match filters for user-ordered 
	  traffic match actions encoded in Communities (Wide or Extended). 
	  </t>
	  <t>This draft specifies defines extensions to the FSv2 Basic IP package
      <xref target="I-D.hares-idr-fsv2-ip-basic"></xref> to support 
      additional IP filters for IP packet and payload. The filters are passed in the 
	  Extended IP Filters (type 2) of the subTLVs.  This filter form contains 
	  a filter version number so filters can be added easily. 
	 </t> 
	  <t>BGP Flow Specification version 1 (FSv1) as defined in 
	  <xref target="RFC8955"></xref>, <xref target="RFC8956"></xref>, and 
	  <xref target="RFC9117"></xref> specified 2 SAFIs (133, 134) 
      to be used with IPv4 AFI (AFI = 1) and IPv6 AFI (AFI=2). 
	  FSv2 specifies 2 new SAFIs (TBD1, TBD2) for FSv2 to be used with 5 AFIs   
	  (1, 2, 6, 25, and 31) to allow user-ordered lists of traffic match filters for user-ordered 
	  traffic match actions encoded in Communities (Wide or Extended). The first SAFI (TBD1) 
	  will be used for IP forwarding, and the second SAFI (TBD2) will be used with VPNs. The supported 
	  AFI/SAFI combinations in FSv2 are:
	  <list style="symbols">
	  <t> IPv4 (AFI=1, SAFI=TBD1), </t>
	  <t> IPv6 (AFI=2, SAFI=TBD1), </t>
	  <t> L2   (AFI=6, SAFI=TBD1), </t>
	  <t> SFC  (AFI=31, SAFI=TBD1), </t>
	  <t> BGP/MPLS IPv4 VPN (AFI=1, SAFI=TBD2), </t> 
	  <t> BGP/MPLS IPv6 VPN (AFI=2, SAFI=TBD2), </t>
	  <t> BGP/MPLS L2VPN (AFI=25, SAFI=TBD2), and </t>
      <t> SFC VPN (AFI=31, SAFI=TBD2)</t>
      </list> 	  
	 </t>
	 <t>
	  FSv1 and FSv2 use different AFI/SAFIs to send flow specification filters.  Since BGP  
	  route selection is performed per AFI/SAFI, this approach can be 
	  termed “ships in the night” based on AFI/SAFI. 
	  </t>	
     <t> FSv2 specifies allows new IP filters to be used with the IPv4 (AFI=1) and 
	  IPv6 (AFI=2). FSv2 for Basic IP suggests these new filters are added in 
      a component called "Extended IP Filters <xref target="I-D.hares-idr-fsv2-ip-basic"></xref>.
	  <xref target="I-D.hares-idr-fsv2-more-ip-filters"></xref> provides a 
       summary of the additional IP filters which have been adopted by the IDR WG or proposed
	  to the IDR WG.  It is anticipated that the filters will be added in groups as needed 
	  by applications. 
	  </t>
 	  <t> 
	  The original FSV2 work  <xref target="I-D.ietf-idr-flowspec-v2"></xref> 
      proposed an user-ordered of traffic match actions encoded in the Community 
      Path Attribute. This document proposes: 
	  <list style="symbols">
	  <t> a specification order for IP actions in Extended Communities, and   
	  </t>
	  <t> a user ordering for IP Actions in the Community path Attribute. 
	  </t>
	  </list>
  	 Section 2 contains a description of the format of the FSv2 actions in 
	 Extended Communities and Wide Communities.  
	  </t> 
    <t> 
	 Since Extended Communities can be attached to a FSv2 NLRI with filters, 
	 it is possible that the Extended Communities conflict with each other. 
	 Section 3 lists the FSv1 actions that conflict with one another if 
     attached to the same filter. 
	 </t>
	 <t>
	 This document proposes that Extended Community actions attached to FSv2 NLRI 
	 use a pre-defined order that occurs after the User defined orders.  
	 The predefined order for Extended Communities in FSv2 NLRI would be set by the 
	 action type value (see section 6.3). For example, if the user-actions range from 1-1000, the 
	 Extended Community order would start after those actions.
	 </t> 
	 <t>
	 Sections 4 and 5 provide a short description of new actions proposed for
	 FSv2. Section 4 provides a description of the Action Chain Ordering proposed for 
	 the FSv2 for Basic IP (<xref target="I-D.hares-idr-fsv2-ip-basic"></xref>.
	 Section 5 lists the potential new actions from FSv2 actions described in 
	 IDR WG drafts or proposed as individual drafts.  
     </t>
	 <t>
	 Sections 6, 7, and 8 provide information on validation, ordering, and error 
	 handling of FSv2 actions. Section 6 describes validation of actions and 
	 ordering of actions (user ordered and default). Section 7 describes error 
	 handling for FSv2 actions.  Section 8 provides an example for ordering of actions. 
	 </t>
	 <t> Section 9 provides details on IANA considerations </t> 
	 
  <section title="Definitions and Acronyms">
      <t><list>
  		  <t>AFI - Address Family Identifier</t>
		  <t>AS - Autonomous System </t>
		  <t>BGPSEC - secure BGP <xref target="RFC8205"></xref> updated by <xref target="RFC8206"></xref> </t>
  		  <t>BGP Session ephemeral state - state which does not survive the loss of BGP peer session.</t>
		  <t>Configuration state - state which persists across a reboot of software module within 
		      a routing system or a reboot of a hardware routing device.</t>
		  <t>DDOs - Distributed Denial of Service</t>
		  <t>Ephemeral state - state which does not survive the reboot of a software module,
		   or a hardware reboot. Ephemeral state can be ephemeral configuration state or 
		   operational state.</t>
		  <t>FSv1 - Flow Specification version 1 [RFC8955] [RFC8956] </t>
  		  <t>FSv2 - Flow Specification version 2 (this document) </t>
		  <t>NETCONF - The Network Configuration Protocol <xref target="RFC6241"></xref>.</t>
		  <t>RESTCONF - The RESTCONF configuration Protocol <xref target="RFC8040"></xref> </t>
		  <t>RIB - Routing Information Base</t>
		  <t> ROA -  Route Origin Authentication <xref target="RFC6482"></xref></t>
		  <t>RR - Route Reflector.</t>
		  <t> SAFI – Subsequent Address Family Identifier </t>
        </list>
		</t>
    </section>
   <section title="RFC 2119 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 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 title="FSv2 Series of Specifications">
<t>
The full FSV2 information is contained in 
<xref target="I-D.ietf-idr-flowspec-v2"></xref>. 
</t>
<t>
Feedback from the implementers indicate that the 
Flow Specification v2 needs to broken into drafts based on the 
use cases the technology supports.  These include IPv4/IPv6 IP 
Basic Filters for DDOS, IPv4/IPv6 filters beyond DDOS, BGP/MPLS IPv4 VPN, 
BGP/MPLS IPv6 VPN,  BGP/MPLS L2VPN, Segment routing (SRMPLS, SRv6), 
SFC, SFC VPN, L2, L2 VPNs, and tunneled traffic (e.g., nv03 WG tunnels).   
</t>
<t>
The following is the list of planned drafts: 
<list style="symbols">
<t>FSv2 IP Basic (<xref target="I-D.hares-idr-fsv2-ip-basic"></xref>)
</t>
<t>FSv2 More IP Filters (<xref target="I-D.hares-idr-fsv2-more-ip-filters"></xref>)
</t>
<t>FSv2 More IP Actions (<xref target="I-D.hares-idr-fsv2-more-ip-actions"></xref>)
</t>
<t>FSv2 Non-IP Filters (draft-hares-idr-fsv2-non-ip-Filters)
</t>
<t>FSv2 Non-IP Actions (draft-hares-idr-fsv2-non-ip-actions)
</t>
</list>   
<xref target="I-D.hares-idr-fsv2-ip-basic"></xref> has a description of each draft. 
The original FSV2 information is contained in 
<xref target="I-D.ietf-idr-flowspec-v2"></xref>. 
</t>
</section> 
</section> 
<section title="Format of FSv2 Actions ">
<t>The FSv2 actions may be sent in an Extended Community or a Community Path Attribute. 
User ordering of FSv2 actions requires using the Community Path Attribute. 
This section reviews the describes the format of FSv2 actions in 
Extended Communities or Community Path Attributes.  
</t>
<t>
The Extended Community encodes the Flow Specification actions in the Extended IPv4 
Community format <xref target="RFC4360"></xref> or in the Extended IPv6 
Community format <xref target="RFC5701"></xref>.  The Extended Community 
actions cannot be ordered by the user, but will be ordered by default. 
The implementer and the operator must be aware of interactions between 
any FSv2 actions must be specified in an Extended Community. 
</t>
<t> FSv2 IP Basic proposes that Extended Community actions attached to FSv2 NLRI 
use a pre-defined order that occurs after the User defined orders.  
The predefined order for Extended Communities in FSv2 NLRI would be set by the 
action type value (see section 6.3). For example, if the user-actions range from 1-1000, the 
Extended Community order would start after those actions.
 </t>
<t>The Community attribute <xref target="I-D.ietf-idr-wide-bgp-communities "></xref>
describes an attribute with flexible format for specifying community information.
</t>
<t>
This section first describes the following Information related to FSv2 Actions in Extended Communities: 
<list style="symbol">
<t> Generic Transitive Extended Communities for FSv2 Actions (FS-TG-EC) <xref target="RFC8955"></xref> 
</t>
<t> Transitive Extended Communities for redirect. This includes:
<list>
<t>(Generalized redirection ID with Sequencing and copy)
<xref target="I-D.ietf-idr-flowspec-path-redirect"></xref> 
</t>
<t>Redirect plus Copy bit <xref target="I-D.ietf-idr-flowspec-redirect-ip"></xref>
</t>
<t>Transitive IPv6-Address Extended Community formats for FSv2 actions <xref target="RFC8956"></xref> 
</t> 
</list> 
</t>
</list>
</t>
<section title="Encoding FSv2 Actions in Generic Transitive Communities ">
<t>
The FSv2 actions encoded in Generic Transitive Communities inherit the 
FSv1 actions in Generic Transitive Communities.  
</t>
<t>
The Extended Community encodes the Flow Specification actions in the Extended Community format 
as Generic Transitive Extended Communities per <xref target="RFC4360"></xref>
per <xref target="RFC8955"></xref>, <xref target="RFC9117"></xref>, and
<xref target="RFC9184"></xref>.  
</t>
<t>The format of the these actions can be: 
<list style="hanging">
<t hangText="Generic Transitive Extended Community (0x80):">where the 
Sub-Types are defined in the Generic Transitive Extended Community Sub-Types
registry.
</t>
<t hangText="Generic Transitive Extended Community Part 2 (0x81):"> where the
Sub-Types are defined in the Generic Transitive Extended Community Part 2 Sub-Types registry.
</t>
<t hangText="Transitive Four-Octet AS-Specific Extended Community (0x82):">where the 
Sub-Types defined in the Generic Transitive Extended Community Part 3 Sub-Types
registry.
</t>
<t hangText="Generic Transitive Extended Community Part 3 (0x83):">where the 
Sub-Types defined in the Transitive Opaque Extended Community Sub-Types" registry.
</t>
</list> 
</t>
<t>
<figure>
<artwork>

  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 high    |  Type low(*)  |                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+          Value (6 octets)     |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                          Figure 2-1
</artwork>
</figure>
</t>
<t>
<figure>
<artwork>
Table 2-1 Generic Transitive Extended Community 
          Part 1 - (0x80) 

IPv4 Extended Communities (Type 0x80)  
Value   Description                    Name   Reference
=====   =======================        =====  ==========
0x01    FSv2 Action Chain Ordering     ACO    [This document]  
0x06	FSv2 traffic-rate-byte         TRB    [RFC8955]	
0x07	Flow spec traffic-action       TAIS   [RFC8955]
0x08	Flow spec rt-redirect          RDIP   [RFC8955]
        AS-2 octet format	                       
0x09	Flow spec Remark DSCP          TMDS   [RFC8955]
0x0C    Flow Spec Traffic-rate-packets TRP    [RFC8955]
0xOD    Flow Spec for SFC classifiers  SFCC   [RFC9015] 

</artwork>
</figure>
</t>
<t>
<figure>

<artwork>   
Table 2-2 Generic Transitive Extended Community 
          Part 2 (0x81) 
				
IPv4 Extended Communities FSv2 action (Type 0x81) 
Value   Description                  Name  Reference
=====   =======================      ===== ==========
0x08	Flow spec rt-redirect        RDIP  [RFC8955]        


</artwork>
</figure>
</t>
<t>
<figure>
<artwork>  
Table 2-3 Generic Transitive Extended Community 
		  Part 3 (Type 0x82) 
Value   Description                  Name  Reference
=====   =======================      ====  ==========
0x08	Flow spec rt-redirect        RDIP  [RFC8955]
        AS-4 octet format	  
 		
</artwork>
</figure>
</t>
<t>
<figure>
<artwork>  
Table 2-4: Traffic Action bits 
             			 
Bit     Name                Name  Reference
=====   ===============     ====  ==========
 47	     Terminal Action    TAct  [RFC8955]
 46      Sample             Samp  [RFC8955]
 45      Copy               Copy  [this document] 
 44      Drop               drop  [this document] 
 
</artwork>
</figure>
</t>
</section> 
<section title="Encoding Path Forwarding in IPv4 Transitive Extended Communities">
<t>FSv2 needs to refine the following Transitive Extended Communities 
that are not "Transitive Generic Communities" to a specific set of functions. 
These features provide overlapping functions. While some of these 
features are implemented, these actions should be be reviewed. 
</t>
<t>There are three types of functions: 
<list style="symbols">
<t>Active filters on interfaces in group for inbound or outbound data traffic
</t>
<t>Redirect to an IP address.  Optionally perform a traffic action (copy) 
</t>
<t>Redirect to an Indirection ID of a specific type. Optionally perform a 
traffic action (copy). 
</t> 
</list> 
</t> 
<t>
<figure>
<artwork>
Table 2-5 Transitive Extended Community types (T-EC-types)  
 
sub-type   FSv1 Description     Name   Reference
========   ==================   =====  =================
0x07       FS Interface set     Ifset  [IDR-WG-ifset]
0x08       FS Redirect/         RIPv4  [IDR-WG-redirect-ip] 
           Mirror                     
0x09       FS Redirect to
           Indirection-id       RGID   [IDR-WG-redirect-iid] 

</artwork>
</figure>
</t>
<t>
<list> 				
<t>[IDR-WG-ifset] <xref target="I-D.ietf-idr-flowspec-interfaceset"></xref></t> 
<t>[IDR-WG-redirect-ip] <xref target="I-D.ietf-idr-flowspec-redirect-ip"></xref> 
</t>
<t>[IDR-WG-redirect-iid] <xref target="I-D.ietf-idr-flowspec-path-redirect"></xref> 
</t>
</list>
</t> 

</section> 
<section title="Encoding FSv2 Actions in IPv6 Extended Community"> 
<t>
The IPv6 Extended Community encodes the Flow Specification actions 
in the Extended Community format (<xref target="RFC5701"></xref>) 
in the transitive opaque format (See <xref target="RFC8956"></xref>, 
<xref target="RFC9117"></xref>, and <xref target="RFC9184"></xref>)  
</t>
<t>
<figure>
<artwork>

  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         |  Sub-type     |   Global Administrator        |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|
 |         Global Administrator (cont.)                          |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |         Global Administrator (cont.)                          |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |         Global Administrator (cont.)                          |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | Global Administrator (cont.)  |   Local Administrator         |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

              Figure 2-2  
 
The 20 octets of value are given in the following format: 


Global Administrator: IPv6 address assigned by Internet Registry 
Local Administrator:  2 bytes of Local Administrator 
</artwork>
</figure>
</t>
<t>
<figure>
<artwork>
Table 2-6 transitive IPv6-Address-Specific Actions 
Value   Description                  Name   Reference
=====   =======================      =====  ==========
0x01    Flow Spec Action Chain       ACO    [This document]
0x0C    Flow Spec redirect-v6-flag   RD6F   [IDR-WG-RD6f]
0x0D    Flow Spec rt-redirect        RDv6   ]RFC8956]  	 
        IPv6 format 
	        			 
              Figure 3-16 	
</artwork>
</figure>
</t>
<t>
<list> 
<t> [RFC8956] -  <xref target="RFC8956"></xref>  
</t> 
<t>IDR-WG-RD6F - <xref target="I-D.ietf-idr-flowspec-redirect-ip"></xref>
</t>
</list>
</t> 
</section>
<section title="FSv2 Actions encoded in Community Attribute">
<t>
The user-ordered FSv2 Actions use the Communities Path Attribute defined 
in <xref target="I-D.ietf-idr-wide-bgp-communities "></xref>.
The Community BGP Path attribute is a flexible Community container which allows 
different formats for different community applications.  The FSv2 
Community Type ([FSv2-CA], type=TBD4) is only used for FSv2 
user-ordered actions.
</t>
<t> If both the Extended Community FSv2 Actions (FSv2-EC) and the 
FSv2 Community Attribute actions are specified (FSv2-CA) then
the default preference will be the FSv2-CA prior to the 
FSv2-EC. This preference may be changed
based on a configuration knob.  However, this configuration 
MUST be consistent within an Autonomous System or a
group of Autonomous Systems where both the FSv2-CA and FSv2-EC 
are deployed.  
</t> 
<section title="FSv2 Actions in Community Path Attribute">
<t>
The Community attribute (Type = BGP Community Container, value 34) 
<figure>
<artwork>

  Community Path attribute common header
  
   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 FSv2     |    Flags  |C|T|   Reserved    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            Length             |&lt;sequence of FSv2-Action-TLV&gt;+ |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                     
			  figure 2-3
</artwork>
</figure>
</t>  
<t>
<figure>
<artwork>
where: 

Type = the type of community (Type 1 or Type 2)
Flag = an octet of bits with only two 
       bit that can be set 
	   T = 1 - Transitive across AS boundaries 
	   T = 0 - Non-Transitive across AS boundaries 
	   C = 1 - Transitive across Confederation boundaries 
	   C = 0 - Non-Transitive across Confederation boundaries

			  figure 2-4	  
</artwork>
</figure>
</t>
<t>
The FSv2 Action TLVs have the following format: 
<figure>
<artwork> 

Common Header for Action TLVs 
 
 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           User Action order                                   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           Dependency chain ID                                 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Sequence of Action SubTLVs                                    | 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


Each Action SubTLV has the format: 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|        Action type            |  Length                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Action Value                                                 | 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

			  figure 2-5 	
</artwork>
</figure>
</t>
<t>where:
<list> 
<t>User Action Order - 4 octet field indication user defined action order.
</t>
<t>Dependency chain ID - 4 octet field indicating dependency chain identification.
(Editor's note: Dependency chain needs further discussion from WG.} 
</t> 
<t>Sequence of Action SubTLVs - The type-length-value fields specified per 
Action type. 
</t> 
</list>
</t>
</section> 
</section> 
</section> 
<section title="Conflicts in FSv2 Extended Communities Actions">
<section title="Conflicts between FSv1 Actions">
<t>
<figure>
<artwork>  
Table 3-1: Conflicts between FSv2 Transitive Generic IPv4 actions 
		
IPv4 Extended Communities (Type 0x80)  
Value   Name  Conflicts with 
=====   ===== ========================
0x01    ACO   none   
0x06	TRB   TRP
0x07	TAIS  duplication also done in
              RDIP, RIPv4, RGID 
0x08	RDIP  redirection done in 
              RIPv4, RGID
              copy done in TAIS			  
0x09	TMDS  none 
0x0C    TRP   TRB
0xOD    SFCC  none      
        			 
</artwork>
</figure>
</t> 
<t>
<figure>
<artwork>
Table 3-2 Transitive IPv6-Address-Specific Actions 
Value   Name   Conflicts with 
=====   ====== =================  
0x01    ACO    none 
0x0C    RD6F   RDv6 
0x0D    RDv6   RD6F   	 

</artwork>
</figure>
</t>
</section> 
</section> 
<section title="Actions Proposed for FSv2 for Basic IP">
<t>
The long-term goal of the FSv2 actions is to allow user ordering of the 
flow specification actions.  Only the Community Path Attribute provides enough 
structured space for user ordering of actions. The IDR WG draft 
<xref target="I-D.ietf-idr-flowspec-v2"></xref> 
contains the long-term plan for FSv2 filters with actions. 
Any new Actions for FSv2 should be specified in both the 
Extended Community format and the Community Path Attribute formatt. 
</t> 
<t>
The FSv2 for Basic IP  will support existing IPv4 from
 <xref target="RFC8955"></xref>, and 
existing IPv6 actions from <xref target="RFC8956"></xref> and 
one additional feature for action chain ordering (ACO). 
</t>
<t>
An action chain for FSv2 Extended Community actions 
is defined as a series of Extended Communities which are
attached to a set of filters. 
</t>
<t>
The action chain ordering (ACO)action provides a 
set of flags that define a clear action if failure 
occurs. One of the issues with FSv1 is the lack of 
a clear definition on what happens if multiple 
actions interact.  The existence of the Action chain 
ordering action enforces that the actions will
have a deterministic outcome during failures.
</t>
<t>
The AC-Failure types are:  
 <list style="symbols">
 <t>0x00 – default – stop on failure  
 </t>
 <t>0x01 – continue on failure (best effort on actions)
 </t>
 <t>0x02 – conditional stop on failure (depends on AC-Failure-value/policy)  
 </t>
 <t>0x03 – rollback do all or nothing (depends on AC-Failure-value/policy)  
 </t>
 </list>
 </t>
<t>Editors note: The following options for encoding ACO exist. 
<list style="hanging">
<t hangText="Option 1:">redefine bits in Traffic Action subtype
</t> 
<t hangText="Option 2:">create a new Extended Community
</t>
</list>
</t> 
<section title="Action Chain Ordering">
 <section title="Option 1: Action Chain operation IPv4 Extended (ACO)(1, 0x01)">
 <t>
 <figure>
 <artwork>
   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 high    |  Type low(01) |AC-failure-type|  AC-Failure   |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |          AC-Failure-value (cont.)                             |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
                    Figure 4-1 
 </artwork> 
  </figure> 
 </t>
 <t>SubTLV: 0x01 
 </t>
 <t>Length: 6 octets
 </t>
 <t>Value:
 <list>
  <t>AC-dependence - 1 octet byte of flag regarding dependency 
 </t> 
 <t>AC-failure-type – 1 octet byte that determines the action on failure  
 </t> 
 <t>AC-failure-value – variable depending on AC-failure-type. 
 </t>
 </list>
 </t>
 <t>Actions may succeed or fail and an Action chain must deal with it.  
 The default value stored for an action chain that does not have this action chain is “stop on failure”.
</t>
 <t>where:
 <list>
 <t>AC-Failure types are:  
 <list style="symbols">
 <t>0x00 – default – stop on failure  
 </t>
 <t>0x01 – continue on failure (best effort on actions)
 </t>
 <t>0x02 – conditional stop on failure – depending on AC-Failure-value 
 </t>
 <t>0x03 – rollback – do all or nothing - depending in AC-Failure-value 
 </t>
 </list>
 </t>
 <t>AC-Failure values:  TBD</t>
 </list>
 </t>
 <t>Interactions with other actions: Interactions with all other Actions  </t>
 <t>Ordering within Action type: By AC-Failure type  </t>
</section>
 <section title="Option 2: Action Chain operation encoded in IPv4/IPv6 Community Traffic Action (0x07) ">
 <t>
 <figure>
 <artwork>
   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 high    |  Type low(07) |traffic action field  (zero)   |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |          AC-Failure-value (cont.)                   | ACO |S|T|
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
                 figure 4-2 
 
 Where 
 ACO - is the Action Chain failure types (0x00 to 0x03) 
       00 - stop on failure 
	   01 - continue on failure 
	   02 - conditional stop on failure (by policy) 
	   03 - rollback on failure (with policy) 
 S - Sample flag 
 T - Terminal action 
 </artwork> 
  </figure> 
  </t>
  </section> 
</section>  
</section>
<section title="Actions Proposed for FSv2 Actions ">
<section title="Summary of FSv2 Extended Community [FSv2-EC] in WG (actual or proposed)">
<t>
Table 5-1 shows the actions for Extended-Communities 
FSv2 actions from IDR RFCs, IDR WG drafts and drafts proposed to 
IDR. The link between the short names and the IETF draft names 
is shown in Table 5-2. Table 5-3 has FSv2 actions proposed for IPv6.
</t>
<t>The FSv2 Extended Communities actions (FSv2-EC actions) would
take a default ordering based on the numerical order of 
the action id (act-id).  For example, ACO (act-id = 1) would be 
processed before Traffic Actions per interface group (act-id = 3). 
</t> 
<t>A match on an IP Filters can request a non-IP action. 
Table 5-3 gives a list of Non-IP functions defined for 
FSv2-EC action. The order of processing the non-IP action 
is done by the action id (act-id).  FSv2 rules can link 
non-IP actions can be to IP filters.
For example, the SFC filters for IP link an SFC
classifier action (name: TISFC, Action-id = 31).   
</t> 
<t>
Table 5-4 contains FSv2 actions for IPv6. 
The size of the IPv6 fields require a unique space
for some redirect actions in Extended Communities. 
(Editor's note: IPv6 Extended Community actions do not 
have to be unique in the TLV formats in the Community Attribute.) 
</t> 
<t>
<figure>
<artwork>
 Table 5-1  All IP Actions in Extended Communities  
 
 act-id Name   Description        Document 
 ====== =====  ================   ======================
  00    RSV    Reserved           [this document] 
  01    ACO    action chain order [this document] 
  02    TBA    Unassigned         [this document] 
  03    TAIS   traffic actions    [IDR-FSv2-ifset]
               per interface group
		
  04    TBA    to be assigned     [this document] 
  05    TBA    to be assigned     [this document] 
  06    TRB    traffic rate       [RFC8955]
               limited by bytes 
  07    TA     traffic action     [RFC8955] 
               (terminal/sample) 
  08    RDIP   Redirect IPv4      [IDR-FSv2-RDP-ip] 
  09    TM     Mark DSCP value     {RFC8955] 
  10    TBA    Unassigned         [this document] 
  11    TBA    Unassigned         [this document] 
  12    TRP    traffic rate       [RFC8955] 
                limit by packet  
  13    TISFC  SFC Classifier     [RFC9015]  
  14    RDIID  redirect to        [IDR-FSv2-RDPIID]
                Indirection-id    [PD-FSv2-mobility] 
		  	    move from 0x00) 

  15     TBA    Unassigned        [this document]  
  16     TBA    Unassigned        [this document]
  17     NRP-ID Encapsulate       [IDR-net-slice-ts] 
                 NRP-ID value  
    
  18    GrP-ID  Set Group ID      [PD-peng-group-sub] 
   
            Figure 3-15 
 
 </artwork>
  </figure>
  </t>
  <t>
<figure>
<artwork>
Table 5-2 Short Names to IETF documents 

 Short-name         Filename 
 =================  ===============================
 IDR-FSv2           draft-ietf-idr-flowspec-v2-04 
 IDR-FSv2-ifset     draft-ietf-idr-flowspec-interfaceset-05
 IDR-FSv2-linkbw    draft-ietf-idr-linkbandwidth
 IDR-FSv2-RDP-ip    draft-ietf-idr-flowspec-redirect-ip-02 
 IDR-FSv2-RDPIID    draft-ietf-idr-flowspec-redirect-path
 IDR-net-slice-ts   draft-ietf-idr-flowspec-network-slide-ts-02
 IDR-FSv2-L2VPN     draft-ietf-idr-flowspec-l2vpn-17
 IDR-FSv2-mpls      draft-ietf-idr-fsv2-mpls-actions 
 IDR-FSv2-SR        draft-ietf-idr-fsv2-sr-actions 
 PD-FSv2-mobility   draft-dmc-flowspec-tn-aware-mobility
 PD-peng-group-sub  draft-peng-idr-apn-bgp-flowspec-00 
 PD-redirect-IPv6   draft-ietf0-idr-path-redirect-12
 </artwork>
  </figure>
  </t>
  <t>
<figure>
<artwork>
 Table 5-3 All Non-IP Actions in Extended Communities  
 
 act-id Name    Description        Reference  
 ====== =====   ================   ================
 31     TISFC   SFC classifier II  [RFC9015]- moved  
 32     MPLSLA  MPLS label action  [IDR-FSv2] 
                                   [IDR-FSv2-mpls]   
 33     VLAN    VLAN-Action (0x16) [ID-FSv2-L2VPN] 
 34     TPID    TPID-Action (0x17) [ID-FSv2-LVPN] 
 24-    TBA     to be assigned 
  254   TBA     to be assigned 
 255    reserved 

          Figure 3-15  
  </artwork>
  </figure>
  </t>
<t>
  <figure> 
  <artwork> 
Table 5-4 IPv6 Extended Communities (Type 1) 

Value   Description                  Name   Reference
=====   =======================      =====  ==========
0x01    Flow Spec Action Chain       ACO    [This document]
0x0C    Flow Spec redirect-v6-flag   RD6F   [PD-redirect-IPv6]                                                                            
0x0D    Flow Spec rt-redirect        RD6    [RFC8956]  
        IPv6 format 
</artwork>
</figure> 
</t> 
</section>
<section title="Actions proposed for FSv2 Community Path Attribute">
<t>The FSv2 Community Path Attribute could inherits the FSv2 Extended 
Community actions (FSv2-EC) with the same action identifiers (act-id)
numbering.  For each of the actions, a new form of the FSv2-EC would 
need to be defined. The next section is set-aside for definition 
of the FSv1 based attributes standardized in <xref target="RFC8955"></xref>
and <xref target="RFC8956"></xref>>, and deployed FSv1 actions. 
New FSv2-EC must define both an Extended Community form 
and a Community Path Attribute form.  
</t> 
<section title="FSv2 Community Path Attribute for FSv1 actions">
<t>The following FSv2 Communjity Path Attributes created from FSv1 actions 
will be defined in this section: 
<list>
<t> action chain order (ACO)(type = 01), 
</t>
<t> traffic actions per interface group (TAIS) (type = 02), 
</t> 
<t> traffic rate limited by bytes (TRB (type = 06), 
</t>
<t> traffic actions (TA) (type = 07), 
</t>
<t> redirect IPv4 (RDIP) (type = 08), 
</t> 
<t> mark DSCP valiue (TM) (type = 09), 
</t>
<t> traffic rate limit by packet (TRP)(type = 12),  
</t>
<t> SFC Classifier (TISFC) (type = 13),  
</t>
<t> Redirect to Indirection-ID (type=14), 
</t>
<t> Encapsulate in NRP-ID (type = 17)
</t>
<t> Set Group ID (type = 18) 
</t> 
</list>
</t> 
</section> 
<section title="Current Proposals for FSv2 in Community Path Attribute">
<t>The current actions proposed for the FSv2 Community Path Attribute 
are are shown in Table 5-5.  The 
</t>
<t>
<figure>
<artwork>
 Table 5-5  All Actions Proposed for FSv2 Community Path Attribute
 act-id Name        Description      Document 
 ====== =========   ==============   ======================
  TBD   MatchSet    Match and Set    [IDR-rpd] (type = 03) 
                    attribute 	  
  TBD   MatchNoA    Match and No     [IDR-rpd] (type = 04) 
                    Advertise 
				   
  TBD   DetLat      Deterministic    [PD-detnet-flowmap] (
                    Latency action   (type = 37)  
  TBD   TSNMap 		Map flow to      [PD-detnet-flowmap] 
                    TSN stream       (type = 38) 
</artwork> 
</figure>
</t> 
<t>Table 5-6 File Names </t>
<t>
<list>
<t>IDR-rpd - <xref target="I-D.ietf-idr-rpd"></xref>
</t>
<t>PD-detnet-flow-map -<xref target="I-D.xiong-idr-detnet-flow-mapping"></xref>
</t>
</list>
</t>
</section> 
</section>
</section> 
<section title="Validation and Ordering of Actions">
<t>The validation of FSv2 NLRI adheres to the combination of rules for general 
BGP FSv1 NLRI found in <xref target="RFC8955"></xref>, <xref target="RFC8956"></xref>,
<xref target="RFC9117"></xref>, and the specific 
additions made for SFC NLRI <xref target="RFC9015"></xref>, and L2VPN NLRI 
<xref target="I-D.ietf-idr-flowspec-l2vpn"></xref>.
</t>
<t>The precedence for FSv2 actions are described in this section rather 
than simply referring to the relevant portions of these RFCs.  
Validation only occurs after BGP UPDATE message reception and 
the FSv2 NLRI and the path attributes relating to FSv2 (Extended
community and Wide Community) have been determined to be well-formed.  Any 
MALFORMED FSv2 NRLI is handled as a “TREAT as WITHDRAW” <xref target="RFC7606"></xref>. 
</t>
<section title="Validation of Flow Specification Actions">
<t> FSv2 actions may specify actions using Extended Communities or 
the path attribute Community with the FSv2 format. 
The FSv2 actions in Extended Communities and Wide communities 
can be associated with large number of NLRIs. 
</t>
<t>
Actions may conflict, duplicate, or complement other actions. An 
example of conflict is the packet rate limiting by byte and by packet.
An example of a duplicate is the request to copy or sample a packet under
one of the redirect functions (RDIPv4, RDIPv6, RDIID, )
Each FSv2 actions in this document defines the potential conflicts or duplications. 
Specifications for new FSv2 actions outside of this specification MUST
specify interactions or conflicts with any FSv2 actions (that appear in this specification or 
subsequent specifications).  
</t>
<t>Well-formed syntactically correct actions should be linked to a 
filtering rule in the order the actions should be taken.  
If one action in the ordered list fails, the default procedure is 
for the action process for this rule to stop and flag the error via system management.  
By explicit configuration, the action processing may continue after errors.
</t>
<t>Implementations MAY wish to log the actions taken by FS actions (FSv1 or FSv2).    
</t>
</section>
<section title="Ordering of Actions"> 
<t>
The ordering of precedence for these actions in the case are:
<list style="symbols">
<t>Action user-order number zero is defined to have an Action type of 
“Set Action Chain operation” (ACO) that defines the default action chain process. 
</t>
<t>user order (1 to N-1) 
</t>
<t>Extended Community Actions {starting at N) 
</t>
</list> 
</t>
<t>By default, extended community actions are associated with default order number 32768 [0x8000] 
or a specific configured value for the FSv2 domain.  
</t>
<t> Within the actions defined at the same order, the 
order is: 
<list>
<t> Action ID (lowest to highest)
</t> 
<t>If multiple Actions of the same value are 
define (e.g. Redirection to Indirection ID), 
the action must define the order. 
</t>
</list> 
</t> 
<t>
All Extended Community actions and Path Community 
attributes should be ordered in the same IP space. 
</t>
</section> 
<section title="Summary of FSv2 ordering">
<t>Operators should use user-defined ordering to clearly specify the actions
desired upon a match.  The FSv2 actions default ordering is specified to  
provide deterministic order for actions which have the same user-defined 
order and same type.
</t>
<t>
<figure>
<artwork>

FS Action                          Value Order 
(lowest value to highest)          (lowest to highest) 
================================   ==============================
0x01: ACO: Action chain operation  Failure flag
0x02: TAIS:Traffic actions per     AS, then Group-ID, then Action ID 
       Interface group		 
	   
0x03-0x05 to be assigned           TBD
0x06: TRB: Traffic rate limit      AS, then float value 
      by bytes 
0x07: TA: Traffic Action           traffic action value 	
0x08: RDIP: Redirect to IP 	       AS, then IP Address, then ID
0x09: TM: Traffic Marking          DSCP value (lowest to highest)
0x0A: AL2: Associated L2 Info. 	   TBD 
0x0B: AET: Associated E-tree Info. TBD   
0x0C: TRP: Traffic Rate limit      AS, then float value 
         by bytes 
0x0D: RDIPv6: Traffic               
        Redirect to IPv6           AS, IPv6 value, then local Admin
0x0E: TISFC: Traffic insertion 
     to SFC                        SPI, then SI, the SFT
0xOF: Redirect to
          Indirection-ID           ID-type, then Generalized-ID
		  
0x10: MPLSLA: MPLS Label stack     order, action, label, Exp   
0x16 – VLAN action                 rewrite-actions, VALN1, VLAN2,
                                   PCP-DE1, PCP-DE2
0x17 – TPID action                 rewrite actions, TP-ID-1, TP-ID-2 
       	
		 Figure 6-1
</artwork>
</figure>
</t>
</section>
</section>
<section title="Error handling">
<t>The following two error handling rules must be followed by 
all BGP speakers which support FSv2:
<list style="symbols">
<t>FSv2 NLRI having TLVs which do not have the correct lengths or syntax must be considered MALFORMED.  
</t>
<t>FSv2 NLRIs having TLVs which do not follow the above ordering rules described in 
section 4.1 MUST be considered as malformed by a BGP FSv2 propagator.
</t>
</list>
The above two rules prevent any ambiguity that arises from the multiple copies of 
the same NLRI from multiple BGP FSv2 propagators. 
</t>
<t>A BGP implementation SHOULD treat such malformed NLRIs as ‘Treat-as-withdraw’ 
<xref target="RFC7606"></xref>  
</t>
<t>
An implementation for a BGP speaker supporting both FSv1 and FSv2 MUST 
support the error handling for both FSv1 and FSv2. 
</t>
</section>

<section title="Example for Ordering of the Actions ">
<section title="Example of Action Chain Operation (ACO)">
<t>The “Action Chain Operation” (ACO) changes the way the actions after the 
current action in an action chain are handled after a failure.  If no action chain operations 
are set, then the default action of “stop upon failure” (value 0x00) will be 
used for the chain.  
</t>
<section title="Example 1 - Default ACO">
<t>Use Case 1: Rate limit to 600 packets per second  </t>
<t>Description: The provider will support 600 packets per second 
All Packets sampled for reporting purposes and packet streams 
over 600 packets per second will be dropped. 
</t>
<t> Suppose BGP Peer A has a   
<list style="symbols">
<t> a Wide Community action with user-defined order 10 with Traffic Sampling</t>
<t> a Wide Community action with user-defined order 11 from AS 2020 
that limits packet-based rate limit of 600 packets per second. 
</t>
<t>an Extended Community from AS 2020 that 
does limits packet-based rate limit of 50 packets per second.    
</t>
</list>
</t>
<t>The FSv2 data base would store the following action chain: 
<list style="symbols">
<t>at user-defined action order 10
<list>
<t>A user action of type 7 (traffic action) with values of Sampling and logging.  
</t>
</list>  
</t>
<t> at user-defined action order 11
<list>
<t> a user action type of 12 (packet-based rate limit) with values of AS 2020 and float value 
for 600 packets per second (pps)  
</t>
</list>
</t>
<t>at user-defined action order 32768 (0x8000) with type 12 and values of 
A user action of type 12 with values of AS 2020 and float value of 50 packets/second.  
</t>
</list>
</t>
<t>Normal action: 
<list>
<t>The match on the traffic would cause a sample of the traffic (probably with
packet rate saved in logging) followed by a rate limit to 600 pps. 
The Extended community action would further limit the rate 
to 50 packets per second. </t>
</list>
</t>
<t>When does the action chain stop? 
<list>
<t>The default process for the action chain is to stop on failure. 
If there is no failure, then all three actions would occur. 
This is probably not what the user wants. 
</t>
<t>If there is failure at action 10 (sample and log), then 
there would be no rate limiting per packet (actions 11 and action 32768).  
</t>
<t>If there is failure at action 11 (rate limit to packet 600), 
then there would be no rate limiting per packet (action 32768). 
</t>
</list>
</t> 
<t> The different options for Action chain ordering (ACO) have been 
worked on with NETCONF/RESTCONF configuration and actions. 
</t>
</section> 
<section title="Example 2: Redirect traffic over limit to processing via SFC">
<t>
Use case 2:  Redirect traffic over limit to processing via SFC. 
</t>
<t>
Description: The normal function is for traffic over the limit to 
be forwarded for offline processing and reporting to a customer. 
</t>  
<t>Suppose we have the following 4 actions defined for a match: 
<list style="symbols">
<t> Sent
 Redirect to indirection ID (0x01) with user-defined match 2 attached in wide community, 
</t>
<t> Traffic rate limit by bytes (0x07) with user-defined match 1 attached in wide community,  
</t>
<t> Traffic sample (0x07) sent in extended community, and 
</t>
<t> SF classifier Info (0x0E) sent in extended community. 
</t>
</list>
</t>
<t>These 4 filters rate limit a potential DDoS attack by: a) redirect the 
packet to indirection ID (for slower speed processing), sample to local 
hardware, and forward the attack traffic via a SFC to a data collection box. 
</t>
<t>The FSv2 action list for the match would look like this 
<list>
<t>Action 0: Operation of action chain (0x01) (stop upon failure)</t>
<t>Action 1: Traffic Rate limit by byte (0x07)</t>
<t>Action 2: Redirect to Redirection ID (0x0F) </t>
<t>Action 32768 (0x8000) Traffic Action (0x07) Sample </t>
<t>Action 32768 (0x8000) SFC Classifier: (0xE)</t>
</list>
</t>
<t>If the redirect to a redirection ID fails, then Traffic Sample and sending the data to 
an SFC classifier for forwarding via SFC will not happen. The traffic is limited, 
but not redirect away from the network and a sample sent to DDOS processing 
via a SFC classifier. 
</t>
<t>Suppose the following 5 actions were defined for a 
FSV2 filter: 
<list style="symbols">
<t>Set Action Chain Operation (ACO) (0x01) to continue on failure (ox01) 
at user-order 2 attached in wide community,   
</t>
<t>redirect to indirection ID (0x0F) at user-order 2 attached in wide community, 
</t>
<t>traffic rate limit by bytes (0x07)with user-order 1 attached in wide community,  
</t>
<t>Traffic sample (0x07) attached via extended community, and 
</t>
<t>SFC classifier Info (0x0E) attached in extended community. 
</t>
</list>
</t>
<t>The FSv2 action list for the match would look like this:
<list>
<t>Action 00: Operation of action chain (0x01) (stop upon failure)
</t>
<t>Action 01:Traffic Rate limit by byte (0x07)
</t>
<t>Action 02:Set Action Chain Operation (ACO) (0x01) (continue on failure)
</t>
<t>Action 02: Redirect to Redirection ID (0F)
</t>
<t>Action 32768 (0x8000): Traffic Action (0x07) Sample 
</t>
<t>Action 32768 (0x8000): SFC classifier (0x0E) forward via SFC [to DDoS classifier]
</t>
</list>
If the redirect to a redirection ID fails, 
the action chain will continue on to sample the data and enact SFC classifier actions. 
</t>
</section> 
</section>
</section>

 <section anchor="IANA" title="IANA Considerations">
   <t>This section complies with <xref target="RFC7153"></xref>.
   </t>
   <section title="FSV2 Action TLV Types ">
   <t>IANA is requested to create the following entries 
      on a new "Flow Specification v2 Action” web page.  
   <figure>
   <artwork>
   
   Name: BGP FSv2 Action types 
   Reference: [this document]
   Registration Procedure: 0x01-0x3FFF Standards Action.

    Type     Use                           Reference
   -----  ---------------                 ---------------
   0x00   Reserved                        [this document]
   0x01   ACO: Action Chain Operation 	  [this document]
   0x02   TAIS: Traffic actions per 
          interface group                 [this document]
   0x03   Unassigned                      [this document]
   0x04   Unassigned                      [this document]		 
   0x05   Unassigned                      [this document]
   0x06   TRB: traffic rate 
           limited by bytes                [this document]
   0x07   TA: Traffic action 
          (terminal/sample)               [this document]  
   0x08   RDIPv4: redirect IPv4           [this document] 
   0x09   TM: traffic marking (DSCP)      [this document] 
   0x0A   AL2: associate L2 Information   [this document] 
   0x0B   AET: associate E-Tree 
           information                    [this document]  
   0x0C   TRP: traffic rate 
           limited by packets             [this document] 
   0x0D   RDIPv6: Redirect to IPv6        [this document]    
   0x0E   TISFC: Traffic insertion 
           to SFC                         [this document]
   0x0F   RDIID: Redirect 
           to indirection-iD              [this document]
   0x10   MPLS Label Action               [this document]
   0x11   unassigned                      [this document]
   0x12   unassigned                      [this document]
   0x13   unassigned                      [this document]
   0x14   unassigned                      [this document]
   0x15   unassigned                      [this document]
   0x16   VLAN action                     [this document]
   0x17   TIPD action                     [this document]
   0x18-
   0x3ff  Unassigned                      [this document]
   0x4000-
   0x7fff Vendor assigned                 [this document]
   0x8000-
   0xFFFF Reserved                        [this document]
   </artwork>
   </figure>
   </t>
   </section> 
   <section title="Wide Community Assignments">

   <t>   
   IANA is requested to assign values from the 
   Registered Type TBD4 BGP Wide Community Types: 
   <figure> 
   <artwork>

   Name                    type Value 
   ------                  -----------
   FSv2 Actions            TBD4 
   
   </artwork>
   </figure>
   </t>
   </section>
 </section>
 <section title="Security Considerations">
   <t>The use of ROA improves on <xref target="RFC8955"></xref>
   by checking to see of the route origination. This check can improve the 
   validation sequence for a multiple-AS environment.  
   </t>
   <t>>The use of BGPSEC  <xref target="RFC8205"></xref> to secure the packet
   can increase security of BGP flow specification information sent in the packet.  
   </t>
   <t>The use of the reduced validation within an AS <xref target="RFC9117"></xref>
   can provide adequate validation for distribution of flow specification within a single 
   autonomous system for prevention of DDoS. 
   </t>
   <t>Distribution of flow filters may provide insight into traffic being sent within 
   an AS, but this information should be composite information that does not reveal the
   traffic patterns of individuals. 
   </t>
</section>
</middle>
<back>
    <references title="Normative References">
	  &RFC0791;
      &RFC2119;
	  &RFC3032;
      &RFC4271;
	  &RFC4360;
	  &RFC4760;
	  &RFC5065;
	  &RFC5701;
	  &RFC6482;
	  &RFC7153;
	  &RFC7606;
	  &RFC8174;
	  &RFC8955;
	  &RFC8956;
	  &RFC9015;
	  &RFC9117;
	  &RFC9184;
	  &I-D.ietf-idr-wide-bgp-communities;
	  &I-D.ietf-idr-flowspec-l2vpn;
	  &I-D.ietf-idr-flowspec-nvo3;
	  &I-D.ietf-idr-flowspec-srv6;
	  &I-D.ietf-idr-flowspec-interfaceset;
	  &I-D.ietf-idr-flowspec-path-redirect;
	  &I-D.ietf-idr-flowspec-mpls-match;
	  &I-D.ietf-idr-bgp-flowspec-label;
	  &I-D.ietf-idr-rpd;
	  &I-D.ietf-idr-flowspec-redirect-ip;
	  &I-D.hares-idr-fsv2-ip-basic;
	  &I-D.hares-idr-fsv2-more-ip-filters;
	  &I-D.hares-idr-fsv2-more-ip-actions; 
      &I-D.xiong-idr-detnet-flow-mapping; 
	</references>
	<references title="Informative References">
	&RFC6241; 
	&RFC8040;
	&RFC8205;
	&RFC8206;
	&I-D.ietf-idr-flowspec-v2;
	 </references>
  </back>
</rfc>