<?xml version='1.0' encoding='US-ASCII'?>

<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<rfc
      xmlns:xi="http://www.w3.org/2001/XInclude"
      category="std"
      docName="draft-liu-6man-icmp-verification-06"
      ipr="trust200902"
      obsoletes=""
      updates="4884"
      submissionType="IETF"
      xml:lang="en"
      tocInclude="true"
      tocDepth="4"
      symRefs="true"
      sortRefs="true"
      version="3">

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

 <front>


   <title abbrev="ICMP for Validation">Extending ICMPv6 for SRv6-related Information Validation</title>
    <seriesInfo name="Internet-Draft" value="draft-liu-6man-icmp-verification-06"/>


   <author fullname="Yao Liu" surname="Liu">
      <organization>ZTE</organization>
      <address>
        <postal>
          <street/>
          <!-- Reorder these if your country does things differently -->

         <city>Nanjing</city>
          <region/>
          <code/>
          <country>China</country>
        </postal>
        <phone></phone>
        <email>liu.yao71@zte.com.cn</email>
        <!-- uri and facsimile elements may also be added -->
     </address>
    </author>
	
	   <author fullname="Yisong Liu" surname="Liu">
      <organization>China Mobile</organization>
      <address>
        <postal>
          <street/>
          <!-- Reorder these if your country does things differently -->

         <city></city>
          <region/>
          <code/>
          <country>China</country>
        </postal>
        <phone></phone>
        <email>liuyisong@chinamobile.com</email>
        <!-- uri and facsimile elements may also be added -->
     </address>
    </author>
	
    <date year="2024"/>

   <!-- Meta-data Declarations -->

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

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

   <abstract>
      <t>This document introduces the mechanism to verify the data plane against the control plane and detect data plane failures in IPv6/SRv6 networks by extending ICMPv6 messages. </t>
    </abstract>
  </front>
  <middle>
    <section numbered="true" toc="default">
      <name>Introduction</name>
	  <t>An SR-MPLS SID/MPLS label can be related with various FEC information, e.g, VPN IP prefix <xref target="RFC4365"></xref>, EVPN service information <xref target="RFC7432"></xref>, flex algorithms<xref target="RFC9350"></xref> and etc. Most of these information would be advertised via control plane protocols(e.g, IGP, BGP, etc). </t>
	  <t>Procedures for simple and efficient mechanisms to verify the data plane against the control plane using LSP Ping in MPLS network are well defined in <xref target="RFC8029"></xref>. Normally, when a new feature is introduced and the MPLS label is associated with new information, the LSP Ping mechanism is still applicable by defining new FEC sub-TLV with the new information encoded in it.</t>

	<t><xref target="RFC9489"></xref> defines procedures to detect data plane failures using LSP Ping in MPLS networks deploying EVPN. Figure 1 is an unicast data plane connectivity check scenario provided in <xref target="RFC9489"></xref>.  CE1 is dual-homed to PE1 and PE2, PE1 and PE2 both announced a MAC route for CE1 with the same C-MAC but different RDs. On PE3, when an operator performs a connectivity check for the C-MAC address on PE1, the operator initiates an LSP Ping request with the Target FEC Stack TLV containing the C-MAC address, the corresponding RD and other necessary fields in the packet. The egress PE will process the packet and perform checks for the EVPN-related information carried in Target FEC Stack TLV.</t>
	
	
		 <figure anchor="network">
		<name>EVPN Network</name>
        <artwork align="center" name=""><![CDATA[
                  +------------------+
                  |                  |
                  |                  |
+----+      +-----+                  +-----+     +----+
| CE1|------|     |                  | PE3 |-----| CE2|
+----+\     | PE1 |   MPLS/SRv6      |     |     +----+
       \    +-----+     Network      +-----+
        \         |                  |
         \  +-----+                  |
          \ |     |                  |
           \| PE2 |                  |
            +-----+                  |
                  |                  |
                  +------------------+

             <-----EVPN over MPLS/SRv6-----> 

	  
           ]]></artwork>
      </figure>	
	  <t>For VPN/EVPN services over SRv6 as in <xref target="RFC9252"></xref>, the requirements to detect data plane failures are similar. Besides VPN/EVPN information, IPv6 addresses(mainly SRv6 SID), can be related with other information/functions such as flex algorithm <xref target="RFC9350"></xref> <xref target="RFC9502"></xref>, SRv6 endpoint behaviors <xref target="RFC8986"></xref>, service functions <xref target="I-D.ietf-spring-sr-service-programming"></xref> and so on. Operators may want to validate these information as well. But there's no such mechanism in IPv6/SRv6 yet.</t> 

	
	<t>RFC9259 describes how the existing ICMPv6 mechanisms for ping and traceroute can be used in an SRv6 network for data plane connectivity check purpose.This document introduces the mechanism to verify the data plane against the control plane and detect data plane failures in IPv6/SRv6 networks by extending ICMPv6 messages. </t>
	<t>Editor's Note: Instead of extending ICMPv6 Node Information Query (or NI Query) and the Node Information Reply (or NI Reply) based on <xref target="RFC4620"></xref>, this document introducing ICMPv6 Validation Request and ICMPv6 Validation Reply messages by defining two new types of ICMPv6 messages taking example from <xref target="RFC8335"></xref>. The reason is that NI Query and NI Reply are originally defined for discovering information about nodes, such as names and addresses, while this document aims to provide an IP-related information validation mechanism, which makes RFC4620 not quite suitable.</t>
	
	

	  
      <section numbered="true" toc="default">
        <name>Requirements Language</name>
		<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" format="default"></xref> <xref target="RFC8174" format="default"></xref> when, and only when, they appear in all capitals, as shown here.</t>
      </section>
    </section>
	
      <section numbered="true" toc="default">
        <name>ICMPv6 Validation Request</name>
        <t>The Validation Request message is defined for ICMPv6<xref target="RFC4443" format="default"></xref>. Like any ICMPv6 message, the ICMPv6 Validation Request message is encapsulated in an IPv6 header.</t>
		<t>The structure of ICMPv6 Validation Request is shown in Figure 2, where:</t>
		<figure anchor="request">
		<name>Validation Request</name>
        <artwork align="center" name=""><![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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |     Type      |     Code      |          Checksum             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |           Identifier          |Sequence Number|   Reserved    |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
      .                                                               .
      .                  ICMP Extension Structure                     .
      .                                                               .
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
	  
           ]]></artwork>
      </figure>
	  	<ul spacing="normal">
        <li>Type: The value is TBD1.</li>
		<li>Code: MUST be set to 0 and MUST be ignored upon receipt.</li>
		<li>Checksum: For ICMPv6, see <xref target="RFC4443" format="default"></xref>.</li>
		<li>Identifier: An Identifier to aid in matching Validation Replies to Validation Requests. May be zero.</li>
		<li>Sequence Number: A Sequence Number to aid in matching Validation Replies to Validation Requests. May be zero.</li>
		<li>Reserved: This field MUST be set to 0 and ignored upon receipt.</li>
		<li>ICMP Extension Structure: The ICMP Extension Structure carries the information that needs to be verified. Section 7 of <xref target="RFC4884"></xref> defines the ICMP Extension Structure. As per <xref target="RFC4884"></xref>, the Extension Structure contains one Extension Header followed by one or more objects. When applied to the ICMP Validation Request message, the ICMP Extension Structure MUST only contain one or more instance of the Validation Information Objects as defined in section 2.1.</li>
		</ul>
      <section numbered="true" toc="default">
        <name>Validation Information Object</name>		
		<t>The Validation Information Object is shown in Figure 3, where:</t>
		<figure anchor="Object">
		<name>Validation Information Object</name>
        <artwork align="center" name=""><![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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |         Length                |   Class-Num   |   C-Type      |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 |                   // (Object payload) //                      |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
	  
           ]]></artwork>
      </figure>
		<ul spacing="normal">
        <li>Length: Length of the object, measured in octets, including the Object Header and Object Payload.</li>
		<li>Class-Num: Validation Information Object. The value is TBD2.</li>
		<li>Object payload: Variable-length field. C-Type-specific data.</li>
		<li>C-Type: For this object, the C-Type is used to indicate the type of the information that needs to be verified. This document only defines the C-Type value 0 as shown below:</li>
		</ul>	
		<artwork align="center" ><![CDATA[
     C-Type           Object Payload
    --------           -----------
          0           Revsered
	  
           ]]></artwork>		
		<t>It should be noticed that this document only defines fundamental packet formats and processing rules, the detailed C-Type values and the corresponding information carried in object payload is out of the scope of the document and would be defined in separate documents. For example, <xref target="I-D.liu-bess-srv6-evpn-validation"></xref> provides solutions to detect data plane failures for EVPN over SRv6 leveraging the mechanism defined in this document. 
 </t>
		
		
		
				
      </section>
