<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.29 (Ruby 3.2.3) -->
<?rfc comments="yes"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-ietf-intarea-icmp-exten-hdr-len-03" category="std" consensus="true" updates="4884" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.30.0 -->
  <front>
    <title abbrev="icmp-eh-len">ICMP Extension Header Length Field</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-intarea-icmp-exten-hdr-len-03"/>
    <author initials="R." surname="Bonica" fullname="Ron Bonica">
      <organization>HPE</organization>
      <address>
        <postal>
          <country>USA</country>
        </postal>
        <email>rbonica@juniper.net</email>
      </address>
    </author>
    <author initials="X." surname="He" fullname="Xiaoming He">
      <organization>China Telecom</organization>
      <address>
        <postal>
          <country>China</country>
        </postal>
        <email>hexm4@chinatelecom.cn</email>
      </address>
    </author>
    <author initials="X." surname="Min" fullname="Xiao Min">
      <organization>ZTE Corporation</organization>
      <address>
        <postal>
          <country>China</country>
        </postal>
        <email>xiao.min2@zte.com.cn</email>
      </address>
    </author>
    <author initials="T." surname="Mizrahi" fullname="Tal Mizrahi">
      <organization>Huawei</organization>
      <address>
        <postal>
          <country>Israel</country>
        </postal>
        <email>tal.mizrahi.phd@gmail.com</email>
      </address>
    </author>
    <date year="2025" month="July" day="20"/>
    <area>Internet</area>
    <workgroup>INTAREA Group</workgroup>
    <keyword>ICMP</keyword>
    <abstract>
      <?line 50?>

<t>The ICMP Extension Structure does not have a length field. Therefore, unless the length of the Extension Structure can be inferred from other data in the ICMP message, the Extension Structure must be the last item in the ICMP message.</t>
      <t>This document defines a length field for the ICMP Extension Structure. When length information is provided, receivers can use it to parse ICMP messages. Specifically, receivers can use length information to determine the offset at which the item after the ICMP Extension Structure begins.</t>
      <t>This document updates RFC 4884.</t>
    </abstract>
  </front>
  <middle>
    <?line 59?>

<section anchor="intro">
      <name>Introduction</name>
      <t>The ICMP Extension Structure <xref target="RFC4884"/> does not have a length field. Therefore, unless the length of the Extension Structure can be inferred from other data in the ICMP message, the Extension Structure must be the last item in the ICMP message.</t>
      <t>This document defines a length field for the ICMP Extension Structure. When length information is provided, receivers can use it to parse ICMP messages. Specifically, receivers can use length information to determine the offset at which the item after the ICMP Extension Structure begins.</t>
      <t>New implementations <bcp14>SHOULD</bcp14> always include the length field, even though it is not needed when the ICMP message ends with an ICMP Extension Structure.</t>
      <t>This document updates <xref target="RFC4884"/>.</t>
    </section>
    <section anchor="motivation">
      <name>Motivation</name>
      <t><xref target="I-D.ietf-intarea-rfc8335bis"/> enhances the PROBE utility and provides motivation 
for this document. The enhancement adds a new field to the ICMP Extended Echo and ICMP Extended 
Echo Reply messages. To maintain compatibility with legacy PROBE implementations, 
the new field is added after the ICMP Extension Structure.</t>
      <t>New PROBE implementations infer ICMP Extension Structure length from the ICMP message type.
<xref target="I-D.ietf-intarea-rfc8335bis"/> acknowledges that this is not a desirable behavior and
advises against its use in the future.</t>
      <t>This document provides an alternative to inferring ICMP Extension Structure length from other message 
contents.</t>
    </section>
    <section anchor="conventions-and-definitions">
      <name>Conventions and Definitions</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 BCP14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
      <?line -18?>

