<?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-liu-idr-flowspec-ifit-02" ipr="trust200902">
  <front>
    <title abbrev="draft-liu-idr-flowspec-ifit-02">BGP Flow Specification Extensions to Enable IFIT</title>

    <author fullname="Min Liu" initials="M." role="editor" surname="Liu">
      <organization>Huawei</organization>

      <address>
        <postal>
          <street>156 Beiqing Rd., Haidian District</street>

          <city>Beijing</city>

          <code/>

          <region/>

          <country>China</country>
        </postal>

        <phone/>

        <facsimile/>

        <email>lucy_liumin@huawei.com</email>
      </address>
    </author>

    <author fullname="Yali Wang" initials="Y." role="editor" surname="Wang">
      <organization>Huawei</organization>

      <address>
        <postal>
          <street>156 Beiqing Rd., Haidian District</street>

          <city>Beijing</city>

          <region/>

          <code/>

          <country>China</country>
        </postal>

        <phone/>

        <facsimile/>

        <email>wangyali11@huawei.com</email>

        <uri/>
      </address>
    </author>
	
	<author fullname="Ran Pang" initials="R." role="editor" surname="Pang">
      <organization>China Unicom</organization>

      <address>
        <postal>
          <street>9 Shouti South Rd., Haidian District</street>

          <city>Beijing</city>

          <region/>

          <code/>

          <country>China</country>
        </postal>

        <phone/>

        <facsimile/>

        <email>pangran@chinaunicom.com</email>

        <uri/>
      </address>
    </author>

    <date day="09" month="March" year="2020"/>

    <workgroup>Interdomain Routing Working Group</workgroup>

    <abstract>
      <t>BGP Flowspec mechanism propogates both traffic Flow Specifications 
	  and Traffic Filtering Actions by making use of the BGP NLRI and the BGP Extended Community encoding formats. 
	  This document specifies a new BGP Extended Community named IFIT Action Specific Extended Community to distribute In-situ Flow Information Telemetry (IFIT) actions so as to address the automatical deployment of IPv6 unicast and VPNv6 unicast on-path flow telemetry.</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 anchor="Introduction" title="Introduction">
      <t>At present, a family of on-path flow telemetry techniques referred in <xref
      target="I-D.song-opsawg-ifit-framework"/> are emerging, including In-situ
      OAM (IOAM) <xref target="I-D.ietf-ippm-ioam-data"/>, PBT <xref
      target="I-D.song-ippm-postcard-based-telemetry"/> , IOAM Direct Export
      (DEX) <xref target="I-D.ioamteam-ippm-ioam-direct-export"/> , Enhanced Alternate Marking (EAM) <xref target="I-D.zhou-ippm-enhanced-alternate-marking"/>, etc. we categorize these on-path telemetry echniques as the hybrid OAM type I 
	  according to the classification defined in <xref target="RFC7799"> </xref>. 
	  These techniques provide flow information on the entire forwarding path on a per-packet basis in real 
	  time, which are invaluable for application-aware network operations not only in data center and enterprise networks but  also in carrier networks which may cross multiple domains. 
	  The data provided by on-path telemetry are especially useful for network operations in aspects of SLA compliance, service path enforcement, fault diagnosis, and network resource optimization. 
	  In IFIT reflection-loop architecture <xref
      target="I-D.song-opsawg-ifit-framework"/>, an IFIT application needs to choose a 
	  suite of telemetry tecchniques and apply an initial 
	  technique to the data plane in accordance to the monitoring and measurement requirements. Then the IFIT head nodes also need to decide 
	  the target flows and packets to enable the IFIT-specific functions and the telemetry data sets.</t>
	  
	  <t>However, applying only a single underlying on-path telemetry technique may lead to defective result. A comprehensive solution needs the flexibility to switch between different underlying techniques and adjust the configurations and parameters to adapt to different network conditions and different application requirements. Hence, it's necessary to make the control and configuration dynamically to the IFIT nodes.</t>

      <t>As we know, Dissemination of Flow Specification Rules <xref
      target="I-D.ietf-idr-rfc5575bis"> </xref> provides a protocol extension
      for propagation of traffic flow information for the purpose of rate
      limiting, filtering, shaping, classifying or redirecting. And BGP extended 
	  community encoding formats can be used to propagate traffic filtering 
	  actions along with the flow specification NLRI. Those traffic filtering actions encode actions a routing system can take if the packet matches the flow specifications. 
	  And the other document 
	  <xref target="I-D.ietf-idr-flow-spec-v6"> </xref> extends BGP Flowspec
      <xref target="I-D.ietf-idr-rfc5575bis"> </xref> and to make it also usable and applicable to IPv6 data packets.</t>
	  
	  <t>From an operational perspective, the utilization of BGP Flowspec as the 
	  carrier for the specific flow information allows a network service provider 
	  to reuse BGP route distribute infrastructure. Therefore, this document defines the IFIT action BGP Extended Communities to enable the IFIT application.</t>
    </section>
	
	<section anchor="Terms" title="Terminologies"
               toc="default">
        <t>IFIT: in-situ Flow Information Telemetry</t>

        <t>NLRI: Network Layer Reachability Information</t>
    </section>

    <section anchor="iFITApplication" title="IFIT Application" toc="default">
      <t>The IFIT applications, which enable the future autonomous network operation, 
	  will pick one of proper in-situ telemetry techniques and apply a flow, packet, 
	  and data selection policy to monitor the specific traffic flow for 
	  application-aware network operation. In current deployments, there have been 
	  relatively static methods, ACL-like CLI and Netconf with YANG model to enable 
	  the specific flow or packets from the target flow to be monitored on the 
	  relevant IFIT-capable nodes.</t>

      <t>However, with the evolution of intent-based and automatic network operation, and 
	  the trends of network virtualization, network convergence, and packet-optical integration, future data plane telemetry will support an on-demand and interactive 
	  fashion. Flexibility and extensibility of data defining and acquiring must be 
	  considered. Therefore, flexible configurations and actions need to be deployed 
	  based on the real-time telemetry data analysis results and telemetry requirements of different application.</t>

      <t>BGP Flowspec mechanism is preferred in the reflective-loop network telemetry system. This document defines IFIT Action BGP Extended Communities to enable IFIT actions for the relevant flows that matches the traffic Flow Specifications along with the BGP NLRI defined in <xref
      target="I-D.ietf-idr-rfc5575bis"></xref> and <xref target="I-D.ietf-idr-flow-spec-v6"> </xref>.</t>
    </section>

    <section anchor="iFITAction"
             title="IFIT Action Specific Extended Community">
        <t>This section defines a new BGP Extended Community and different sub-types for 
	    IFIT actions in accordance with different IFIT option types.</t>

        <t>The BGP Extended Community is encoded as an 8-octet quantity, which contains Type field and Value field <xref target="RFC4360"></xref>. The Types are to be 
		assigned by IANA registry. The Value field contains the IFIT actions. </t>

        <t>In IFIT framework architecture, there are a few of available option types for the 
		specified traffic flow, e.g. IOAM pre-allocated/incremental trace <xref target="I-D.ietf-ippm-ioam-data"></xref>, IOM Edge-to-Edge <xref target="I-D.ietf-ippm-ioam-data"></xref>, IOAM Direct Export
      (DEX) <xref target="I-D.ioamteam-ippm-ioam-direct-export"></xref>, Enhanced Alternate Marking (EAM) <xref target="I-D.zhou-ippm-enhanced-alternate-marking"></xref>, etc. As different IFIT options have different formats of parameters, following defines various Sub-types in accordance with different IFIT option types.</t>
		<t><list style="symbols">
			<t> Type xx: IFIT Action</t>
			
			<t> Sub-type xx: IOAM Pre-allocated Trace Option </t>

			<t> Sub-type xx: IOAM Incremental Trace Option </t>

			<t> Sub-type xx: IOAM DEX Option </t>

			<t> Sub-type xx: IOAM Edge-to-Edge Option </t>
		
			<t> Sub-type xx: Enhanced Alternate Marking Option</t>
		</list> </t>
		
        <t>In the following sections, the different IFIT action Extened Communities encoding formats are presented.</t>

        <section title="IOAM Pre-allocated Trace Option sub-type">
          <t>The IOAM tracing data is expected to be collected at every 
		  node that a packet traverses to ensure visibility into the entire 
		  path a packet takes within an IOAM domain. The pre-allocated tracing 
		  option will create pre-allocated space for each node to populate 
		  its information. </t>

          <t>The format of IOAM pre-allocated trace option Extended Community is defined
          as follows: <figure
              title="Fig. 1 IOAM Pre-allocated Trace Option Extended Community">
              <artwork align="center"
                       name="Fig. 1 IOAM Pre-allocated Trace Option Extended Community"><![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     |    Sub-type   |      NamespaceID              |
    +---------------------------------------------------------------+
    | Flags |          IOAM-Trace-Type                      |  Rsvd |  
    +---------------------------------------------------------------+
]]></artwork>
            </figure>Where: </t>
		
          <t>Namespace ID: A 16-bit identifier of an IOAM-Namespace. The
          definition is the same as described in section 4.4 of<xref
          target="I-D.ietf-ippm-ioam-data"/> . </t>
		  
		  <t>Flags: A 4-bit field. The definition is the same as described in
          [I-D.ietf-ippm-ioam-flags] and section 4.4 of <xref
          target="I-D.ietf-ippm-ioam-data"/>.</t>

          <t>IOAM-Trace-Type: A 24-bit identifier which specifies which data
          types are used in the node data list. The definition is the same as
          described in section 4.4 of <xref
          target="I-D.ietf-ippm-ioam-data"/>. </t>

          <t>Rsvd: A 4-bit field reserved for further usage. It MUST be zero.
          </t>
          <t/>
        </section>

        <section title="IOAM Incremental Trace Option sub-type">
          <t> The incremental tracing option contains a variable node 
		  data fields where each node allocates and pushes its node data 
		  immediately following the option header.</t>

          <t> The format of IOAM incremental trace option Extended Community is defined
          as follows: </t>

          <t><figure title="Fig. 2 IOAM Incremental Trace Option Extended Community">
              <artwork align="center"
                       name="Fig. 2 IOAM Incremental Trace Option Extended Community"><![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     |    Sub-type   |      NamespaceID              |
    +---------------------------------------------------------------+
    | Flags |          IOAM-Trace-Type                      |  Rsvd |  
    +---------------------------------------------------------------+
]]></artwork>
            </figure>Where: </t>

          <t>All the other fields definistion is the same as the pre-allocated
          trace option Extended Community in section 3.2.1.</t>
        </section>

        <section title="IOAM DEX Option sub-type">
          <t>The DEX option is used as a trigger to export IOAM data to a collector. 
		  Moreover, IOAM nodes MAY send exported data for all traversing packets 
		  that carry the DEX option, or MAY selectively export data only for a subset 
		  of these packets. The DEX option specifies which data fields should be 
		  exported to the collector, as specified in Section 3.2 of <xref
          target="I-D.ioamteam-ippm-ioam-direct-export"/>. </t>

          <t>The format of IOAM DEX option Extended Community is defined as
          follows: </t>

          <t><figure title="Fig. 3 IOAM DEX Option Extended Community">
              <artwork align="center"
                       name="Fig. 3 IOAM DEX Option Extended Community"><![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     |    Sub-type   |      NamespaceID              |
    +---------------------------------------------------------------+
    |             IOAM-Trace-Type                   |     Flags     |
    +---------------------------------------------------------------+
]]></artwork>
            </figure>Where: </t>
			
          <t>Namespace-ID: a 16-bit identifier of the IOAM namespace, as
          defined in section 4.4 of <xref target="I-D.ietf-ippm-ioam-data"/>.
          </t>
		  
		  <t> IOAM-Trace-Type: a 24-bit identifier which specifies which data
          fields should be exported. The format of this field is as defined in
          section 4.4 of<xref target="I-D.ietf-ippm-ioam-data"/></t>

          <t>Flags: A 8-bit field, comprised of 8 one-bit subfields. Flags are allocated by IANA.</t>          
        </section>

        <section title="IOAM Edge-to-Edge Option sub-type">
          <t>The IOAM edge to edge option is to carry data that is added by
          the IOAM encapsulating node and interpreted by IOAM decapsulating
          node.</t>

          <t>The format of IOAM edge-to-edge option Extended Community is defined as
          follows:</t>

          <t><figure title="Fig. 4 IOAM Edge-to-Edge Option Extended Community">
              <artwork align="center"
                       name="Fig. 4 IOAM Edge-to-Edge Option Extended Community"><![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     |    Sub-type   |              Rsvd             |
    +---------------------------------------------------------------+
    |  NamespaceID                  |      IOAM-E2E-Type            |
    +---------------------------------------------------------------+

]]></artwork>
            </figure>Where: </t>

          <t>Namespace ID: A 16-bit identifier of an IOAM-Namespace. The
          definition is the same as described in section 4.6 of<xref
          target="I-D.ietf-ippm-ioam-data"/>.</t>

          <t>IOAM-E2E-Type: A 16-bit identifier which specifies which data types are used in the E2E option data. The definition is the same as
          described in section 4.6 of <xref
          target="I-D.ietf-ippm-ioam-data"></xref>. </t>
		  
		  <t>Rsvd: A 16-bit field reserved for further usage. It MUST be zero.</t>

          <t/>
        </section>

        <section title="Enhanced Alternate Marking Option sub-type">
          <t>The Alternate Marking <xref
          target="RFC8321"></xref> technique is an hybrid performance
          measurement method and can be used to measure packet loss, latency,
          and jitter on live traffic because it is based on marking
          consecutive batches of packets. </t>

          <t>The Enhanced Alternate Marking (EAM) <xref
          target="I-D.zhou-ippm-enhanced-alternate-marking"/> defines data
          fields for the alternate marking with enough space, in particular
          for Postcard- based Telemetry. More information can be considered
          within the alternate marking field to facilitate the efficiency and
          ease the deployment. </t>

          <t>The format of EAM Option Extended Community is defined as follows:</t>

          <t><figure align="center"
              title="Fig. 5 Enhanced Alternate Marking Option Extended Community">
              <artwork><![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     |    Sub-type   |          Rsvd                 |
	+---------------+---------------+-------+---------------+-------+
	|              FlowMonID                |     Period    |  Rsvd |
	+---------------------------------------+---------------+-------+

]]></artwork>
            </figure> Where: </t>
			
          <t>FlowMonID: A 20-bit identifier to uniquely identify a monitored
          flow within the measurement domain. The definition is the same as
          described in section 2 of <xref
          target="I-D.zhou-ippm-enhanced-alternate-marking"/>. </t>

          <t>Period: A 8-bit field. Time interval between two alternate marking period. The
          unit is second. </t>

          <t>Rsvd: reserved for further usage. It MUST be
          zero.</t>

          <t/>
        </section>

    </section>

    <section anchor="IANA" title="IANA Considerations">

      <section title="IFIT Action Extended Community Types">		
		<t>This document requests a new Transitive Extended Community Type and five new registery sub-types. The new Transitive Extended Community Type
   name shall be "IFIT Action Extended Community
   (Sub-Types are defined in the "IFIT Action Extended Community Sub-Type" registery)".</t>
		
		<t><figure>
            <artwork align="center"><![CDATA[

Type Value                    Name  
---------                     ----------
TBD                           IFIT Action
]]></artwork>
          </figure></t>
        
		<t><figure>
            <artwork align="center"><![CDATA[

Sub-type Value                 Name                               
--------------                 ----------
TBD                            IOAM Pre-allocated Trace Option     
TBD                            IOAM Incremental Trace Option       
TBD                            IOAM DEX Option                     
TBD                            IOAM Edge-to-Edge Option            
TBD                            Enhanced Alternate Marking          


]]></artwork>
          </figure></t>
      </section>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>No new security issues are introduced to the BGP Flow Specifications in
      <xref target="I-D.ietf-idr-flow-spec-v6"> </xref> and
      <xref target="I-D.ietf-idr-rfc5575bis"> </xref>.</t>

      <t/>
    </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t/>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include='reference.RFC.2119'?>

      <reference anchor="RFC7799"
                 target="https://www.rfc-editor.org/info/rfc7799">
        <front>
          <title>Active and Passive Metrics and Methods (with Hybrid Types
          In-Between)</title>

          <author>
            <organization/>
          </author>

          <date/>
        </front>
      </reference>
	  
	  <reference anchor="RFC4360"
                 target="https://www.rfc-editor.org/info/rfc4360">
        <front>
          <title>BGP Extended Communities Attribute</title>

          <author>
            <organization/>
          </author>

          <date/>
        </front>
      </reference>
	  
	  <reference anchor="RFC8321"
                 target="https://www.rfc-editor.org/info/rfc8321">
        <front>
          <title>Alternate-Marking Method for Passive and Hybrid Performance Monitoring</title>

          <author>
            <organization/>
          </author>

          <date/>
        </front>
      </reference>
	</references>
	
	<references title="Informative References">
      <reference anchor="I-D.ietf-idr-rfc5575bis"
                 target="https://datatracker.ietf.org/doc/draft-ietf-idr-rfc5575bis/">
        <front>
          <title>Dissemination of Flow Specification Rules</title>

          <author>
            <organization/>
          </author>

          <date/>
        </front>
      </reference>

      <reference anchor="I-D.ietf-idr-flow-spec-v6"
                 target="https://datatracker.ietf.org/doc/draft-ietf-idr-flow-spec-v6/">
        <front>
          <title>Dissemination of Flow Specification Rules for IPv6</title>

          <author>
            <organization/>
          </author>

          <date/>
        </front>
      </reference>

 
      <reference anchor="I-D.song-opsawg-ifit-framework"
                 target="https://datatracker.ietf.org/doc/draft-song-opsawg-ifit-framework/">
        <front>
          <title>In-situ Flow Information Telemetry Framework</title>

          <author>
            <organization/>
          </author>

          <date/>
        </front>
      </reference>

      <reference anchor="I-D.ietf-ippm-ioam-data"
                 target="https://datatracker.ietf.org/doc/draft-ietf-ippm-ioam-data/">
        <front>
          <title>Data Fields for In-situ OAM</title>

          <author>
            <organization/>
          </author>

          <date/>
        </front>
      </reference>

      <reference anchor="I-D.ioamteam-ippm-ioam-direct-export"
                 target="https://datatracker.ietf.org/doc/draft-ioamteam-ippm-ioam-direct-export/">
        <front>
          <title>In-situ OAM Direct Exporting</title>

          <author>
            <organization/>
          </author>

          <date/>
        </front>
      </reference>

      <reference anchor="I-D.zhou-ippm-enhanced-alternate-marking"
                 target="https://datatracker.ietf.org/doc/draft-zhou-ippm-enhanced-alternate-marking/">
        <front>
          <title>Enhanced Alternate Marking Method</title>

          <author>
            <organization/>
          </author>

          <date/>
        </front>
      </reference>
	  
	  <reference anchor="I-D.song-ippm-postcard-based-telemetry"
                 target="https://datatracker.ietf.org/doc/draft-song-ippm-postcard-based-telemetry/">
        <front>
          <title>Postcard-based On-Path Flow Data Telemetry</title>

          <author>
            <organization/>
          </author>

          <date/>
        </front>
      </reference>
    </references>

  </back>
</rfc>