</section>	  
	
    
	
<section numbered="true" toc="default">
<name>ICMPv6 Validation Reply</name>
		<t>The Validation Reply message is defined for ICMPv6.  Like any other ICMPv6 messages, the ICMP Extended Echo Reply message is encapsulated in an IPv6 header.
Figure 4 describes the ICMPv6 Validation Reply message.</t>
		<figure anchor="Reply">
		<name>Validation Reply</name>
			<artwork align="center" ><![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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |     Type      |     Code      |          Checksum             |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |           Identifier          |Sequence Number|   Reserved    |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
           ]]></artwork>		   
		</figure>
		<t>ICMP fields:</t>		
	<ul spacing="normal">
        <li>Type: Validation Reply.  The value is TBD3.</li>
		<li>
			<t>Code: Values are </t>
			<t>(0) Validation passed</t>
			<t>(1) Malformed request received</t>
			<t>(2) One or more of the objects were not understood</t>
			<t>(3) Information mismatch</t>
		</li>
		<li>Checksum: For ICMPv6, see <xref target="RFC4443"></xref>.</li>
		<li>Identifier: Copied from the Identifier field of the invoking Validation Request packet.</li>
		<li>Sequence Number: Copied from the Sequence Number field of the invoking Validation Request packet.</li>
     </ul>

	
