<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>

<rfc xmlns:xi="http://www.w3.org/2001/XInclude" submissionType="IETF" category="std" consensus="true" docName="draft-ietf-ippm-ioam-ipv6-options-12" number="9486" ipr="trust200902" obsoletes="" updates="" xml:lang="en" tocInclude="true" tocDepth="3" symRefs="true" sortRefs="true" version="3">

  <front>
    <title abbrev="IOAM IPv6 Options">IPv6 Options for In Situ Operations,
    Administration, and Maintenance (IOAM)</title>
    <seriesInfo name="RFC" value="9486"/>
    <author fullname="Shwetha Bhandari" initials="S." surname="Bhandari" role="editor">
      <organization abbrev="Thoughtspot">Thoughtspot</organization>
      <address>
        <postal>
	  <extaddr>3rd Floor, Indiqube Orion</extaddr>
          <street>24th Main Rd, Garden Layout, HSR Layout</street>
          <city>Bangalore</city>
	  <region>Karnataka</region>
	  <code>560 102</code>	  
          <country>India</country>
        </postal>
        <email>shwetha.bhandari@thoughtspot.com</email>
      </address>
    </author>
    <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>
          <city>Duesseldorf</city>
          <code>40549</code>
          <country>Germany</country>
        </postal>
        <email>fbrockne@cisco.com</email>
      </address>
    </author>
    <date month="September" year="2023"/>
    <area>tsv</area>
    <workgroup>ippm</workgroup>

