<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc strict="yes" ?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<rfc category="std" docName="draft-ietf-6man-icmpv6-reflection-06"
     ipr="trust200902">
  <front>
    <title abbrev="ICMPv6 Reflection">Internet Control Message Protocol
    (ICMPv6) Reflection</title>

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

      <address>
        <postal>
          <street>25 Matam</street>

          <city>Haifa</city>

          <code>3190501</code>

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

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

    <author fullname="Xiaoming He" initials="X." surname="He">
      <organization>China Telecom</organization>

      <address>
        <email>hexm4@chinatelecom.cn</email>
      </address>
    </author>

    <author fullname="Tianran Zhou" initials="T." surname="Zhou">
      <organization abbrev="">Huawei</organization>

      <address>
        <postal>
          <street>156 Beiqing Rd.</street>

          <city>Beijing</city>

          <code>100095</code>

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

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

    <author fullname="Ron Bonica" initials="R." surname="Bonica">
      <organization>HPE</organization>

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

        <email>rbonica@juniper.net</email>
      </address>
    </author>

    <author fullname="Xiao Min" initials="X." surname="Min">
      <organization>ZTE Corp.</organization>

      <address>
        <email>xiao.min2@zte.com.cn</email>
      </address>
    </author>

    <date year="2025"/>

    <workgroup>6MAN</workgroup>

    <keyword>ICMP</keyword>

    <keyword>ICMPv6</keyword>

    <abstract>
      <t>
      This document describes the ICMPv6 Reflection utility. The ICMPv6 Reflection 
      utility is a diagnostic tool, similar to Ping and the ICMPv6 
      Probe utility. It is similar to Ping and Probe in that it relies on a stateless 
      message exchange between a probing node and a probed node. The probing node sends 
      a query to the probed node and the probed node responds to the query.
      </t>
      <t>
        The ICMPv6 Reflection utility differs from Ping and Probe
        because, in the ICMPv6 Reflection utility, the probing node requests a snapshot of the 
        query, as it arrived at the probed node. 
        The probed node returns the requested snapshot.
      </t>
        <t>
        The ICMPv6 Reflection utility is useful because it allows the user to see 
        how the network modified the query as it traveled from the probing node to 
        the probed node.
      </t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>The ICMPv6 Reflection utility is an IPv6 <xref target="RFC8200"/>
      diagnostic tool. It is similar to Ping  <xref target="RFC2151"/> and
      the ICMPv6 Probe  <xref target="RFC8335"/>, <xref target="I-D.ietf-intarea-rfc8335bis"/> utility in the following respects:</t>

      <t><list style="symbols">
          <t>A probing node sends an ICMPv6 <xref target="RFC4443"/> message
          to a probed node. This ICMP message requests specific
          information.</t>

          <t>The probed node receives the above-mentioned message, encodes the
          requested information into another ICMPv6 message, and sends that ICMPv6 message back
          to the probing node.</t>
        </list></t>

      <t>For the purposes of this document, the ICMPv6 message that the
      probing node sends is called the "request message" and the ICMPv6 message that
      the probed node sends is called the "reply message".</t>

      <t>Using the IPv6 Reflection utility, the following information can be
      requested:</t>

      <t><list style="symbols">
          <t>The status of an interface on the probed node.</t>

          <t>A copy of the request message, including its
          IPv6 header and extension headers, as it arrived at the probed
          node.</t>
        </list></t>

      <t>The probing node can also request specific pieces of the request
      message, as they arrived at the probed node. For example, the probing node can
      request only the IPv6 header and extension headers that encapsulated the request message.</t>

      <t>The ICMPv6 Reflection utility uses the ICMPv6 Extended Echo Request and
      Extended Echo Reply message types <xref target="I-D.ietf-intarea-rfc8335bis"/>.
      Each of these message types can include an ICMP Extension Structure <xref
      target="RFC4884"/>. The ICMP Extension Structure includes one or more extension objects. 
	  This document defines several new extension objects that are used to 
	  reflect portions of the request message, as it arrived at the probed node.</t>
	  
	  <t>An alternative approach that could be considered involves the probing node 
	  sending a UDP packet with an unused
	  destination port to the probed node, causing the probed node to send
	  an ICMPv6 Destination Unreachable message, which includes "As much of 
	  invoking packet as possible without the ICMPv6 packet exceeding 
	  the minimum IPv6 MTU" <xref target="RFC4443"/>. The benefit of ICMPv6 
	  Reflection is that it enables the probing node to selectively request specific parts of the 
	  request message to be included in the reply. Additionally, the payload of 
	  ICMP error messages such as Destination Unreachable might be modified 
	  by middleboxes (e.g. <xref target="RFC3022"/>), whereas ICMPv6 Reflection
	  is intended to reflect parts of the request message as received by the probed node.</t> 
	 
    </section>

    <section title="Requirement Language">
        <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
        "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
        "OPTIONAL" in this document are to be interpreted as described in BCP
        14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only
        when, they appear in all capitals, as shown here.</t>
    </section>


    <section anchor="UseCaseSec" title="Use Cases">
      <t>The following protocols define mutable IPv6 extension headers that can be
      used to trace a path and its performance:</t>

      <t><list style="symbols">
          <t>IPv6 Options for In Situ Operations, Administration, and
          Maintenance (IOAM) <xref target="RFC9486"/></t>

          <t>Inband Flow Analyzer <xref target="I-D.kumar-ippm-ifa"/></t>

          <t>Path Tracing in SRv6 networks <xref
          target="I-D.filsfils-ippm-path-tracing"/></t>

          <t>Segment Routing Header encapsulation for In-situ OAM Data <xref
          target="I-D.ali-spring-ioam-srv6"/></t>
        </list></t>

      <t>These extensions are used to collect information along a packet's
      delivery path. Currently, the collected information is sent to a
      controller for processing. However, in some cases this information is
      relevant to the sender.</t>

      <t>The ICMPv6 Reflection utility provides a mechanism by which this
      information can be returned to the probing node.</t>

      <t>
      The ICMPv6 Reflection utility can also be used to determine how the probe message's IPv6 header  
      has changed along its delivery path. For example, it can be used to determine how middleboxes have
      changed the Source Address, Destination Address, and Flow Label.
      </t>
    </section>

    <section anchor="TheorySec" title="Theory of Operation">
      <t>The probing node sends an ICMPv6 Extended Echo Request message <xref target="I-D.ietf-intarea-rfc8335bis"/> to the probed node. The ICMPv6 Extended Echo Request
      message contains an ICMP Extension Structure <xref target="RFC4884"/> and
      the ICMP Extension Structure contains an Extension Header followed by 
      any combination of the extension objects defined in <xref
      target="RefEcho"/> of this document. These objects are called
      Reflection objects. Each Reflection object requests that the probed node reflect a portion of
      the request message back to the probing node.</t>

      <t>Each Reflection object contains an
      object payload field whose length SHOULD be sufficient to carry the
      requested information. The total length of the ICMPv6 Extended Echo
      Request message MUST NOT exceed the IPv6 minimum MTU (1280 bytes.)</t>

      <t>The probed node receives the ICMPv6 Extended Echo Request and formats
      an ICMPv6 Extended Echo Reply message. The main body of the ICMPv6
      Extended Echo Reply message reflects the status of an interface
      on the probed node. 
      That interface is identified by the Destination
      Address in the request message. Alternatively, 
      the interface can be identified by including an 
      Interface Identification Object in the request 
      message, as defined in <xref target="I-D.ietf-intarea-rfc8335bis"/>.</t>

      <t>The ICMPv6 Extended Echo Reply message also contains an ICMP Extension
      Structure. The ICMP Extension
      Structure MUST contain all the Reflection objects that the ICMPv6 Extended Echo
      Request message contained. These objects MUST be listed in the order that they
      appeared in the ICMPv6 Extended Echo Request message. If the following requirements are
      satisfied, the probed node populates the payload field of a Reflection object: </t>

      <t><list style="symbols">
          <t>The probed node supports the object.</t>

          <t>Divulging the requested information does not violate the probed
          node's security policy.</t>

          <t>The payload field is sufficiently large to accommodate the
          requested data without truncation.</t>
        </list></t>

      <t>Otherwise, the probed node sets the object payload field to all zeros.</t>

      <t>An example of a request and a reply is provided in <xref
      target="ReflectionFormats"/>. In this example the request message includes
      the following Reflection objects:
      
           <t><list style="symbols">

           <t> A 'Reflect All' object. This object requests that the entire request message, 
           including all headers, be reflected to the probing node.</t>

          <t>
          'Reflect Arbitrary Data' object. This object requests that the contents of the incoming 'Arbitrary
          Data' object be reflected to the probing node.
          </t>
            </list></t>

      
      The request and
      reply messages have the same length. This is because they include the same set of objects, and each object has the same
      length in the request and reply.</t>
	  
	  <t>It should be noted that while some middleboxes might alter the payload
	  of ICMP error messages, such modifications do not apply to ICMP informational
	  messages, such as Extended Echo Request and Reply. This ensures that the reflected
	  information reaches the probing node exactly as sent by the probed node. Therefore, 
	  the payload of Extended Echo Reply messages is expected to be unmodified by 
	  middleboxes.</t>

      <figure align="center" anchor="ReflectionFormats"
              title="ICMPv6 Reflection Message Formats">
        <artwork align="left"><![CDATA[

       +----------------------------+   +----------------------------+
       |        IPv6 Header         |   |        IPv6 Header         |
       |    and extension headers   |   |    and extension headers   |
       +----------------------------+   +----------------------------+
       |       ICMPv6 Header        |   |       ICMPv6 Header        |
       |   Extended Echo Request    |   |    Extended Echo Reply     |
       +----------------------------+   +----------------------------+
       |   ICMP Extension Header    |   |   ICMP Extension Header    |
     +-+----------------------------+   +----------------------------+
     | |'Reflect All' Object Header |   |'Reflect All' Object Header |
     | +----------------------------+   +----------------------------+
     | |       Object payload       |   |   Request's IPv6 Header    |
     | |       (placeholder)        |   |   and extension headers    |
     | |                            |   |  ------------------------  |
     | |                            |   |  Request's ICMPv6 Header   |
One -+ |                            |   |   Extended Echo Request    |
or   | |                            |   |  ------------------------  |
more | |                            |   | Request's ICMP Ext. Header |
Ref- | +----------------------------+   +----------------------------+
lec- | |'Reflect Arbitrary Data' Hdr|   |'Reflect Arbitrary Data' Hdr|
tion | +----------------------------+   +----------------------------+
obj- | |       Object payload       |   |       Object payload       |
ects | |       Arbitrary data       |   |  Request's Arbitrary data  |
     +-+----------------------------+   +----------------------------+

       ^                            ^   ^                            ^
       |                            |   |                            |
       +-- Extended Echo Request ---+   +--- Extended Echo Reply ----+

           ]]></artwork>
      </figure>

      <t>Existing implementations of <xref target="RFC8335"/> do not support 
      Reflection objects as defined in the current document. 
      If a node that does not support Reflection objects
      receives an ICMP Extended Echo Request containing Reflection objects, 
      the expected behavior according to <xref target="RFC8335"/> is to respond 
      with an ICMP Echo Reply message that includes the "Malformed Query" 
      code in the Code field.</t>
    </section>

    <section anchor="RefEcho" title="ICMP Extension Objects">
      <t>This document defines the following extension object classes.</t>

      <t><list style="symbols">
          <t>Reflect All</t>

          <t>Reflect IPv6 Header</t>

          <t>Reflect HBH Header</t>

          <t>Reflect Routing Header</t>

          <t>Reflect Destination Header</t>

          <t>Reflect Request</t>

          <t>Reflect Arbitrary Data</t>
        </list></t>

      <t>Collectively, these objects are referred to as Reflection objects. An
      implementation that supports ICMPv6 Reflection MUST support the Reflect
      All object and MAY support other Reflection objects.</t>

      <t>In the IPv6 Reflection utility, an Extended Echo Request includes one or more Reflection objects.
      If the Reflect All object is present, it MUST be the first object.</t>

      <section title="Reflection Objects">
        <t>Each Reflection object MUST include the following:</t>

        <t><list style="symbols">
            <t>An object class (as specified in <xref target="IANA"/>).</t>

            <t>C-Type as described below.</t>

            <t>An object payload field, whose length SHOULD be sufficient to
            contain the requested information without truncation.</t>
          </list></t>

        <t>The C-Type value is used for indicating whether the probed node was
        able to process the object. The following C-Type values are supported
        in each of the Reflection objects:</t>

        <t><list style="symbols">
            <t>(0) Request</t>

            <t>(1) Reply - No Error</t>

            <t>(2) Reply - Unsupported Object</t>

            <t>(3) Reply - Object Length Exceeded</t>
          </list></t>

        <t>The C-Type field of a Reflection object in a request message MUST
        be set to the 'Request' value. If the probed node is able to process
        the Reflection object, it MUST copy the requested information into
        the object payload and update the C-Type field to the 'Reply - No Error' value.
        If the probed node is not able to process the object for any of the
        reasons listed in <xref target="TheorySec"/>, it MUST update the C-Type
        value of the object in the Extended Echo Reply, indicating the reason
        for not processing it.</t>
      </section>

      <section title="Reflect All Object">
        <t>The requested information in this object is the IPv6 header, all of
        its extensions, and the ICMPv6 Extended Echo Request up to and
        including the ICMP extension header, as they arrived at the probed
        node.</t>

        <t>In the ICMPv6 Extended Echo Request message, the object payload
        field MUST contain all zeros.</t>
      </section>

      <section title="Reflect IPv6 Header">
        <t>The requested information in this object is the IPv6 header, not
        including the IPv6 extension headers, as it arrived at the probed
        node.</t>

        <t>In the ICMPv6 Extended Echo Request message, the object payload
        field MUST contain all zeros</t>
      </section>

      <section title="Reflect HBH Header">
        <t>The requested information in this object is the Hop-by-hop Options
        extension header, as it arrived at the probed node.</t>

        <t>In the ICMPv6 Extended Echo Request message, the payload field MUST
        contain all zeros</t>
      </section>

      <section title="Reflect Routing Header">
        <t>The requested information in this object is the Routing header, as
        it arrived at the probed node.</t>

        <t>In the ICMPv6 Extended Echo Request message, the payload field MUST
        contain all zeros</t>
      </section>

      <section title="Reflect Destination Header">
        <t>The requested information in this object is the Destination Options
        header, as it arrived at the probed node.</t>

        <t>In the ICMPv6 Extended Echo Request message, the payload field MUST
        contain all zeros</t>
      </section>

      <section title="Reflect Request">
        <t>The requested information in this object is the ICMPv6 Extended
        Echo Request message up to and including the ICMP extension header, as
        it arrived at the probed node.</t>

        <t>In the ICMPv6 Extended Echo Request message, the payload field MUST
        contain all zeros</t>
      </section>

      <section title="Reflect Arbitrary Data">
        <t>The requested information in this object is the arbitrary data in
        the object payload field of the current object, as it arrived at the
        probed node. Reflection of arbitrary data is slightly similar to the
        way the data of ICMP Echo messages is reflected back to the probing
        node.</t>

        <t>In the ICMPv6 Extended Echo Request message, the object payload
        field contains arbitrary data. </t>
      </section>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>IANA is requested to allocate the following values in the "ICMP
      Extension Object Classes and Class Sub-types" registry.</t>

      <figure align="center" anchor="IcmpTypes" title="IANA Allocation">
        <artwork align="left"><![CDATA[
         
+-----------+------------------+--------+---------------+-----------------+  
| Class-Num |    Object Name   | C-Type |  C-Type Name  |     Reference   |  
+-----------+------------------+--------+---------------+-----------------+  
|   TBD1    | Reflect All      |  0-4   |  See below    | [This document] |  
|           |                  |        |               |                 |
+-----------+------------------+--------+---------------+-----------------+  
|   TBD2    | Reflect IPv6     |  0-4   |  See below    | [This document] |  
|           | Header           |        |               |                 |
+-----------+------------------+--------+---------------+-----------------+  
|   TBD3    | Reflect HBH      |  0-4   |  See below    | [This document] |  
|           | Header           |        |               |                 |
+-----------+------------------+--------+---------------+-----------------+
|   TBD4    | Reflect Routing  |  0-4   |  See below    | [This document] |  
|           | Header           |        |               |                 |
+-----------+------------------+--------+---------------+-----------------+
|   TBD5    | Reflect          |  0-4   |  See below    | [This document] |  
|           | Destination      |        |               |                 |
|           | Header           |        |               |                 |
+-----------+------------------+--------+---------------+-----------------+
|   TBD6    | Reflect Request  |  0-4   |  See below    | [This document] |  
|           |                  |        |               |                 |
+-----------+------------------+--------+---------------+-----------------+  
|   TBD7    | Reflect          |  0-4   |  See below    | [This document] |  
|           | Arbitrary Data   |        |               |                 |
+-----------+------------------+--------+---------------+-----------------+
  ]]></artwork>
      </figure>

      <t>For each of the object classes above the following C-Type values are
      defined:</t>

      <t><list style="symbols">
          <t>(0) Request</t>

          <t>(1) Reply - No Error</t>

          <t>(2) Reply - Unsupported Object</t>

          <t>(3) Reply - Object Length Exceeded</t>
        </list></t>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>Since this document uses technologies from <xref target="RFC4443"/>,
      <xref target="RFC4884"/>, and <xref target="I-D.ietf-intarea-rfc8335bis"/>, it inherits
      security considerations from those documents.</t>

      <t>The Reflection procedure that is defined in this document is
      symmetric in terms of the length of the request and reply messages. This
      symmetry mitigates the potential for amplification attacks, which would
      be possible if the reply message was longer than the request
      message.</t>

      <t>Depending on the network policy and the location of nodes in the
      network, ICMPv6 informational and/or error messages are sometimes
      filtered or not supported. For example, some nodes do not reply to
      ICMPv6 Echo or do not send ICMPv6 Time Exceeded messages (used in
      Traceroute), due to policy considerations that may be related to DoS
      mitigation or to privacy. Network operators SHOULD apply similar
      considerations to ICMPv6 Extended Echo messages when they are used for
      Reflection. For example, an operator can choose to disable support for
      ICMPv6 Reflection in networks or in nodes that do not respond to ICMPv6
      Echo and/or do not generate ICMPv6 Time Exceeded messages.</t>

      <t>As specified in <xref target="I-D.ietf-intarea-rfc8335bis"/>, in order to protect local 
      resources, implementations SHOULD rate-limit incoming ICMP Extended Echo 
      Request messages. Moreover, as per <xref target="I-D.ietf-intarea-rfc8335bis"/>, by default, 
      ICMP Extend Echo functionality is disabled.</t>
    </section>
  
    <section title="Acknowledgements">
      <t>
        The authors gratefully acknowledge Sebastian Moeller for his insightful comments.
      </t>
    </section>
  </middle>

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

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

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

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

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

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

      <?rfc include='reference.I-D.ietf-intarea-rfc8335bis'?>
	    
    </references>

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

      <?rfc include='reference.I-D.filsfils-ippm-path-tracing'?>

      <?rfc include='reference.I-D.ali-spring-ioam-srv6'?>

      <?rfc include='reference.I-D.kumar-ippm-ifa'?>

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

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

    </references>

	    <section numbered="no" title="Contributors">
          <t><figure>
              <artwork><![CDATA[ 
   Shahar Belkar
   Huawei
   8-2 Matam
   Haifa 3190501
   Israel
   Email: shahar.belkar@huawei.com

   
   Chongfeng Xie
   China Telecom
   Email: xiechf@chinatelecom.cn


   Zhenqiang Li
   China Mobile
   Email: li_zhenqiang@hotmail.com


   Justin Iurman
   Universite de Liege
   10, Allee de la decouverte (B28)
   4000 Sart-Tilman
   Belgium
   Email: justin.iurman@uliege.be

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

	</back>
</rfc>