</section>	


<section numbered="true" toc="default">
		<name>ICMPv6 Validation Message Processing</name>
	<section numbered="true" toc="default">
	<name>Sending a Validation Request</name>
		<t>A node that originates an ICMPv6 validation request message SHOULD first determine which IPv6 address/SRv6 SID needs to be verified with what information. How the sender node get the information is out of scope of the document.</t>
		<t>An ICMPv6 validation request contains one or more Validation Information objects, depending on how the user wants to do the validation. For example, an SRv6 service SID is related with an endpoint behavior and an IPv4 VPN prefix, if one wants to verify both information of the SID via one request message, an ICMPv6 validation request is sent with two validation information objects in it. Or one may choose to send two individual ICMPv6 validation requests, each carries one validation information object to verify these two information separately.</t>
		<t>The target IP is the IP address/SRv6 SID to be verified and MUST be a unicast address. The ICMPv6 validation request is sent with the target IP address/SRv6 SID set as the destination address of the IP header field without SRH for the SRv6 best-effort connectivity case, or set as the last segment with SRH. The Source Address of the ICMPv6 packet MUST be a unicast address belonging to the node.</t>
		<t>The Hop Limit SHOULD be set to 255 to prevent transit nodes from processing the validation request.</t>
	</section>
	
	<section numbered="true" toc="default">
	<name>Receiving a Validation Request</name>
		<t>All transit nodes process the validation request message like any other IPv6 data packets and hence do not require any change.</t> 
		<t>As specified in <xref target="RFC4443"></xref>, if a router receives a packet with a Hop Limit of zero, or if a router decrements a packet's Hop Limit to zero, it MUST discard the packet and originate an ICMPv6 Time Exceeded message with Code 0 to the source of the packet. The source address SHOULD be set as a local address of the router.</t>
		<t>The target node is a node receiving an validation request where the target IP of that message is locally configured as a segment or local interface.</t>
		<t>When the validation request packet arrives at the target node, and any of the following conditions apply, the node MUST silently discard the incoming message:</t>
		<ul spacing="normal">
        <li>The node does not recognize ICMP Validation Request messages.</li>
		<li>The node has not explicitly enabled ICMP Validation functionality.</li>
		<li>The incoming ICMP Validation Request carries a Source Address that is not explicitly authorized for the incoming ICMP Validation Request type.</li>
		<li>The Source Address of the incoming message is not a unicast address.</li>
		<li>The Destination Address of the incoming message is not a unicast address.</li>		
     </ul>	
		
		<t>Otherwise, if the packet is well formed, the target node verifies the information encoded in the Validation Information Object against the corresponding local information and state.</t>
	</section>
	
	
	<section numbered="true" toc="default">
	<name>Sending a Validation Reply </name>
		<t>When a node receives an ICMPv6 Validation Request, it MUST format an ICMPv6 Validation Reply as follows:</t>
		<ul spacing="normal">
        <li>Copy the Source Address from the Validation Request message to the Destination Address of the Validation Reply.</li>
		<li>Copy the Destination Address from the Validation Request message to the Source Address of the Validation Reply.</li>
		<li>Set the Hop Limit to 255</li>
		<li>Set the Next Header to ICMPv6.</li>
        <li>Set the DiffServ codepoint to CS0 <xref target="RFC4594"></xref>.</li>
		<li>Set the ICMP Type to Validation Reply.</li>
		<li>Copy the Identifier from the Validation Request message to the Validation Reply.</li>
		<li>Copy the Sequence Number from the Validation Request message to the Validation Reply.</li>	
        <li>Set the Code field as described in Section 4.3.1</li>
		<li>Set the Checksum appropriately.</li>
		<li>Forward the ICMP Validation Reply to its destination.	</li>	
		</ul>	
			<section numbered="true" toc="default">
			<name>Return Code</name>
			<t>The Code field MUST be set to 0 if all the the information encoded in the Validation Information Object is consistent with the the corresponding local information on the target node. </t>
			<t>The Code field MUST be set to 1 if any of the following conditions apply:</t>
			<ul spacing="normal">
				<li>The ICMP Request does not include an ICMP Extension Structure.</li>
				<li>The ICMP Extension Structure does not only include the Validation Information Object(s).</li>
				<li>The query is otherwise malformed.</li>
			</ul>	
			
			<t>The Code field MUST be set to 2 if one or more of the objects are not understood by the node.</t>
			<t>The Code field MUST be set to 3 if the information in the  Validation Information Object(s) is not consistent with the local information and validation is not passed.	</t>
			</section>
	</section>
	
	
	
	<section numbered="true" toc="default">
	<name>Receiving a Validation Reply</name>
		<t>A node should only receive a validation reply in response to a validation request that it sent. Thus, on receipt of a validation reply, the node should parse the packet to ensure that it is well-formed, then attempt to match up the validation reply with a validation request that it had previously sent, using the Identifier and Sequence Number. If no match is found, the node ignores the echo reply.</t>
	</section>
	
	