<keyword></keyword>

    <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 IPv6.</t>
    </abstract>
  </front>
  <middle>
    <section numbered="true" toc="default">
      <name>Introduction</name>
      <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. IOAM concepts and
      associated nomenclature as well as IOAM Data-Fields are defined in <xref
      target="RFC9197" format="default"/>.  This document outlines how IOAM
      Data-Fields are encapsulated in IPv6 <xref target="RFC8200"
      format="default"/> and discusses deployment requirements for networks
      that use IPv6-encapsulated IOAM Data-Fields.</t>
     <t>The terms "encapsulation" and "decapsulation" are used in this
     document in the same way as in <xref target="RFC9197" format="default"/>:
     An IOAM encapsulating node incorporates one or more IOAM Option-Types
     into packets that IOAM is enabled for.</t>
    </section>
    <section numbered="true" toc="default">
      <name>Conventions</name>
      <section numbered="true" toc="default">
        <name>Requirements Language</name>
        <t>
    The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
    NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
    "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
    described in BCP&nbsp;14 <xref target="RFC2119"/> <xref target="RFC8174"/> 
    when, and only when, they appear in all capitals, as shown here.
        </t>

      </section>
      <section numbered="true" toc="default">
        <name>Abbreviations</name>
        <t>Abbreviations used in this document:</t>
        <dl newline="false" spacing="normal" indent="11">
          <dt>E2E:</dt>
          <dd>Edge-to-Edge</dd>
          <dt>IOAM:</dt>
          <dd>In situ Operations, Administration, and Maintenance as defined in <xref target="RFC9197"
          format="default"/></dd>
          <dt>OAM:</dt>
          <dd>Operations, Administration, and Maintenance</dd>
          <dt>POT:</dt>
          <dd>Proof of Transit</dd>
        </dl>
      </section>
    </section>
    <section numbered="true" toc="default">
      <name>In situ OAM Metadata Transport in IPv6</name>
      <t>IOAM in IPv6 is used to enhance diagnostics of IPv6 networks.  It
      complements other mechanisms designed to enhance diagnostics of IPv6
      networks, such as the "IPv6 Performance and Diagnostic Metrics (PDM)
      Destination Option" described in <xref target="RFC8250"
      format="default"/>.</t>
      <t> At the time this document was written, several implementations of
      IOAM for IPv6 exist, e.g., IOAM for IPv6 in the Linux Kernel (supported
      from Kernel version 5.15 onward,
      <eref target="https://github.com/torvalds/linux/commit/7c804e91df523a37c29e183ea2b10ac73c3a4f3d">
      IPv6 IOAM in Linux Kernel</eref>) and
      <eref target="https://docs.fd.io/vpp/17.04/ioam_ipv6_doc.html">
      IOAM for IPv6 in Vector Packet Processing (VPP)</eref>. 
      </t>
      <t>IOAM Data-Fields can be encapsulated with two types of extension
      headers in IPv6 packets -- either the hop-by-hop options header or the
      destination options header.  Multiple options with the same option type
      <bcp14>MAY</bcp14> appear in the same hop-by-hop options or destination
      options header with distinct content.</t>
      <t>An IPv6 packet carrying IOAM data in an extension header can have
      other extension headers, compliant with <xref target="RFC8200" format="default"/>.</t>
    <figure>
      <name>IPv6 Hop-by-Hop and Destination Option Format for Carrying 
      IOAM Data-Fields</name>
      <artwork name="" type="" align="center" alt=""><![CDATA[
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Option-Type  |  Opt Data Len |   Reserved    | IOAM Opt-Type |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<-+
|                                                               |  |
.                                                               .  I
.                                                               .  O
.                                                               .  A
.                                                               .  M
.                                                               .  .
.                          Option Data                          .  O
.                                                               .  P
.                                                               .  T
.                                                               .  I
.                                                               .  O
.                                                               .  N
|                                                               |  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<-+
]]></artwork>
    </figure>

      <dl newline="false" spacing="normal">
        <dt>Option-Type:</dt>
        <dd>8-bit option type identifier as defined
          in <xref target="IANA" format="default"/>.</dd>
        <dt>Opt Data Len:</dt>
        <dd>8-bit unsigned integer. Length of this
          option, in octets, not including the first 2 octets.</dd>
        <dt>Reserved:</dt>
        <dd>8-bit field <bcp14>MUST</bcp14> be set to zero
          by the source.</dd>
        <dt>IOAM Option-Type:</dt>
        <dd>Abbreviated to "IOAM Opt-Type"
	  in the diagram above: 8-bit field as defined in <xref target="RFC9197" section="4.1" sectionFormat="of"/>.</dd>
        <dt>Option Data:</dt>
        <dd><t>Variable-length field.
          The data is specific to the Option-Type, as detailed below.</t>

      <dl newline="false" spacing="normal">
	  <dt>Pre-allocated Trace Option:</dt>
	  <dd>
	    <t>The IOAM Pre-allocated Trace Option-Type, defined in <xref
	    target="RFC9197" section="4.4" sectionFormat="of"/>, is represented
	    as an IPv6 option in the hop-by-hop extension header:</t>
            <dl newline="false" spacing="normal">
              <dt>Option-Type:</dt>
              <dd>0x31 (8-bit identifier of the IPv6 Option-Type for
              IOAM).</dd>
            <dt>IOAM Type:</dt>
            <dd>IOAM Pre-allocated Trace Option-Type.</dd>
	    </dl>
           </dd>
          <dt>Proof of Transit Option-Type:</dt>
	  <dd>
	    <t>The IOAM POT Option-Type, defined in <xref target="RFC9197"
	    section="4.5" sectionFormat="of"/>, is represented as an IPv6
	    option in the hop-by-hop extension header:</t>
            <dl newline="false" spacing="normal">
              <dt>Option-Type:</dt>
              <dd>0x31 (8-bit identifier of the IPv6 Option-Type for
              IOAM).</dd>
              <dt>IOAM Type:</dt>
              <dd>IOAM POT Option-Type.</dd>
            </dl>
	  </dd>
          <dt>Edge-to-Edge Option:</dt>
	  <dd>
	    <t>The IOAM E2E Option, defined in <xref target="RFC9197"
	    section="4.6" sectionFormat="of"/>, is represented as an IPv6
	    option in destination extension header: </t>
          <dl newline="false" spacing="normal">
            <dt>Option-Type:</dt>
            <dd>0x11 (8-bit identifier of the IPv6 Option-Type for
            IOAM).</dd>
            <dt>IOAM Type:</dt>
            <dd>IOAM E2E Option-Type.</dd>
          </dl>
	  </dd>
            <dt>Direct Export (DEX) Option:</dt>
	    <dd>
	      <t>The IOAM Direct Export Option-Type, defined in <xref
	      target="RFC9326" section="3.2" sectionFormat="of"/>, is
	      represented as an IPv6 option in the hop-by-hop extension
	      header:</t>
              <dl newline="false" spacing="normal">
		<dt>Option-Type:</dt>
		<dd>0x11 (8-bit identifier of the IPv6 Option-Type for
		IOAM).</dd>
		<dt>IOAM Type:</dt>
		<dd>IOAM Direct Export (DEX) Option-Type.</dd>
              </dl>
	    </dd>
	  </dl>
	</dd>
      </dl>

      <t>All the IOAM IPv6 options defined here have alignment
      requirements. Specifically, they all require alignment on multiples of 4
      bytes. This ensures that fields specified in <xref target="RFC9197"
      format="default"/> are aligned at a multiple-of-4 offset from the start
      of the hop-by-hop and destination options header.</t>
      <t>IPv6 options can have a maximum length of 255 octets. Consequently,
      the total length of IOAM Option-Types including all data fields is also
      limited to 255 octets when encapsulated into IPv6.</t>
    </section>
    <section numbered="true" toc="default">
      <name>IOAM Deployment in IPv6 Networks</name>
      <section anchor="v6_requirement" numbered="true" toc="default">
        <name>Considerations for IOAM Deployment and Implementation in IPv6
        Networks</name>
        <t>IOAM deployments in IPv6 networks <bcp14>MUST</bcp14> take the following
        considerations and requirements into account.</t>
	<ol type="C%d:">
	  <li>
          IOAM <bcp14>MUST</bcp14> be deployed in an IOAM-Domain. An
          IOAM-Domain is a set of nodes that use IOAM. An IOAM-Domain is
          bounded by its perimeter or edge. The set of nodes forming an
          IOAM-Domain may be connected to the same physical infrastructure
          (e.g., a service provider's network). They may also be remotely
          connected to each other (e.g., an enterprise VPN or an overlay).  It
          is expected that all nodes in an IOAM-Domain are managed by the same
          administrative entity. Please refer to <xref target="RFC9197"
          format="default"/> for more details on IOAM-Domains.
	  </li>
	  <li>
          Implementations of IOAM <bcp14>MUST</bcp14> ensure that the
          addition of IOAM Data-Fields does not alter the way routers forward
          packets or the forwarding decisions they make.  Packets with added
          IOAM information must follow the same path within the domain as an
          identical packet without IOAM information would, even in the
          presence of Equal-Cost Multipath (ECMP).  This behavior is
          important for deployments where IOAM Data-Fields are only added
          "on-demand".  Implementations of IOAM <bcp14>MUST</bcp14> ensure
          that ECMP behavior for packets with and without IOAM Data-Fields is
          the same.  In order for IOAM to work in IPv6 networks, IOAM
          <bcp14>MUST</bcp14> be explicitly enabled per interface on every
          node within the IOAM-Domain.  Unless a particular interface is
          explicitly enabled (i.e., explicitly configured) for IOAM, a router
          <bcp14>MUST</bcp14> ignore IOAM Options. 
          </li>
	  <li>
          In order to maintain the integrity of packets in an IOAM-Domain,
          the Maximum Transmission Unit (MTU) of transit routers and switches
          must be configured to a value that does not lead to an "ICMP Packet
          Too Big" error message being sent to the originator and the packet
          being dropped.  The PMTU tolerance range must be identified, and
          IOAM encapsulation operations or data field insertion must not
          exceed this range.  Control of the MTU is critical to the proper
          operation of IOAM.  The PMTU tolerance must be identified through
          configuration, and IOAM operations must not exceed the packet size
          beyond PMTU.
        </li>
          <li>
          <xref target="RFC8200" format="default"/> precludes insertion of
          IOAM data directly into the original IPv6 header of in-flight
          packets.  IOAM deployments that do not encapsulate/decapsulate IOAM
          on the host but desire to encapsulate/decapsulate IOAM on transit
          nodes <bcp14>MUST</bcp14> add an additional IPv6 header to the
          original packet.  IOAM data is added to this additional IPv6 header.
	  </li>
        </ol>
      </section>
      <section numbered="true" toc="default">
        <name>IOAM-Domains Bounded by Hosts</name>
        <t>For deployments where the IOAM-Domain is bounded by hosts, hosts
        will perform the operation of IOAM Data-Field encapsulation and
        decapsulation, i.e., hosts will place the IOAM Data-Fields
        directly in the IPv6 header or remove the IOAM Data-Fields directly
        from the IPv6 header. IOAM data is carried in IPv6 packets as hop-by-hop or
        destination options as specified in this document.</t>
      </section>
      <section numbered="true" toc="default">
        <name>IOAM-Domains Bounded by Network Devices</name>
        <t>For deployments where the IOAM-Domain is bounded by network
        devices, network devices such as routers form the edge of an
        IOAM-Domain. Network devices will perform the operation of IOAM
        Data-Field encapsulation and decapsulation. Network devices will
        encapsulate IOAM Data-Fields in an additional, outer, IPv6 header that
        carries the IOAM Data-Fields.</t>
      </section>
    </section>
    <section numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>This document describes the encapsulation of IOAM Data-Fields in
      IPv6. For general IOAM security considerations, see <xref
      target="RFC9197" format="default"/>. Security considerations of the
      specific IOAM Data-Fields for each case (i.e., Trace, POT, and E2E) are
      also described and defined in <xref target="RFC9197"
      format="default"/>.</t>
      <t>As this document describes new options for IPv6, the
      security considerations of <xref target="RFC8200" format="default"/> and 
      <xref target="RFC8250" format="default"/> apply.</t>
      <t>From a network-protection perspective, there is an assumed trust
      model such that any node that adds IOAM to a packet, removes IOAM from a
      packet, or modifies IOAM Data-Fields of a packet is assumed to be
      allowed to do so.  By default, packets that include IPv6 extension
      headers with IOAM information <bcp14>MUST NOT</bcp14> be leaked through
      the boundaries of the IOAM-Domain.</t>
      <t>IOAM-Domain boundary routers <bcp14>MUST</bcp14> filter any incoming
      traffic from outside the IOAM-Domain that contains IPv6 extension
      headers with IOAM information. IOAM-Domain boundary routers
      <bcp14>MUST</bcp14> also filter any outgoing traffic leaving the
      IOAM-Domain that contains IPv6 extension headers with IOAM
      information.</t>
      <t>In the general case, an IOAM node only adds, removes, or modifies
        an IPv6 extension header with IOAM information, if the
        directive to do so comes from a trusted source and the directive
        is validated.</t>
      <t>Problems may occur if the above behaviors are not implemented
      or if the assumed trust model is violated (e.g., through a security
      breach). In addition to the security considerations discussed in
      <xref target="RFC9197" format="default"/>, the security considerations associated
      with IPv6 extension headers listed in <xref target="RFC9098" format="default"/> apply.</t>
      <section numbered="true" toc="default">
        <name>Applicability of Authentication Header (AH)</name>
        <t> The network devices in an IOAM-Domain are trusted to add, update,
        and remove IOAM options according to the constraints specified in
        <xref target="RFC8200" format="default"/>.  IOAM-Domain does not rely
        on the AH as defined in <xref target="RFC4302" format="default"/> to
        secure IOAM options.  The use of IOAM options with AH and its
        processing are not defined in this document. Future documents may
        define the use of IOAM with AH and its processing.</t>
      </section>
    </section>
    <section anchor="IANA" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>IANA has assigned the IPv6 Option-Types from
      the "Destination Options and Hop-by-Hop Options" subregistry of 
      "Internet Protocol Version 6 (IPv6) Parameters" <eref
      target="https://www.iana.org/assignments/ipv6-parameters/"
      brackets="angle"/>.</t>
      <table>
	<thead>
	  <tr>
	    <th rowspan="2">Hex Value</th>
	    <th colspan="3">Binary Value</th>
	    <th rowspan="2">Description</th>
	    <th rowspan="2">Reference</th>
	  </tr>
	  <tr>
	    <th>act</th>
	    <th>chg</th>
	    <th>rest</th>
	  </tr>
	</thead>
	<tbody>
	  <tr>
	    <td>0x11</td>
	    <td>00</td>
	    <td>0</td>
	    <td>10001</td>
	    <td>IOAM Destination Option and IOAM Hop-by-Hop Option</td>
	    <td>RFC 9486</td>
	  </tr>
	  <tr>
	    <td>0x31</td>
	    <td>00</td>
	    <td>1</td>
	    <td>10001</td>
	    <td>IOAM Destination Option and IOAM Hop-by-Hop Option</td>
	    <td>RFC 9486</td>
	  </tr>
	</tbody>
      </table>
      
    </section>
    
  </middle>
  <back>

<displayreference target="I-D.kitamura-ipv6-record-route" to="IPV6-RECORD-ROUTE"/>

    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9197.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9326.xml"/>
      </references>
      <references>
        <name>Informative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8200.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8250.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4302.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9098.xml"/>

        <xi:include href="https://datatracker.ietf.org/doc/bibxml3/reference.I-D.kitamura-ipv6-record-route.xml"/>
      </references>
    </references>

    <section numbered="false" toc="default">
      <name>Acknowledgements</name>
      <t>The authors would like to thank <contact fullname="Tom Herbert"/>,
      <contact fullname="Éric Vyncke"/>, <contact fullname="Nalini Elkins"/>,
      <contact fullname="Srihari Raghavan"/>, <contact fullname="Ranganathan T S"/>, <contact fullname="Karthik Babu Harichandra Babu"/>, <contact
      fullname="Akshaya Nadahalli"/>, <contact fullname="Stefano Previdi"/>,
      <contact fullname="Hemant Singh"/>, <contact fullname="Erik Nordmark"/>,
      <contact fullname="LJ Wobker"/>, <contact fullname="Mark Smith"/>,
      <contact fullname="Andrew Yourtchenko"/>, and <contact fullname="Justin
      Iurman"/> for the comments and advice. For the IPv6 encapsulation, this
      document leverages concepts described in <xref
      target="I-D.kitamura-ipv6-record-route" format="default"/>.  The authors
      would like to acknowledge the work done by the author <contact
      fullname="Hiroshi Kitamura"/> and people involved in writing it.</t>
    </section>

    <section numbered="false" toc="default">
      <name>Contributors</name>

      <t>This document was the collective effort of several authors. The text
      and content were contributed by the editors and the coauthors listed
      below.</t>
   
      <contact fullname="Carlos Pignataro">
	<organization>Cisco Systems, Inc.</organization>
	<address>
	  <postal>
	    <street>7200-11 Kit Creek Road</street>
	    <city>Research Triangle Park</city>
	    <region>NC</region><code>27709</code>
	    <country>United States of America</country>
	  </postal>
	  <email>cpignata@cisco.com</email>
	</address>
      </contact>
      

   <contact fullname="Hannes Gredler">
     <organization>RtBrick Inc.</organization>
     <address>
       <email>hannes@rtbrick.com</email>
     </address>
   </contact>
   

<contact fullname="John Leddy">
  <address>
    <email>john@leddy.net</email>
  </address>
</contact>


<contact fullname="Stephen Youell">
  <organization>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>
</contact>


   <contact fullname="Tal Mizrahi">
     <organization>Huawei Network.IO Innovation Lab</organization>
     <address>
       <postal>
	 <country>Israel</country>
       </postal>
       <email>tal.mizrahi.phd@gmail.com</email>
     </address>
   </contact>


<contact fullname="Aviv Kfir">
  <organization>Mellanox Technologies, Inc.</organization>
  <address>
    <postal>
      <street>350 Oakmead Parkway, Suite 100</street>
      <city>Sunnyvale</city> <region>CA</region><code>94085</code>
      <country>United States of America</country>
    </postal>
    <email>avivk@mellanox.com</email>
  </address>
</contact>


<contact fullname="Barak Gafni">
  <organization>Mellanox Technologies, Inc.</organization>
  <address>
    <postal>
      <street>350 Oakmead Parkway, Suite 100</street>
      <city>Sunnyvale</city><region>CA</region><code>94085</code>
      <country>United States of America</country>
    </postal>
    <email>gbarak@mellanox.com</email>
  </address>
</contact>


<contact fullname="Petr Lapukhov">
  <organization>Facebook</organization>
  <address>
    <postal>
      <street>1 Hacker Way</street>
      <city>Menlo Park</city><region>CA</region><code>94025</code>
      <country>United States of America</country>
    </postal>
    <email>petr@fb.com</email>
  </address>
</contact>

<contact fullname="Mickey Spiegel">
  <organization>Barefoot Networks, an Intel company</organization>
  <address>
    <postal>
      <street>4750 Patrick Henry Drive</street>
      <city>Santa Clara</city><region>CA</region><code>95054</code>
      <country>United States of America</country>
    </postal>
    <email>mickey.spiegel@intel.com</email>
  </address>
</contact>


 <contact fullname="Suresh Krishnan">
   <organization>Kaloom</organization>
   <address>
     <email>suresh@kaloom.com</email>
   </address>
 </contact>
 

 <contact fullname="Rajiv Asati">
   <organization>Cisco Systems, Inc.</organization>
   <address>
     <postal>
       <street>7200 Kit Creek Road</street>
       <city>Research Triangle Park</city><region>NC</region><code>27709</code>
       <country>United States of America</country>
     </postal>
     <email>rajiva@cisco.com</email>
   </address>
 </contact>
 

<contact fullname="Mark Smith">
  <address>
    <postal>
      <street>PO BOX 521</street>
      <city>Heidelberg</city><region>VIC</region><code>3084</code>
      <country>Australia</country>
    </postal>
    <email>markzzzsmith+id@gmail.com</email>
  </address>
</contact>

    </section>

  </back>

</rfc>
