<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
     which is available here: http://xml2rfc.tools.ietf.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!-- One method to get references from the online citation libraries.
     There has to be one entity for each item to be referenced.
     An alternate method (rfc include) is described in the references. -->
<!ENTITY RFC7605 SYSTEM "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7605.xml">
<!ENTITY RFC7665 SYSTEM "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7665.xml">
<!ENTITY RFC2119 SYSTEM "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC6830 SYSTEM "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6830.xml">
<!ENTITY RFC6833 SYSTEM "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6833.xml">
<!ENTITY RFC2460 SYSTEM "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2460.xml">
<!ENTITY RFC7276 SYSTEM "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7276.xml">
<!ENTITY RFC7112 SYSTEM "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7112.xml">
<!ENTITY RFC791 SYSTEM "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.0791.xml">
<!ENTITY RFC6564 SYSTEM "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6564.xml">
<!ENTITY RFC2784 SYSTEM "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2784.xml">
<!ENTITY RFC3232 SYSTEM "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3232.xml">
<!ENTITY RFC9197 SYSTEM "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.9197.xml">
<!ENTITY RFC9305 SYSTEM "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.9305.xml">
<!ENTITY I-D.draft-ietf-sfc-proof-of-transit SYSTEM "http://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-sfc-proof-of-transit.xml">
<!ENTITY I-D.ietf-nvo3-vxlan-gpe SYSTEM "http://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-nvo3-vxlan-gpe.xml">
<!ENTITY I-D.ietf-lisp-gpe SYSTEM "http://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-lisp-gpe.xml">
<!ENTITY AFI SYSTEM "http://www.iana.org/assignments/address-family-numbers/address-family-numbers.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs),
     please see http://xml2rfc.tools.ietf.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
     (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space
     (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="std" docName="draft-brockners-ippm-ioam-vxlan-gpe-04"
     ipr="trust200902">
  <!-- ipr="full3978"-->

  <!-- category values: std, bcp, info, exp, and historic
     ipr values: full3667, noModification3667, noDerivatives3667
     you can add the attributes updates="NNNN" and obsoletes="NNNN"
     they will automatically be output with "(if approved)" -->

  <!-- ***** FRONT MATTER ***** -->

  <front>
    <!-- The abbreviated title is used in the page header - it is only necessary if the
         full title is longer than 39 characters -->

    <title abbrev="In-situ OAM VXLAN-GPE encapsulation">VXLAN-GPE
    Encapsulation for In-situ OAM Data</title>

    <!-- add 'role="editor"' below for the editors if appropriate -->

    <!-- Another author who claims to be an editor -->

    <author fullname="Frank Brockners" initials="F." surname="Brockners" role="editor">
      <organization abbrev="Cisco">Cisco Systems, Inc.</organization>

      <address>
        <postal>
          <street>Hansaallee 249, 3rd Floor</street>

          <!-- Reorder these if your country does things differently -->

          <city>DUESSELDORF</city>

          <code>40549</code>

          <country>Germany</country>
        </postal>

        <email>fbrockne@cisco.com</email>

        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>

    <author fullname="Shwetha Bhandari" initials="S." surname="Bhandari">
        <organization abbrev="Thoughtspot">Thoughtspot</organization>
        <address>
         <postal>
          <street>3rd Floor, Indiqube Orion, 24th Main Rd, Garden Layout, HSR Layout</street>
          <city>Bangalore, KARNATAKA 560 102</city>
          <country>India</country>
         </postal>
         <email>shwetha.bhandari@thoughtspot.com</email>
        </address>
    </author>

    <author fullname="Vengada Prasad Govindan" initials="V."
            surname="Govindan">
      <organization abbrev="Cisco">Cisco Systems, Inc.</organization>

      <address>
        <email>venggovi@cisco.com</email>
      </address>
    </author>

    <author fullname="Carlos Pignataro" initials="C." surname="Pignataro">
      <address>
        <email>carlos@pignataro.net</email>
      </address>
    </author>

    <author fullname="Hannes Gredler" initials="H." surname="Gredler">
      <organization>RtBrick Inc.</organization>

      <address>
        <email>hannes@rtbrick.com</email>
      </address>
    </author>

    <author fullname="John Leddy" initials="J." surname="Leddy">
      <address>
        <email>john@leddy.net</email>
      </address>
    </author>

    <author fullname="Stephen Youell" initials="S." surname="Youell">
      <organization abbrev="JPMC">JP Morgan Chase</organization>

      <address>
        <postal>
          <street>25 Bank Street</street>

          <city>London</city>

          <code>E14 5JP</code>

          <country>United Kingdom</country>
        </postal>

        <email>stephen.youell@jpmorgan.com</email>
      </address>
    </author>

    <author fullname="Tal Mizrahi" initials="T." surname="Mizrahi" role="editor">
      <organization abbrev="">Huawei</organization>

      <address>
        <postal>
          <street>8-2 Matam</street>

          <city>Haifa</city>

          <code>3190501</code>

          <country>Israel</country>
        </postal>

        <email>tal.mizrahi.phd@gmail.com</email>
      </address>
    </author>

    <author fullname="Aviv Kfir" initials="A." surname="Kfir">
      <organization abbrev="">Nvidia</organization>

      <address>
        <postal>
          <street>350 Oakmead Parkway, Suite 100</street>

          <city>Sunnyvale, CA</city>

          <code>94085</code>

          <country>USA</country>
        </postal>

        <email>avivk@nvidia.com</email>
      </address>
    </author>

    <author fullname="Barak Gafni" initials="B." surname="Gafni">
      <organization abbrev="">Nvidia</organization>

      <address>
        <postal>
          <street>350 Oakmead Parkway, Suite 100</street>

          <city>Sunnyvale, CA</city>

          <code>94085</code>

          <country>USA</country>
        </postal>

        <email>gbarak@nvidia.com</email>
      </address>
    </author>

    <author fullname="Petr Lapukhov" initials="P." surname="Lapukhov">
      <organization abbrev="">Facebook</organization>

      <address>
        <postal>
          <street>1 Hacker Way</street>

          <city>Menlo Park, CA</city>

          <code>94025</code>

          <country>US</country>
        </postal>

        <email>petr@fb.com</email>
      </address>
    </author>

    <author fullname="Mickey Spiegel" initials="M." surname="Spiegel">
      <organization abbrev="">Barefoot Networks, an Intel company</organization>

      <address>
        <postal>
          <street>4750 Patrick Henry Drive</street>

          <city>Santa Clara, CA</city>

          <code>95054</code>

          <country>US</country>
        </postal>

        <email>mickey.spiegel@intel.com</email>
      </address>
    </author>

    <date day="26" month="November" year="2023"/>

    <!-- If the month and year are both specified and are the current ones, xml2rfc will fill
         in the current day for you. If only the current year is specified, xml2rfc will fill
	 in the current day and month for you. If the year is not the current one, it is
	 necessary to specify at least a month (xml2rfc assumes day="1" if not specified for the
	 purpose of calculating the expiry date).  With drafts it is normally sufficient to
	 specify just the year. -->

    <!-- Meta-data Declarations -->

    <area>tsv</area>

    <workgroup>ippm</workgroup>

    <!-- WG name at the upperleft corner of the doc,
         IETF is fine for individual submissions.
	 If this element is not present, the default is "Network Working Group",
         which is used by the RFC Editor as a nod to the history of the IETF. -->

    <keyword>inband</keyword>

    <keyword>Telemetry, Tracing</keyword>

    <!-- Keywords will be incorporated into HTML output
         files in a meta tag but they have no effect on text or nroff
         output. If you submit your draft to the RFC Editor, the
         keywords will be used for the search engine. -->

    <abstract>
      <t>In-situ Operations, Administration, and Maintenance (IOAM) records
      operational and telemetry information in the packet while the packet
      traverses a path between two points in the network. This document
      outlines how IOAM data fields are encapsulated in VXLAN-GPE.</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction" toc="default">
      <t>In-situ OAM (IOAM) records OAM information within the packet while
      the packet traverses a particular network domain. The term "in-situ"
      refers to the fact that the IOAM data fields are added to the data
      packets rather than being sent within packets specifically dedicated to
      OAM. This document defines how IOAM data fields are transported as part
      of the VXLAN-GPE <xref target="I-D.ietf-nvo3-vxlan-gpe"/> encapsulation.
      The IOAM data fields are defined in <xref
      target="RFC9197"/>. An implementation of IOAM which
      leverages VXLAN-GPE to carry the IOAM data is available from the FD.io
      open source software project <xref target="FD.io"/>.</t>
    </section>

    <section anchor="Conventions" title="Conventions">
      <section title="Requirement 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"/>.</t>
      </section>

      <section title="Abbreviations">
        <t>Abbreviations used in this document:</t>

        <t><list hangIndent="11" style="hanging">
            <t hangText="IOAM:">In-situ Operations, Administration, and
            Maintenance</t>

            <t hangText="OAM:">Operations, Administration, and Maintenance</t>

            <t hangText="VXLAN-GPE:">Virtual eXtensible Local Area Network,
            Generic Protocol Extension</t>
          </list></t>
      </section>
    </section>

    <section title="IOAM Data Field Encapsulation in VXLAN-GPE">
      <t>VXLAN-GPE is defined in <xref target="I-D.ietf-nvo3-vxlan-gpe"/>.
      IOAM data fields are carried in VXLAN-GPE using a next protocol value of
      TBD_IOAM. An IOAM header is added containing the different IOAM data
      fields defined in <xref target="RFC9197"/>. In an
      administrative domain where IOAM is used, insertion of the IOAM header
      in VXLAN-GPE is enabled at the VXLAN-GPE tunnel endpoints, which also
      serve as IOAM encapsulating/decapsulating nodes by means of
      configuration.</t>

      <t/>

      <t><figure align="center" anchor="IOAMinVXLANGPE"
          title="IOAM data encapsulation in VXLAN-GPE">
          <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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                    Outer Ethernet Header                      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        Outer IP Header                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                       Outer UDP Header                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--+
|R|R|Ver|I|P|R|O|          Reserved             |  NP=TBD_IOAM  |  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ GPE
|     Virtual Network Identifier (VNI)          | Reserved      |  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<-+
| IOAM-Type     | IOAM HDR len  |    Reserved   | Next Protocol |  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  I
!                                                               |  O
!                                                               |  A
~                 IOAM Option and Data Space                    ~  M
|                                                               |  |
|                                                               |  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<-+
|                                                               |
|                                                               |
|                     Payload + Padding (L2/L3/ESP/...)         |
|                                                               |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
        </figure></t>

      <t>The VXLAN-GPE header and fields are defined in <xref
      target="I-D.ietf-nvo3-vxlan-gpe"/>. The VXLAN Next Protocol value for
      IOAM is TBD_IOAM.</t>

      <t>The IOAM related fields in VXLAN-GPE are defined as follows:</t>

      <t><list style="hanging">
          <t hangText="IOAM-Type:">8-bit field defining the IOAM Option type,
          as defined in Section 7.2 of <xref
          target="RFC9197"/>.</t>

          <t hangText="IOAM HDR len:">8-bit unsigned integer. Length of the
          IOAM HDR in 4-octet units not including the first 4 octects.</t>

          <t hangText="Reserved:">8-bit reserved field MUST be set to zero
          upon transmission and ignored upon receipt.</t>

          <t hangText="Next Protocol:">8-bit unsigned integer that determines
          the type of header following IOAM protocol. The value is from the
          IANA registry setup for VXLAN GPE Next Protocol defined in <xref
          target="I-D.ietf-nvo3-vxlan-gpe"/>.</t>

          <t hangText="IOAM Option and Data Space:">IOAM option header and
          data is present as specified by the IOAM-Type field, and is defined
          in Section 4 of <xref target="RFC9197"/>.</t>
        </list>Multiple IOAM options MAY be included within the VXLAN-GPE
      encapsulation. For example, if a VXLAN-GPE encapsulation contains two
      IOAM options before a data payload, the Next Protocol field of the first
      IOAM option will contain the value of TBD_IOAM, while the Next Protocol
      field of the second IOAM option will contain the VXLAN "Next Protocol"
      number indicating the type of the data payload.</t>
    </section>

    <section title="Considerations">
      <t>This section summarizes a set of considerations on the overall
      approach taken for IOAM data encapsulation in VXLAN-GPE, as well as
      deployment considerations.</t>

      <section title="Discussion of the encapsulation approach">
        <t>This section is to support the working group discussion in
        selecting the most appropriate approach for encapsulating IOAM data
        fields in VXLAN-GPE.</t>

        <t>An encapsulation of IOAM data fields in VXLAN-GPE should be
        friendly to an implementation in both hardware as well as software
        forwarders. Hardware forwarders benefit from an encapsulation that
        minimizes iterative look-ups of fields within the packet: Any
        operation which looks up the value of a field within the packet, based
        on which another lookup is performed, consumes additional gates and
        time in an implementation - both of which are desired to be kept to a
        minimum. This means that flat TLV structures are to be preferred over
        nested TLV structures. IOAM data fields are grouped into three option
        categories: Trace, proof-of-transit, and edge-to-edge. Each of these
        three options defines a TLV structure. A hardware-friendly
        encapsulation approach avoids grouping these three option categories
        into yet another TLV structure, but would rather carry the options as
        a serial sequence.</t>

        <t>Two approaches for encapsulating IOAM data fields in VXLAN-GPE
        could be considered:</t>

        <t><list style="numbers">
            <t>Use a single GPE protocol type for all IOAM types: IOAM would
            receive a single GPE protocol type code point. A "sub-type" field
            would then specify what IOAM options type (trace,
            proof-of-transit, edge-to-edge) is carried.</t>

            <t>Use one GPE protocol type per IOAM options type: Each IOAM data
            field option (trace, proof-of-transit, and edge-to-edge) would be
            specified by its own "next protocol", i.e. each IOAM options type
            becomes its own GPE protocol type with a dedicated code point.
            This implies that in case additional IOAM option types would be
            added in the future, additional GPE protocol type code points
            would need to be allocated.</t>
          </list>The first option has been chosen here. Multiple back-to-back
        IOAM options can be encoded as a succession of IOAM headers, with the
        same single GPE protocol type appearing as the next protocol before
        each IOAM header, but different sub-types within each IOAM header.</t>
      </section>

      <section title="IOAM and the use of the VXLAN O-bit">
        <t><xref target="I-D.ietf-nvo3-vxlan-gpe"/> defines an "O bit" for OAM
        packets. Per <xref target="I-D.ietf-nvo3-vxlan-gpe"/> the O bit
        indicates that the packet contains an OAM message instead of data
        payload. Packets that carry IOAM data fields in addition to regular
        data payload / customer traffic must not set the O bit. Packets that
        carry only IOAM data fields without any payload must set the O
        bit.</t>
      </section>

      <section title="Transit devices">
        <t>If IOAM is deployed in domains where UDP port numbers are not
        controlled and do not have a domain-wide meaning, such as on the
        global Internet, transit devices MUST NOT attempt to modify the IOAM
        data contained in the IOAM header following the VXLAN-GPE header. In
        case UDP port numbers are not controlled there might be UDP packets
        specifying the same UDP port number that VXLAN-GPE utilizes, i.e.
        4790, but with a payload that is not VXLAN-GPE. The scenario and
        associated reasoning is discussed in <xref target="RFC7605"/> which
        states that "it is important to recognize that any interpretation of
        port numbers -- except at the endpoints -- may be incorrect, because
        port numbers are meaningful only at the endpoints."</t>
      </section>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <section title="VXLAN-GPE Next Protocol Value">
        <t>IANA is requested to allocate a value in the VXLAN-GPE "Next
        Protocol" registry for IOAM, which is defined in <xref
        target="I-D.ietf-nvo3-vxlan-gpe"/>.</t>

        <t><figure>
            <artwork><![CDATA[             +---------------+-------------+---------------+
             | Next Protocol | Description | Reference     |
             +---------------+-------------+---------------+
             | 0x81          | IOAM        | This document |
             +---------------+-------------+---------------+

]]></artwork>
          </figure></t>
      </section>

      <section title="LISP-GPE Next Protocol Value">
        <t>IANA is requested to allocate a value in the LISP-GPE "Next
        Protocol" registry for IOAM, which is defined in <xref
        target="RFC9305"/>.</t>

        <t><figure>
            <artwork><![CDATA[             +---------------+-------------+---------------+
             | Next Protocol | Description | Reference     |
             +---------------+-------------+---------------+
             | 0x81          | IOAM        | This document |
             +---------------+-------------+---------------+

]]></artwork>
          </figure></t>
      </section>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>The security considerations of VXLAN-GPE are discussed in <xref
      target="I-D.ietf-nvo3-vxlan-gpe"/>, and the security considerations of
      IOAM in general are discussed in <xref
      target="RFC9197"/>.</t>

      <t>IOAM is considered a "per domain" feature, where one or several
      operators decide on leveraging and configuring IOAM according to their
      needs. Still, operators need to properly secure the IOAM domain to avoid
      malicious configuration and use, which could include injecting malicious
      IOAM packets into a domain.</t>
    </section>

    <section title="Acknowledgements">
      <t>The authors would like to thank Eric Vyncke, Nalini Elkins, Srihari
      Raghavan, Ranganathan T S, Karthik Babu Harichandra Babu, Akshaya
      Nadahalli, Stefano Previdi, Hemant Singh, Erik Nordmark, LJ Wobker, and
      Andrew Yourtchenko for the comments and advice.</t>
    </section>
  </middle>

  <!--  *****BACK MATTER ***** -->

  <back>
    <!-- References split into informative and normative -->

    <!-- There are 2 ways to insert reference entries from the citation libraries:
     1. define an ENTITY at the top, and use "ampersand character"RFC2629; here (as shown)
     2. simply use a PI "less than character"?rfc include="reference.RFC.2119.xml"?> here
        (for I-Ds: include="reference.I-D.narten-iana-considerations-rfc2434bis.xml")

     Both are cited textually in the same manner: by using xref elements.
     If you use the PI option, xml2rfc will, by default, try to find included files in the same
     directory as the including file. You can also define the XML_LIBRARY environment variable
     with a value containing a set of directories to search.  These can be either in the local
     filing system or remote ones accessed by http (http://domain/dir/... ).-->

    <references title="Normative References">
      &RFC2119;

      &RFC9197;

      &I-D.ietf-nvo3-vxlan-gpe;

      &RFC9305;

      &RFC7605;

      <reference anchor="ETYPES"
                 target="https://www.iana.org/assignments/ethernet-numbers/ethernet-numbers.xhtml">
        <front>
          <title>IANA Ethernet Numbers</title>

          <author/>

          <date/>
        </front>
      </reference>
    </references>

    <references title="Informative References">

      <reference anchor="FD.io" target="https://fd.io/">
        <front>
          <title>Fast Data Project: FD.io</title>

          <author/>

          <date/>
        </front>
      </reference>
    </references>
  </back>
</rfc>