</section>

<section numbered="true" toc="default">
	<name>Updates to RFC 4884</name>
	<t>Section 4.6 of [RFC4884] provides a list of extensible ICMP messages (i.e., messages that can carry the ICMP Extension Structure). This document adds the ICMPv6 Validation Request message and the ICMPv6 Validation Reply message to that list.</t>
	</section>	

	
<section numbered="true" toc="default">
	<name>IANA Considerations</name>
		<t>This document requests the following actions from IANA:</t>
		<ul spacing="normal">
        <li>Add an entry to the "ICMPv6 "type" Numbers" registry, representing the Validation Request.  This entry has one code 0.</li>
		<li>
		<t>Add an entry to the "ICMPv6 "type" Numbers" registry, representing the Validation Reply.  This entry has the following codes:</t>
		<t>(0) Validation passed</t>
		<t>(1) Malformed request received</t>
		<t>(2) One or more of the objects were not understood</t>
		<t>(3) Information mismatch</t>
		</li>
		<li>
		<t>Add an entry to the "ICMP Extension Object Classes and Class Sub-types" registry, representing the Validation Information Object with C-types:</t>
		<t>(0) Reserved</t>
		<t>C-Type values are assignable on a first-come-first-serve (FCFS) basis with a range of 0-255.</t>
		</li>
		</ul>	
		<t> All codes mentioned above are assigned on a First Come First Serve (FCFS) basis with a range of 0-255.</t>
	</section>	

<section numbered="true" toc="default">
	<name>Security Considerations</name>
		<t>Security considerations discussed in <xref target="RFC4443"></xref> and<xref target="RFC4884"></xref> apply to this document.</t>
		<t>To protect against unauthorized sources using validation request messages to obtain network information, it is RECOMMENDED that implementations provide a means of checking the source addresses of validation request messages against an access list before accepting the message.</t>
		<t>The validation mechanism SHOULD be only used in the limited domain. The validation request contains the control plane information, policies should be implemented on the edge devices of the domain to prevent the information from being leaked into other domains.</t>
		<t>In order to protect local resources, implementations SHOULD rate-limit incoming ICMP Request messages.</t>
		<t></t>
</section>	
	
<section numbered="true" toc="default">
	<name>Acknowledgement</name>
    <t>The authors would like to thank Greg Mirsky, Bruno Decraene, Matthew Bocci, Zafar Ali, Ali Sajassi and Jorge Rabadan for their comments and suggestions.</t>
</section>	
	
  </middle>
  <!--  *****BACK MATTER ***** -->

 <back>

   <references>
      <name>References</name>
      <references>
        <name>Normative References</name>

		<?rfc include="reference.RFC.2119.xml"?>
		<?rfc include="reference.RFC.8174.xml"?>
		<?rfc include="reference.RFC.4443.xml"?>
		<?rfc include="reference.RFC.4884.xml"?>
		<?rfc include="reference.RFC.8986.xml"?>

  
	  
      </references>
      <references>
        <name>Informative References</name>
		<?rfc include="reference.RFC.4594.xml"?>
		<?rfc include="reference.RFC.7432.xml"?>		
		<?rfc include="reference.RFC.4365.xml"?>
		<?rfc include="reference.RFC.4620.xml"?>		
		<?rfc include="reference.RFC.5036.xml"?>
		<?rfc include="reference.RFC.9350.xml"?>
		<?rfc include="reference.RFC.8029.xml"?>
		<?rfc include="reference.RFC.9489.xml"?>	
		<?rfc include="reference.RFC.8335.xml"?>	
		<?rfc include='reference.I-D.liu-bess-srv6-evpn-validation.xml'?>	
		<?rfc include='reference.I-D.ietf-spring-sr-service-programming.xml'?>		
		<?rfc include="reference.RFC.9502.xml"?>	
		<?rfc include="reference.RFC.9252.xml"?>

      </references>
    </references>


 </back>
</rfc>
