<?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-wang-idr-bgp-ifit-capabilities-04"
     ipr="trust200902">
  <front>
    <title abbrev="BGP for IFIT Capability">BGP Extension for Advertising
    In-situ Flow Information Telemetry (IFIT) Capabilities</title>

    <author fullname="Yali Wang" initials="Y. " surname="Wang">
      <organization>Huawei</organization>

      <address>
        <postal>
          <street/>

          <city>Beijing</city>

          <code/>

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

        <email>wangyali11@huawei.com</email>
      </address>
    </author>

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

      <address>
        <postal>
          <street/>

          <city>Beijing</city>

          <code/>

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

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

    <author fullname="Yunan Gu" initials="Y." surname="Gu">
      <organization>Huawei</organization>

      <address>
        <postal>
          <street/>

          <city>Beijing</city>

          <region/>

          <code/>

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

        <phone/>

        <facsimile/>

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

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

    <author fullname="Ran Pang" initials="R. " surname="Pang">
      <organization>China Unicom</organization>

      <address>
        <postal>
          <street/>

          <city>Beijing</city>

          <code/>

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

        <email>pangran@chinaunicom.cn</email>
      </address>
    </author>

    <date day="7" month="March" year="2022"/>

    <abstract>
      <t>This document defines extensions to BGP to advertise the In-situ Flow
      Information Telemetry (IFIT) capabilities. Within an IFIT domain,
      IFIT-capability advertisement from the tail node to the head node
      assists the head node to determine whether a particular IFIT Option type
      can be encapsulated in data packets. Such advertisement would be useful
      for mitigating the leakage threat and facilitating the deployment of
      IFIT measurements on a per-service and on-demand basis.</t>
    </abstract>

    <note title="Requirements Language">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
      document are to be interpreted as described in <xref
      target="RFC2119">RFC 2119</xref>.</t>
    </note>
  </front>

  <middle>
    <section title="Introduction">
      <t>In-situ Flow Information Telemetry (IFIT) denotes a family of
      flow-oriented on-path telemetry techniques, including <xref
      target="I-D.ietf-ippm-ioam-data">In-situ OAM (IOAM)</xref> and <xref
      target="RFC8321">Alternate Marking</xref>. It can provide flow
      information on the entire forwarding path on a per-packet basis in real
      time.</t>

      <t>IFIT is a solution focusing on network domains according to <xref
      target="RFC8799"/> that introduces the concept of specific domain
      solutions. A network domain consists of a set of network devices or
      entities within a single administration. As mentioned in <xref
      target="RFC8799"/>, for a number of reasons, such as policies, options
      supported, style of network management and security requirements, it is
      suggested to limit applications including the emerging IFIT techniques
      to a controlled domain.</t>

      <t>Hence, the family of emerging on-path flow telemetry techniques MUST
      be typically deployed in such controlled domains. The IFIT solution MAY
      be selectively or partially implemented in different vendors' devices as
      an emerging feature for various use cases of application-aware network
      operations. In addition, for some use cases, the IFIT are deployed on a
      per-service and on-demand basis.</t>

      <t>The figure shows an implementation example of IFIT for VPN
      scenario.</t>

      <t><figure>
          <artwork align="center"><![CDATA[           
            +----+                          +----+       		
+----+      |    |          +----+          |    |      +----+
|CE1 |------|PE1 |==========|RR/P|==========|PE2 |------|CE2 |
+----+      |    |          +----+          |    |      +----+
            +----+                          +----+       
             |<------------IFIT Domain--------->|
             |<---------------BGP-------------->|
|<----------------------------VPN--------------------------->|
]]></artwork>
        </figure></t>

      <t>As the figure shows, a traffic flow is sent out from the customer
      edge CE1 to another CE2. In order to enable IFIT application for this
      flow, the IFIT header must be encapsulated in the packet at the ingress
      node PE1 referred to as the IFIT encapsulating node. Then, transmit
      nodes in the IFIT domain must be able to support the IFIT capabilities
      to inspect IFIT command and update the IFIT data fields in the packet.
      Finally, the IFIT data fields MUST be exported and removed at egress
      node PE2 that is referred to as the IFIT decapsulating node to avoild
      IFIT data leakage outside the controlled domain. Hence, a head node
      needs to know if the IFIT decapsulating node are able to support the
      IFIT capabilities.</t>

      <t>This document defines extensions to Border Gateway Protocol (BGP) to
      advertise the supported IFIT capabilities of the egress node to the
      ingress node in an IFIT domain when the egress node distributes a route.
      Then the ingress node can learn the IFIT node capabilities associated to
      the routing information distributed between BGP peers and determine
      whether a particular IFIT Option type can be encapsulated in traffic
      packets which are forwarded along the path. Such advertisement would be
      useful for avoiding IFIT data leaking from the IFIT domain and measuring
      performance metrics on a per-service basis through steering packets of
      flow into a path where IFIT application are supported.</t>
    </section>

    <section title="Definitions and Acronyms">
      <t><list style="symbols">
          <t>IFIT: In-situ Flow Information Telemetry</t>

          <t>OAM: Operation Administration and Maintenance</t>

          <t>NLRI: Network Layer Reachable Information, the NLRI advertised in
          the BGP UPDATE as defined in <xref target="RFC4271"/> and <xref
          target="RFC4760"/>.</t>
        </list></t>
    </section>

    <section title="IFIT Capabilities">
      <t>This document defines the IFIT Capabilities formed of a 16-bit
      bitmap. The following format is used:</t>

      <t><figure>
          <artwork align="center"><![CDATA[    0                   1           
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |P|I|D|E|M|    Reserved         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    Figure 1. IFIT Capabilities]]></artwork>
        </figure><list style="symbols">
          <t>P-Flag: IOAM Pre-allocated Trace Option Type flag. When set, this
          indicates that the router is capable of IOAM Pre-allocated Trace
          <xref target="I-D.ietf-ippm-ioam-data"/>.</t>

          <t>I-Flag: IOAM Incremental Trace Option Type flag. When set, this
          indicates that the router is capable of IOAM Incremental Tracing
          <xref target="I-D.ietf-ippm-ioam-data"/>.</t>

          <t>D-Flag: IOAM DEX Option Type flag. When set, this indicates that
          the router is capable of IOAM DEX <xref
          target="I-D.ioamteam-ippm-ioam-direct-export"/>.</t>

          <t>E-Flag: IOAM E2E Option Type flag. When set, this indicates that
          the router is capable of IOAM E2E processing <xref
          target="I-D.ietf-ippm-ioam-data"/>.</t>

          <t>M-Flag: Alternate Marking flag. When set, this indicates that the
          router is capable of processing Alternative Marking packets <xref
          target="RFC8321"/>.</t>

          <t>Reserved: Reserved for future use. They MUST be set to zero upon
          transmission and ignored upon receipt.</t>
        </list></t>
    </section>

    <section title="Option 1: Extension to BGP Extended Community for IFIT-Capability Advertisement">
      <t/>

      <section title="IPv4-Address-Specific IFIT Tail Community">
        <t>For IPv4 networks <xref target="RFC4360"/>, this section defines a
        new type of BGP extended community called IPv4-Address-Specific IFIT
        Extended Community. The IPv4-Address-Specific IFIT Tail Community can
        be used by the IFIT decapsulation node to notify the IFIT Capabilities
        to its parterner (as the IFIT encapsulation node). It is a transitive
        extended community with type 0x01 and sub-type TBA1.</t>

        <t>The format of this extended community is shown in Figure 2.</t>

        <t><figure>
            <artwork align="center"><![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 (0x01)  |Sub-Type (TBA1)|   Originating IPv4 Address    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |Originating IPv4 Address(cont.)|     IFIT Capabilities         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  
        Figure 2. IPv4-Address-Specific IFIT Tail Community]]></artwork>
          </figure></t>

        <t><list style="symbols">
            <t>Originating IPv4 Address field: A 4 octets field. A IPv4
            address of the IFIT decapsulation node. It is an IPv4 unicast
            address assigned by one of the Internet registries</t>

            <t>IFIT Capabilities: A 2 octets field. as defined in previous
            setion.</t>
          </list></t>
      </section>

      <section title="IPv6-Address-Specific IFIT Tail Community">
        <t>For IPv6 networks <xref target="RFC5701"/>, this section defines a
        new type of BGP extended community called IPv6-Address-Specific IFIT
        Extended Community. The IPv6-Address-Specific IFIT Tail Community can
        be used by the IFIT decapsulation node to notify the IFIT Capabilities
        to its parterner (as the IFIT encapsulation node). It is a transitive
        IPv6 address specific extended community with type 0x00 and sub-type
        TBA2.</t>

        <t>The format of this extended community is shown in Figure 3.</t>

        <t><figure>
            <artwork align="center"><![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 (0x00)  |Sub-Type (TBA2)|   Originating IPv6 Address    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |               Originating IPv6 Address (cont.)                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |               Originating IPv6 Address (cont.)                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |               Originating IPv6 Address (cont.)                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |Originating IPv6 Address(cont.)|     IFIT Capabilities         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  
       Figure 3. IPv6-Address-Specific IFIT Tail Community]]></artwork>
          </figure><list style="symbols">
            <t>Originating IPv6 Address field: A IPv6 address of the IFIT
            decapsulation node. It is an IPv6 unicast address assigned by one
            of the Internet registries.</t>

            <t>IFIT Capabilities: as defined in previous setion.</t>
          </list></t>

        <t>In this option, the Originating IP Address (inclue IPv4 and IPv6)
        in the extended community attribute is used as the IFIT decapsulation
        node.</t>
      </section>
    </section>

    <section title="Option 2: Extension to BGP Next-Hop Capability for IFIT-Capability Advertisement">
      <t>The BGP Next-Hop Capability Attribute <xref
      target="I-D.ietf-idr-next-hop-capability"/> is a non-transitive BGP
      attribute, which is modified or deleted when the next-hop is changed, to
      reflect the capabilities of the new next-hop. The attribute consists of
      a set of Next-Hop Capabilities.</t>

      <t>A IFIT Next-Hop Capability is a triple (Capability Code, Capability
      Length, Capability Value) aka a TLV:</t>

      <t><figure>
          <artwork align="center"><![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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Capability Code (TBA3)    |        Capability Length      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |       IFIT Capabilities       | ORIG. IP Address(4/16 octets) |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Figure 4. BGP Next-Hop Capability]]></artwork>
        </figure><list style="symbols">
          <t>Capability Code: a two-octets unsigned binary integer which
          indicates the type of "Next-Hop Capability" advertised and
          unambiguously identifies an individual capability. This document
          defines a new Next-Hop Capability, which is called IFIT Next-Hop
          Capability. The Capability Code is TBA3.</t>

          <t>Capability Length: a two-octets unsigned binary integer which
          indicates the length, in octets, of the Capability Value field. A
          length of 0 indicates that no Capability Value field is present.</t>

          <t>IFIT Capabilities: as defined in previous setion.</t>

          <t>ORIG. IP Address: An IPv4 or IPv6 Address of the IFIT
          decapsulation node. It is an IPv4 or IPv6 unicast address assigned
          by one of the Internet registries.</t>
        </list></t>

      <t>A BGP speaker S that sends an UPDATE with the BGP Next-Hop Capability
      Attribute MAY include the IFIT Next-Hop Capability. The inclusion of the
      IFIT Next-Hop Capability with the NLRI advertised in the BGP UPDATE
      indicates that the BGP Next-Hop can act as the IFIT decapsulating node
      and it can process the specific IFIT encapsulation format indicated per
      the capability value. This is applied for all routes indicated in the
      same NRLI.</t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>The IANA is requested to make the assignments for
      IPv4-Address-Specific IFIT Tail Community and IPv6-Address-Specific IFIT
      Tail Community:</t>

      <texttable align="center">
        <ttcol>Value</ttcol>

        <ttcol>Description</ttcol>

        <ttcol>Reference</ttcol>

        <c>TBA1</c>

        <c>IPv4-Address-Specific IFIT Tail Community</c>

        <c>This document</c>

        <c>TBA2</c>

        <c>IPv6-Address-Specific IFIT Tail Community</c>

        <c>This document</c>
      </texttable>

      <t>The IANA is requested to make the assignments for IFIT Next-Hop
      Capability:</t>

      <texttable align="center">
        <ttcol>Value</ttcol>

        <ttcol>Description</ttcol>

        <ttcol>Reference</ttcol>

        <c>TBA3</c>

        <c>IFIT Capabilities</c>

        <c>This document</c>
      </texttable>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>This document defines extensions to BGP Extended Community and BGP
      Next-Hop Capability to advertise the IFIT capabilities. It does not
      introduce any new security risks to BGP.</t>

      <t>Solutions to ensure the IFIT data propagated in a controlled domain
      and avoild malicious attacks, both of iOAM method <xref
      target="I-D.ietf-ippm-ioam-data"/>and Alternate Marking method <xref
      target="I-D.ietf-6man-ipv6-alt-mark"/> have respectively discussed that
      the implementation of both methods must be within a controlled
      domain.</t>
    </section>

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

      <t><figure>
          <artwork><![CDATA[Weidong Li
Huawei
Email: poly.li@huawei.com

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

Tianran Zhou
Huawei
Email: zhoutianran@huawei.com
]]></artwork>
        </figure></t>
    </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>The authors would like to thank Giuseppe Fioccola, Jie Dong, Robin Li
      for their reviews and suggestions</t>
    </section>
  </middle>

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

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

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

      <?rfc include='reference.I-D.ietf-idr-next-hop-capability'?>

      <?rfc include='reference.I-D.ietf-6man-ipv6-alt-mark'?>

      <?rfc include='reference.I-D.ietf-ippm-ioam-data'?>
    </references>

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

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

      <?rfc include='reference.I-D.ioamteam-ippm-ioam-direct-export'?>

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

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