<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC8174 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
<!ENTITY RFC8664 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8664.xml">
<!ENTITY RFC8660 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8660.xml">
<!ENTITY I-D.ietf-ippm-ioam-direct-export SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-ippm-ioam-direct-export.xml">
<!ENTITY I-D.ietf-ippm-ioam-data SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-ippm-ioam-data.xml">
<!ENTITY I-D.ietf-ippm-ioam-flags SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-ippm-ioam-flags.xml">
<!ENTITY RFC5586 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5586.xml">
<!ENTITY RFC4385 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4385.xml">
<!ENTITY RFC6790 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6790.xml">
<!ENTITY RFC8964 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8964.xml">
<!ENTITY I-D.ietf-mpls-spl-terminology SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-mpls-spl-terminology.xml">
<!ENTITY I-D.zzhang-intarea-generic-delivery-functions SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.zzhang-intarea-generic-delivery-functions.xml">
<!ENTITY I-D.ietf-spring-mpls-path-segment SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-spring-mpls-path-segment.xml">
]>
<rfc submissionType="IETF" docName="draft-gandhi-mpls-ioam-sr-06" category="std" ipr="trust200902">
    <!-- Generated by id2xml 1.5.0 on 2020-03-09T17:12:10Z -->
    <?rfc compact="yes"?>
    <?rfc text-list-symbols="o*+-"?>
    <?rfc subcompact="no"?>
    <?rfc sortrefs="yes"?>
    <?rfc symrefs="yes"?>
    <?rfc strict="yes"?>
    <?rfc toc="yes"?>
    <front>
    <title abbrev="In-situ OAM for MPLS Data plane">MPLS Data Plane Encapsulation for In-situ OAM Data</title>
    <author fullname="Rakesh Gandhi" initials="R." role="editor" surname="Gandhi">
    <organization>Cisco Systems, Inc.</organization>
    <address><postal><street>Canada</street>
    </postal>
    <email>rgandhi@cisco.com</email>
    </address>
    </author>

    <author fullname="Zafar Ali" initials="Z." surname="Ali">
    <organization>Cisco Systems, Inc.</organization>
    <address><email>zali@cisco.com</email>
    </address>
    </author>

    <author fullname="Clarence Filsfils" initials="C." surname="Filsfils">
    <organization>Cisco Systems, Inc.</organization>
    <address><postal><street>Belgium</street>
    </postal>
    <email>cf@cisco.com</email>
    </address>
    </author>

    <author fullname="Frank Brockners" initials="F." surname="Brockners">
    <organization>Cisco Systems, Inc.</organization>
    <address><postal><street>Hansaallee 249, 3rd Floor</street>
    <street>DUESSELDORF, NORDRHEIN-WESTFALEN  40549</street>
    <street>Germany</street>
    </postal>
    <email>fbrockne@cisco.com</email>
    </address>
    </author>

    <author fullname="Bin Wen" initials="B." surname="Wen">
    <organization>Comcast</organization>
    <address><email>Bin_Wen@cable.comcast.com</email>
    </address>
    </author>

    <author fullname="Voitek Kozak" initials="V." surname="Kozak">
    <organization>Comcast</organization>
    <address><email>Voitek_Kozak@comcast.com</email>
    </address>
    </author>


    <date day="18" month="February" year="2021"/>
    <workgroup>MPLS Working Group</workgroup>
    <abstract><t>
   In-situ Operations, Administration, and Maintenance (IOAM) records
   operational and telemetry information in the data packet while the
   packet traverses a path between two nodes in the network.  This
   document defines how IOAM data fields are transported with 
   MPLS data plane encapsulation using new Generic Associated Channel (G-ACh).</t>

    </abstract>
    </front>

    <middle>
       <section title="Introduction" anchor="sect-1">
   <t>
   In-situ Operations, Administration, and Maintenance (IOAM) records
   operational and telemetry 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 the probe packets specifically
   dedicated to OAM or Performance Measurement (PM). The IOAM data
   fields are defined in <xref target="I-D.ietf-ippm-ioam-data"/>, and can be used for
   various use-cases for OAM and PM.  The IOAM data fields are further
   updated in <xref target="I-D.ietf-ippm-ioam-direct-export"/> for direct export use-cases and
   in <xref target="I-D.ietf-ippm-ioam-flags"/> for Loopback and Active flags.</t>

   <t>
   This document defines how IOAM data fields are transported with 
   MPLS data plane encapsulations using new Generic Associated Channel (G-ACh).</t>

    </section>

    <section title="Conventions" anchor="sect-2"><section title="Requirement Language" anchor="sect-2.1"><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"/> <xref target="RFC8174"/>
   when, and only when, they appear in all capitals, as shown here.</t>

    </section>

    <section title="Abbreviations" anchor="sect-2.2"><t>
   Abbreviations used in this document:</t>

    <t><list style="hanging" hangIndent="-1"><t hangText="ECMP    ">
    Equal Cost Multi-Path
    <vspace blankLines="0"/>
    </t>

    <t hangText="E2E     ">
    Edge-To-Edge
    <vspace blankLines="0"/>
    </t>

    <t hangText="G-ACh   ">
    Generic Associated Channel
    <vspace blankLines="0"/>
    </t>

    <t hangText="HbH     ">
    Hop-by-Hop
    <vspace blankLines="0"/>
    </t>

    <t hangText="IOAM    ">
    In-situ Operations, Administration, and Maintenance
    <vspace blankLines="0"/>
    </t>

    <t hangText="MPLS    ">
    Multiprotocol Label Switching
    <vspace blankLines="0"/>
    </t>

    <t hangText="OAM     ">
    Operations, Administration, and Maintenance
    <vspace blankLines="0"/>
    </t>

    <t hangText="PM      ">
    Performance Measurement
    <vspace blankLines="0"/>
    </t>

    <t hangText="POT     ">
    Proof-of-Transit
    <vspace blankLines="0"/>
    </t>

    <t hangText="PSID    ">
    Path Segment Identifier
    <vspace blankLines="0"/>
    </t>

    <t hangText="PW      ">
    PseudoWire
    <vspace blankLines="0"/>
    </t>

    <t hangText="SR      ">
    Segment Routing
    <vspace blankLines="0"/>
    </t>

    <t hangText="SR-MPLS ">
    Segment Routing with MPLS Data plane
    <vspace blankLines="0"/>
    </t>

    </list>
    </t>

    </section>

    </section>

    <section title="MPLS Extensions for IOAM Data Fields" anchor="sect-3">
    <section title="IOAM Generic Associated Channel" anchor="sect-3.1"><t>
   The IOAM data fields are defined in <xref target="I-D.ietf-ippm-ioam-data"/>.  The IOAM
   data fields are carried in the MPLS header as shown in Figure 1.
   More than one trace options can be present in the IOAM data fields. 
   G-ACh <xref target="RFC5586"/> provides a mechanism to transport OAM and other control
   messages over MPLS data plane.  The IOAM G-ACh header <xref target="RFC5586"/> 
   with new IOAM G-ACh type is added immediately after the MPLS
   label stack in the MPLS header as shown in Figure 1, before the IOAM
   data fields.</t>


    <figure title="IOAM Generic Associated Channel with IOAM Data Fields" anchor="ure-ioam-extension-in-mpls-header"><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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<-+
 |0 0 0 1|Version|   Reserved    |          IOAM G-ACh           |  |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  |
 | Reserved      | Block Number  | IOAM-OPT-Type |IOAM HDR Length|  |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  I
 |                                                               |  O
 |                                                               |  A
 ~                 IOAM Option and Data Space                    ~  M
 |                                                               |  |
 |                                                               |  |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<-+
 |                                                               |
 |                                                               |
 |                 Payload + Padding                             |
 |                                                               |
 |                                                               |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
    </figure>

   <t>The IOAM data fields are encapsulated using the following fields in the
   MPLS header:</t>

    <t><list style="hanging" hangIndent="2">

    <t hangText="IP Version Number 0001b:">
       The first four octets are IP Version Field part of a G-ACh header, as defined in <xref target="RFC5586"/>.
    </t>

    <t hangText="Version:">
       The Version field is set to 0, as defined in <xref target="RFC4385"/>.
    </t>

    <t hangText="IOAM G-ACh:">
       Generic Associated Channel (G-ACh) Type (value TBA3) for IOAM <xref target="RFC5586"/>.
    </t>

    <t hangText="Reserved:">
       Reserved Bits MUST be set to zero upon transmission and ignored upon receipt.
    </t>

    <t hangText="Block Number:">
       The Block Number can be used to aggregate the IOAM data collected
       in data plane, e.g. compute measurement metrics for each block of
       a flow.  It is also used to correlate the IOAM data on different nodes.
    </t>

    <t hangText="IOAM-OPT-Type:">
       8-bit field defining the IOAM Option type, as defined in
       Section 8.1 of <xref target="I-D.ietf-ippm-ioam-data"/>.
    </t>

    <t hangText="IOAM HDR LEN:">
       8-bit unsigned integer.  Length of the IOAM HDR in 4-octet units.
    </t>

    <t hangText="IOAM Option and Data Space:">
       IOAM option header and data is present
       as defined by the IOAM-OPT-Type field, and is defined in Section 5 of
        <xref target="I-D.ietf-ippm-ioam-data"/>.
    </t>

    </list>
    </t>

    </section>
    <section title="IOAM Indicator Labels" anchor="sect-3.2"><t>
    An IOAM Indicator Label is used to indicate the presence of the
    IOAM data fields in the MPLS header. There are two IOAM types defined in this
    document: Edge-to-Edge (E2E) and Hop-by-Hop (HbH) IOAM. 
    If only edge nodes need to process IOAM data then E2E IOAM Indicator Label 
    is used so that intermediate nodes can ignore it. 
    If both edge and intermediate nodes need to process IOAM data 
    then HbH IOAM Indicator Label is used. 
    Different IOAM Indicator Labels allow
    to optimize the IOAM processing on intermediate nodes 
    by checking if IOAM data fields need to be processed.
    </t>

    </section>
    </section>

    <section title="Edge-to-Edge IOAM" anchor="sect-4">

    <section title="Edge-to-Edge IOAM Indicator Label" anchor="sect-4.1"><t>
    The E2E IOAM Indicator Label is used to indicate the presence of the
    E2E IOAM data fields in the MPLS header as shown in Figure 2.
   </t>

    <figure title="MPLS Encapsulation for E2E IOAM" anchor="ure-ioam-encapsulation-in-mpls-header-e2e"><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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |  Label(1)                             | TC  |S|  TTL          |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 .                                                               .
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |  Label(n)                             | TC  |S|  TTL          |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |  E2E IOAM Indicator Label             | TC  |1|  TTL          |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                Packet as shown in Figure 1                    |
 .                                                               .
 +---------------------------------------------------------------+
]]></artwork>
    </figure>

    <t>The E2E IOAM data fields carry the Option-Type(s) that
    require processing on the encapsulating and decapsulating nodes only.
    The IOAM Option-Type carried can be IOAM Edge-to-Edge
    Option-Type <xref target="I-D.ietf-ippm-ioam-data"/>.
    The E2E IOAM data fields SHOULD NOT carry any IOAM Option-Type that
    require IOAM processing on the intermediate nodes as it will
    not be processed by them.</t>  

    </section>

    <section title="Procedure for Edge-to-Edge IOAM" anchor="sect-4.2"><t>
    The E2E IOM procedure is summarized as following:</t>  

    <t><list style="symbols"><t>The encapsulating node inserts the E2E IOAM Indicator Label 
    and one or more IOAM data fields in the MPLS header.</t>

    <t>
    The intermediate nodes do not process IOAM data fields.</t>

    <t>The decapsulating node "punts the timestamped copy" of 
    the received packet as is including the IOAM data fields when the node
    recognizes the IOAM Indicator Label.
    The copy of the packet is punted with receive timestamp 
    to the slow path for IOAM data fields processing.  
    The receive timestamp is required by the various 
    E2E OAM use-cases, including streaming telemetry. 
    Note that it is not necessarily punted to the control-plane.  </t>

    <t>The decapsulating node processes the IOAM data fields using the
    procedures defined in <xref target="I-D.ietf-ippm-ioam-data"/>.  An example of IOAM
    processing is to export the data fields, send data fields via streaming
    telemetry, etc.</t>

    <t>The decapsulating node also pops the IOAM Indicator Label and the IOAM
    data fields from the received packet. The decapsulated packet is forwarded 
    downstream or terminated locally similar to the regular data packets.</t>

    </list>
    </t>

    </section>

    <section title="Edge-to-Edge IOAM Indicator Label Allocation" anchor="sect-4.3"><t>
      The E2E IOAM Indicator Label is used to indicate the presence of the E2E IOAM data
      fields in the MPLS header.  The E2E IOAM Indicator Label 
      can be allocated using one of the following three methods:</t>

    <t><list style="symbols"><t>Label assigned by IANA with value TBA1 from the Extended
      Special-Purpose MPLS Values <xref target="I-D.ietf-mpls-spl-terminology"/>.</t>

    <t>Label allocated by a Controller from the global table of the
      decapsulating node.  The Controller provisions the label on both
      encapsulating and decapsulating nodes.</t>

    <t>Label allocated by the decapsulating node and signalled or advertised in the network.  The signaling 
      and/or advertisement extension for this is outside the scope of this document.</t>

    </list>
    </t>

    </section>

    </section>

    <section title="Hop-by-Hop IOAM" anchor="sect-5">
    <section title="Hop-by-Hop IOAM Indicator Label" anchor="sect-5.1"><t>
    The HbH IOAM Indicator Label is used to indicate the presence of the
    HbH IOAM data fields in the MPLS header as shown in Figure 3.</t>
 
    <figure title="MPLS Encapsulation for HbH IOAM" anchor="ure-ioam-encapsulation-in-mpls-header-1"><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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |  Label(1)                             | TC  |S|  TTL          |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 .                                                               .
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |  Label(n)                             | TC  |S|  TTL          |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |  HbH IOAM Indicator Label             | TC  |1|  TTL          |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                Packet as shown in Figure 1                    |
 .                                                               .
 +---------------------------------------------------------------+
]]></artwork>
    </figure>

   <t>The HbH IOAM data fields carry the Option-Type(s) that require
    processing at the intermediate and/or encapsulating and decapsulating nodes.
    The IOAM Option-Type carried can be IOAM
    Pre-allocated Trace Option-Type, IOAM Incremental Trace Option-Type
    and IOAM Proof of Transit (POT) Option-Type, as well as Edge-to-Edge
    Option-Type <xref target="I-D.ietf-ippm-ioam-data"/>. </t>  

    </section>

    <section title="Procedure for Hop-by-Hop IOAM" anchor="sect-5.2"><t>
    The HbH IOAM procedure is summarized as following:</t>  
            
    <t><list style="symbols"><t>The encapsulating node inserts the HbH IOAM Indicator Label 
    and one or more IOAM data fields in the MPLS header.</t>

    <t>The intermediate node enabled with HbH IOAM functions
    processes the data packet including the IOAM data fields as defined in 
    <xref target="I-D.ietf-ippm-ioam-data"/> when the node recognizes the HbH IOAM
    Indicator Label present in the MPLS header. The intermediate node 
    may 'punt the timestamped copy' of the received data packet including the IOAM 
    data fields as required by the IOAM data fields processing. 
    The copy of the packet is punted with receive timestamp to the slow path for IOAM processing.</t> 

    <t>The intermediate node forwards a copy of the processed data packet downstream.</t>

    <t>The decapsulating node "punts the timestamped copy" of 
    the received data packet as is including the IOAM data fields when the node
    recognizes the IOAM Indicator Label.
    The copy of the packet is punted with receive timestamp 
    to the slow path for IOAM data fields processing.  
    The receive timestamp is required by the various 
    E2E OAM use-cases, including streaming telemetry. 
    Note that it is not necessarily punted to the control-plane.</t>

    <t>The decapsulating node processes the IOAM data
    fields using the procedures defined in <xref target="I-D.ietf-ippm-ioam-data"/>.  An
    example of IOAM processing is to export the data fields, send
    data fields via streaming telemetry, etc.</t>

    <t>The decapsulating node also pops the IOAM Indicator Label and the IOAM
    data fields from the received packet. The decapsulated packet is forwarded 
    downstream or terminated locally similar to the regular data packets.</t>

    </list>
    </t>

    </section>

    <section title="Hop-by-Hop IOAM Indicator Label Allocation" anchor="sect-5.3"><t>
    The HbH IOAM Indicator Label is used to indicate the presence of the HbH IOAM data
    fields in the MPLS header.  The HbH IOAM Indicator Label 
    can be allocated using one of the following three methods:</t>

    <t><list style="symbols"><t>Label assigned by IANA with value TBA2 from the Extended
    Special-Purpose MPLS Values <xref target="I-D.ietf-mpls-spl-terminology"/>.</t>

    <t>Label allocated by a Controller from the network-wide global
    table.  The Controller provisions the labels on all nodes
    participating in IOAM functions along the data traffic path.</t>

    <t>Labels allocated by the intermediate and decapsulating nodes 
    and signalled or advertised in the network.  The signaling 
    and/or advertisement extension for this is outside the scope of this document.</t>

    </list>
    </t>

    </section>

    </section>

    <section title="Considerations for IOAM Indicator Label" anchor="sect-6">

    <section title="Considerations for ECMP" anchor="sect-6.1"><t>
    The encapsulating node needs to make sure the IOAM data fields do
    not start with a well-known IP Version Number (e.g. 0x4 for IPv4 and
    0x6 for IPv6) as that can alter the hashing function for ECMP that uses
    the IP header.  This is achieved by using the IOAM 
    G-ACh with IP Version Number 0001b after the MPLS label stack <xref target="RFC5586"/>.</t> 

    <t>
    Note that the hashing function for ECMP that uses the labels from the
    MPLS header may now include the IOAM Indicator Label.</t>

    <t>
    When entropy label <xref target="RFC6790"/> is used for hashing function for ECMP,
    the procedure defined in this document does not alter the hashing
    function.</t>

    </section>

    <section title="Node Capability" anchor="sect-6.2"><t>
    The decapsulating node that has to pop the IOAM Indicator Label, data
    fields, and perform the IOAM function may not be capable of
    supporting it.  The encapsulating node needs to know if the
    decapsulating node can support the IOAM function.  The signaling
    extension for this capability exchange is outside the scope of this
    document.</t>

    <t>
    The intermediate node that is not capable of supporting the IOAM functions
    defined in this document, can simply skip the IOAM processing of the
    MPLS header.</t>

    </section>

    <section title="MSD Considerations" anchor="sect-6.3"><t>
    The SR path computation needs to know the Maximum SID Depth (MSD)
    that can be imposed at each node/link of a given SR path <xref target="RFC8664"/>.
    This ensures that the SID stack depth of a computed path does not
    exceed the number of SIDs the node is capable of imposing.  The MSD
    used for path computation MUST include the IOAM Indicator Label.</t>

    </section>

    <section title="Nested MPLS Encapsulation" anchor="sect-6.4"><t>
    The data packets with IOAM data fields carry only one IOAM Indicator Label
    in the MPLS header.  Any intermediate node that adds additional MPLS
    encapsulation in the MPLS header may further update the IOAM data
    fields in the header without inserting another IOAM Indicator Label.
    When a packet is received with a HbH IOAM Indicator Label,
    the nested MPLS encapsulating node can add a HbH and/or E2E IOAM Option-Type. However,
    when a packet is received with an E2E IOAM Indicator Label,
    the nested MPLS encapsulating node SHOULD NOT add a HbH IOAM Option-Type, 
    as intermediate nodes will not process it.
   </t>

    </section>
    </section>

    <section title="MPLS Encapsulation with Control Word and Another G-ACh for IOAM Data Fields" anchor="sect-7"><t>
    The IOAM data fields, including IOAM G-ACh header are added in the MPLS encapsulation 
    immediately after the MPLS header. Any Control Word <xref target="RFC4385"/> 
    or another G-ACh <xref target="RFC5586"/> MUST be added 
    after the IOAM data fields in the packet as shown in the Figure 4 and Figure 5, respectively. 
    This allows the intermediate nodes to easily access the HbH IOAM data fields located 
    immediately after the MPLS header. The decapsulating node can remove
    the MPLS encapsulation including the IOAM data fields and then process 
    the Control Word or another G-ACh following it.</t>


   <figure title="Example MPLS Encapsulation with Generic PW Control Word with IOAM" anchor="ure-data-packet-with-another-cw-header"><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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | IOAM Indicator Label                  | TC  |1|  TTL          |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<-+
 |0 0 0 1|Version| Reserved      | IOAM G-ACh                    |  |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  |
 | Reserved      | Block Number  | IOAM-OPT-Type |IOAM HDR Length|  |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  I
 |                                                               |  O
 |                                                               |  A
 ~                 IOAM Option and Data Space                    ~  M
 |                                                               |  |
 |                                                               |  |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<-+
 |0 0 0 0| Specified by PW Encapsulation [RFC4385]               |   
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 |                                                               |
 ~                 Payload + Padding                             ~
 |                                                               |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
    </figure>


   <figure title="Example MPLS Encapsulation with Another G-ACh with IOAM " anchor="ure-data-packet-with-another-ach-header"><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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | IOAM Indicator Label                  | TC  |1|  TTL          |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<-+
 |0 0 0 1|Version| Reserved      | IOAM G-ACh                    |  |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  |
 | Reserved      | Block Number  | IOAM-OPT-Type |IOAM HDR Length|  |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  I
 |                                                               |  O
 |                                                               |  A
 ~                 IOAM Option and Data Space                    ~  M
 |                                                               |  |
 |                                                               |  |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<-+
 |0 0 0 1|Version| Reserved      | Channel Type                  |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 |                                                               |
 ~                 Payload + Padding                             ~
 |                                                               |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
    </figure>

    </section>


    <section title="Example MPLS Encapsulations" anchor="sect-8">
    <section title="Example SR-MPLS Encapsulation with IOAM" anchor="sect-8.1"><t>
    Segment Routing (SR) technology leverages the source routing paradigm
    <xref target="RFC8660"/>.  A node steers a packet through a controlled set of
    instructions, called segments, by pre-pending the packet with an SR
    header.  In the SR with MPLS data plane (SR-MPLS), the SR header is instantiated
    through a label stack.</t>

   <t>
    An example of data packet with SR-MPLS encapsulation containing Path
    Segment Identifier (PSID) <xref target="I-D.ietf-spring-mpls-path-segment"/> and E2E IOAM
    data fields is shown in Figure 6.  The PSID
    allows to identify the path associated with the data traffic 
    being monitored for IOAM on the decapsulating node.</t>

    <figure title="Example SR-MPLS Encapsulation with E2E IOAM Data Fields" anchor="ure-data-packet-with-sr-mpls-header"><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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |  Label(1)                             | TC  |S|      TTL      |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 .                                                               .
 .                                                               .
 .                                                               .
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |  Label(n)                             | TC  |S|      TTL      |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |  PSID                                 | TC  |S|      TTL      |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |  Extension Label (15)                 | TC  |S|  TTL          |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |  E2E IOAM Indicator Label TBA1        | TC  |1|  TTL          |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                Packet as shown in Figure 1                    |
 .                                                               .
 +---------------------------------------------------------------+
]]></artwork>
    </figure>

    </section>
 
    </section>

        <section title="Security Considerations" anchor="sect-9"><t>
    The security considerations of IOAM in general are discussed in
    <xref target="I-D.ietf-ippm-ioam-data"/>.</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>

    <t>Routers that support G-ACh are subject to the same security
    considerations as defined in <xref target="RFC4385"/> and <xref target="RFC5586"/>.</t>

    </section>

    <section title="IANA Considerations" anchor="sect-10"><t>
    IANA maintains the "Special-Purpose Multiprotocol Label Switching (MPLS) Label Values" registry (see
    <eref target="https://www.iana.org/assignments/mpls-label-values/mpls-label-values.xml"/>).  
    IANA is requested to allocate IOAM Indicator Label
    value from the "Extended Special-Purpose MPLS Label Values" registry:</t>

    <texttable style="all" anchor="iana-indicator-tbl" title="IOAM Indicator Label Values" ><ttcol> Value</ttcol>

    <ttcol> Description</ttcol>
    <ttcol> Reference</ttcol>

    <c>TBA1</c>
    <c>E2E IOAM Indicator Label</c>
    <c>This document</c>
    <c>TBA2</c>
    <c>HbH IOAM Indicator Label</c>
    <c>This document</c>
    </texttable>


    <t>IANA maintains G-ACh Type Registry 
    (see <eref target="https://www.iana.org/assignments/g-ach-parameters/g-ach-parameters.xhtml"/>).  
    IANA is requested to allocate a value for IOAM G-ACh Type from "MPLS Generalized Associated Channel (G-ACh) 
    Types (including Pseudowire Associated Channel Types)" registry.</t>

    <texttable anchor="iana-gach-tbl" title="IOAM G-ACh Type">

    <ttcol align="left">Value</ttcol>
    <ttcol align="left">Description</ttcol>
    <ttcol align="left">Reference</ttcol>
    <c>TBA3</c>
    <c>IOAM G-ACh Type</c>
    <c>This document</c>
    </texttable>

    </section>


    </middle>

    <back>
    <references title="Normative References">
    &RFC2119;
    &RFC4385;
    &RFC5586;
    &RFC8174;
    &I-D.ietf-ippm-ioam-direct-export;
    &I-D.ietf-ippm-ioam-data;
    &I-D.ietf-ippm-ioam-flags;
    </references>
    <references title="Informative References">
    &RFC6790;
    &RFC8660;
    &RFC8664;
    &I-D.ietf-mpls-spl-terminology;
    &I-D.ietf-spring-mpls-path-segment;
    </references>

    <section title="Acknowledgements" numbered="no"><t>
    The authors would like to thank Patrick Khordoc, Shwetha Bhandari and Vengada Prasad
    Govindan for the discussions on IOAM.  The authors would also like to
    thank Tarek Saad, Loa Andersson, Greg Mirsky, Stewart Bryant, Xiao Min, and Cheng Li for providing many
    useful comments. The authors would also like to thank Mach Chen, 
    Andrew Malis, Matthew Bocci, and Nick Delregno for the MPLS-RT reviews.</t>
    </section>

    <section title="Contributors" numbered="no" anchor="contributors"><figure><artwork><![CDATA[
Sagar Soni
Cisco Systems, Inc.

Email: sagsoni@cisco.com


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


    </back>

    </rfc>
    