</section>
    <section anchor="the-icmp-extension-structure">
      <name>The ICMP Extension Structure</name>
      <t><xref target="box-fig"/>  depicts the ICMP Extension Header as updated by this document.</t>
      <figure anchor="box-fig">
        <name>ICMP Extension Header As Updated By This Document</name>
        <artset>
          <artwork type="svg"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="128" width="528" viewBox="0 0 528 128" class="diagram" text-anchor="middle" font-family="monospace" font-size="13px" stroke-linecap="round">
              <path d="M 8,64 L 8,96" fill="none" stroke="black"/>
              <path d="M 72,64 L 72,96" fill="none" stroke="black"/>
              <path d="M 136,64 L 136,96" fill="none" stroke="black"/>
              <path d="M 264,64 L 264,96" fill="none" stroke="black"/>
              <path d="M 520,64 L 520,96" fill="none" stroke="black"/>
              <path d="M 8,64 L 520,64" fill="none" stroke="black"/>
              <path d="M 8,96 L 520,96" fill="none" stroke="black"/>
              <g class="text">
                <text x="16" y="36">0</text>
                <text x="176" y="36">1</text>
                <text x="336" y="36">2</text>
                <text x="496" y="36">3</text>
                <text x="16" y="52">0</text>
                <text x="32" y="52">1</text>
                <text x="48" y="52">2</text>
                <text x="64" y="52">3</text>
                <text x="80" y="52">4</text>
                <text x="96" y="52">5</text>
                <text x="112" y="52">6</text>
                <text x="128" y="52">7</text>
                <text x="144" y="52">8</text>
                <text x="160" y="52">9</text>
                <text x="176" y="52">0</text>
                <text x="192" y="52">1</text>
                <text x="208" y="52">2</text>
                <text x="224" y="52">3</text>
                <text x="240" y="52">4</text>
                <text x="256" y="52">5</text>
                <text x="272" y="52">6</text>
                <text x="288" y="52">7</text>
                <text x="304" y="52">8</text>
                <text x="320" y="52">9</text>
                <text x="336" y="52">0</text>
                <text x="352" y="52">1</text>
                <text x="368" y="52">2</text>
                <text x="384" y="52">3</text>
                <text x="400" y="52">4</text>
                <text x="416" y="52">5</text>
                <text x="432" y="52">6</text>
                <text x="448" y="52">7</text>
                <text x="464" y="52">8</text>
                <text x="480" y="52">9</text>
                <text x="496" y="52">0</text>
                <text x="512" y="52">1</text>
                <text x="40" y="84">Version</text>
                <text x="108" y="84">Rsvd</text>
                <text x="204" y="84">Length</text>
                <text x="388" y="84">Checksum</text>
              </g>
            </svg>
          </artwork>
          <artwork type="ascii-art"><![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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |Version|  Rsvd |     Length    |           Checksum            |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
        </artset>
      </figure>
      <t>Version: 4 bits.</t>
      <ul spacing="normal">
        <li>
          <t>ICMP Extension Header version number. This is version 2 as per <xref target="RFC4884"/>.</t>
        </li>
      </ul>
      <t>Reserved (Rsvd): 4 bits</t>
      <ul spacing="normal">
        <li>
          <t><bcp14>MUST</bcp14> be set to 0 by the sender and <bcp14>MUST</bcp14> be ignored by the receiver as per <xref target="RFC4884"/>.</t>
        </li>
      </ul>
      <t>Length: 8 bits</t>
      <ul spacing="normal">
        <li>
          <t>This field represents the length of the ICMP Extension Structure, including all options and optional padding, but excluding the ICMP Extension Header. The length is measured in 4-byte words. Legacy implementations set this field to 0 as per section 7 of <xref target="RFC4884"/>.</t>
        </li>
      </ul>
      <t>Checksum: 16 bits</t>
      <ul spacing="normal">
        <li>
          <t>As per <xref target="RFC4884"/>, the checksum is the one's complement of the one's complement sum of the data structure, with the checksum field replaced by zero for the purpose of computing the checksum.  An all-zero value means that no checksum was transmitted.  See Section 5.2 of <xref target="RFC4884"/> for a description of how this field is used.</t>
        </li>
      </ul>
      <t>The ICMP Extension Structure <bcp14>MUST</bcp14> be zero-padded so that it ends on a 4-byte boundary. If it does not end on a 
4-byte boundary, the receiving node will parse the ICMP message incorrectly and may discard it.</t>
    </section>
    <section anchor="backwards-compatibility">
      <name>Backwards Compatibility</name>
      <t>Legacy implementations set the length field to 0 as per section 7 of <xref target="RFC4884"/>. When the length 
field is set to 0, it conveys no information and cannot be used to parse the ICMP packet.</t>
      <t>In these cases, one of the following statements <bcp14>MUST</bcp14> be true:</t>
      <ul spacing="normal">
        <li>
          <t>The ICMP Extension Structure is the final item in the ICMP packet.</t>
        </li>
        <li>
          <t>The length of the ICMP Extension Structure can be inferred from other fields in the packet.</t>
        </li>
      </ul>
      <t>Legacy implementation do not recognize ICMP messages that rely on the ICMP Extension 
Header length field. This is because when the document was published, the IETF had not yet standardized
any messages that rely on ICMP Extension Header length field.</t>
      <t>Assume that, at some time in the future, the IETF standardizes a new ICMP message and that message relies on the ICMP Extension Header length field. Legacy implementations will not recognize the new message because of its 
type and will not examine its content.</t>
      <t>An ICMP implementation <bcp14>MUST</bcp14> be capable of processing the ICMP Extension Header length field before recognizing any message that relies on it.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>This document requires no IANA actions.</t>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>This document introduces no security vulnerabilities. However, it does inherit
security considerations from <xref target="RFC4884"/>.</t>
    </section>
    <section anchor="acknowledgements">
      <name>Acknowledgements</name>
      <t>Thanks to Tom Herbert, Erik Vynke and Michael Welzl for their review and helpful suggestions.</t>
    </section>
  </middle>
  <back>
    <references anchor="sec-combined-references">
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>
        <reference anchor="RFC4884">
          <front>
            <title>Extended ICMP to Support Multi-Part Messages</title>
            <author fullname="R. Bonica" initials="R." surname="Bonica"/>
            <author fullname="D. Gan" initials="D." surname="Gan"/>
            <author fullname="D. Tappan" initials="D." surname="Tappan"/>
            <author fullname="C. Pignataro" initials="C." surname="Pignataro"/>
            <date month="April" year="2007"/>
            <abstract>
              <t>This document redefines selected ICMP messages to support multi-part operation. A multi-part ICMP message carries all of the information that ICMP messages carried previously, as well as additional information that applications may require.</t>
              <t>Multi-part messages are supported by an ICMP extension structure. The extension structure is situated at the end of the ICMP message. It includes an extension header followed by one or more extension objects. Each extension object contains an object header and object payload. All object headers share a common format.</t>
              <t>This document further redefines the above mentioned ICMP messages by specifying a length attribute. All of the currently defined ICMP messages to which an extension structure can be appended include an "original datagram" field. The "original datagram" field contains the initial octets of the datagram that elicited the ICMP error message. Although the original datagram field is of variable length, the ICMP message does not include a field that specifies its length. Therefore, in order to facilitate message parsing, this document allocates eight previously reserved bits to reflect the length of the "original datagram" field.</t>
              <t>The proposed modifications change the requirements for ICMP compliance. The impact of these changes on compliant implementations is discussed, and new requirements for future implementations are presented.</t>
              <t>This memo updates RFC 792 and RFC 4443. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="4884"/>
          <seriesInfo name="DOI" value="10.17487/RFC4884"/>
        </reference>
        <reference anchor="RFC2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author fullname="S. Bradner" initials="S." surname="Bradner"/>
            <date month="March" year="1997"/>
            <abstract>
              <t>In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="RFC8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author fullname="B. Leiba" initials="B." surname="Leiba"/>
            <date month="May" year="2017"/>
            <abstract>
              <t>RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
      </references>
      <references anchor="sec-informative-references">
        <name>Informative References</name>
        <reference anchor="I-D.ietf-intarea-rfc8335bis">
          <front>
            <title>PROBE: A Utility for Probing Interfaces</title>
            <author fullname="Bill Fenner" initials="B." surname="Fenner">
              <organization>Arista Networks</organization>
            </author>
            <author fullname="Ron Bonica" initials="R." surname="Bonica">
              <organization>Juniper Networks</organization>
            </author>
            <author fullname="Reji Thomas" initials="R." surname="Thomas">
              <organization>Arista Networks</organization>
            </author>
            <author fullname="Jen Linkova" initials="J." surname="Linkova">
              <organization>Google</organization>
            </author>
            <author fullname="Chris Lenart" initials="C." surname="Lenart">
              <organization>Verizon</organization>
            </author>
            <author fullname="Mohamed Boucadair" initials="M." surname="Boucadair">
              <organization>Orange</organization>
            </author>
            <date day="24" month="January" year="2025"/>
            <abstract>
              <t>   This document describes a network diagnostic tool called PROBE.
   PROBE is similar to PING in that it can be used to query the status
   of a probed interface, but it differs from PING in that it does not
   require bidirectional connectivity between the probing and probed
   interfaces.  Instead, PROBE requires bidirectional connectivity
   between the probing interface and a proxy interface.  The proxy
   interface can reside on the same node as the probed interface, or it
   can reside on a node to which the probed interface is directly
   connected.  This document updates RFC 4884 and obsoletes RFC 8335.

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-intarea-rfc8335bis-00"/>
        </reference>
      </references>
    </references>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA+1Y23IbuRF9x1cg8kMSh2RJsryWWZtd0xIdqcqSHEneS7a2
UuBMk0Q0BCbADClatr9lv2W/LKeBmSGHouRNJW+JbJVmQKAvp083utntdkVi
U20mfVkW4+7h6s13lU+0FqLQRUZ9eXp09k4ObwsyXlsjT0il5ORbMpNiKt9o
ylKhRiNH877UySzv0rSbkRGpTYya4Xzq1LjoaoIWbQrlSHXjPhbZnaaOt3d3
n4lEFTSxbtmXvkhFmad49315cHh4IIQvlEn/rjJrIHJJXuS6L38qbNKR3rrC
0djjaT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