<?xml version="1.0" encoding="iso-8859-1" ?>
<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>

<rfc category="std" ipr="trust200902" docName="draft-ietf-mpls-spring-lsp-ping-path-sid-09" consensus="true" submissionType="IETF">

<front>
        <title abbrev="LSP Ping for SR PSID"> Label Switched Path Ping for Segment Routing Path Segment Identifier with MPLS Data Plane </title>
 
  <author fullname="Xiao Min" initials="X" surname="Min">
      <organization>ZTE Corp.</organization>
     <address>
       <postal>
         <street/>

         <!-- Reorder these if your country does things differently -->

         <city>Nanjing</city>

         <region/>

         <code/>

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

       <phone>+86 18061680168</phone>

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

       <!-- uri and facsimile elements may also be added -->
     </address>
    </author>
	
  <author fullname="Shaofu Peng" initials="S" surname="Peng">
      <organization>ZTE Corp.</organization>
     <address>
       <postal>
         <street/>

         <!-- Reorder these if your country does things differently -->

         <city>Nanjing</city>

         <region/>

         <code/>

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

       <phone/>

       <email>peng.shaofu@zte.com.cn</email>

       <!-- uri and facsimile elements may also be added -->
     </address>
    </author>
	
  <author fullname="Liyan Gong" initials="L" surname="Gong">
      <organization>China Mobile</organization>
     <address>
       <postal>
         <street/>

         <!-- Reorder these if your country does things differently -->

         <city>Beijing</city>

         <region/>

         <code/>

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

       <phone/>

       <email>gongliyan@chinamobile.com</email>

       <!-- uri and facsimile elements may also be added -->
     </address>
    </author>
	
  <author fullname="Rakesh Gandhi" initials="R" surname="Gandhi">
      <organization>Cisco Systems, Inc.</organization>
     <address>
       <postal>
         <street/>

         <!-- Reorder these if your country does things differently -->

         <city></city>

         <region/>

         <code/>

         <country>Canada</country>
       </postal>

       <phone/>

       <email>rgandhi@cisco.com</email>

       <!-- uri and facsimile elements may also be added -->
     </address>
    </author>
	
  <author fullname="Carlos Pignataro" initials="C" surname="Pignataro">
      <organization>Blue Fern Consulting</organization>
     <address>
       <postal>
         <street/>

         <!-- Reorder these if your country does things differently -->

         <city></city>

         <region/>

         <code/>

         <country>United States of America</country>
       </postal>

       <phone/>

       <email>carlos@bluefern.consulting</email>
       <email>cpignata@gmail.com</email>

       <!-- uri and facsimile elements may also be added -->
     </address>
    </author>
	
    <date year="2025"/>
  
    <area>Routing</area>
    <workgroup>MPLS Working Group</workgroup>

    <keyword>Request for Comments</keyword>
    <keyword>RFC</keyword>
    <keyword>Internet Draft</keyword>
    <keyword>I-D</keyword>

    <abstract>
  <t> Segment Routing (SR) leverages source routing to steer packets through an ordered list of instructions, called segments. SR can 
  be instantiated over the MPLS data plane without the need for additional signaling protocols. Path Segment Identifiers (PSIDs) are 
  used to identify and correlate bidirectional or end-to-end paths in Segment Routing networks. This document defines procedures (i.e. 
  three new Target forwarding Equivalence Class (FEC) Stack sub-TLVs) for the use of LSP Ping to support connectivity verification and 
  fault isolation for SR paths that include Path Segment Identifiers. The mechanisms described enable the validation and tracing of SR 
  paths with Path SIDs in MPLS networks, complementing existing SR-MPLS OAM capabilities. </t>
    </abstract>
    
</front>
  
<middle>

  <section title="Introduction">
  
  <t> A Path Segment is a local segment <xref target="RFC8402"/> that uniquely identifies an SR path on the egress node. A Path Segment 
  Identifier (PSID) is a single label that is assigned from the Segment Routing Local Block (SRLB) <xref target="RFC8402"/> of the egress 
  node of an SR path. </t>
  
  <t> As specified in <xref target="RFC9545"/>, PSID is a single label inserted by the ingress node of the SR path, and then processed 
  by the egress node of the SR path. The PSID is placed within the MPLS label stack as a label immediately following the last label of 
  the SR path. The egress node pops the PSID. </t>
  
  <t> Procedure for LSP Ping <xref target="RFC8029"/> as defined in Section 7.4 of <xref target="RFC8287"/> is also applicable to PSID, 
  and this document appends existing step 4a with a new step 4b specific to PSID. Concretely, LSP Ping can be used to check the correct 
  operation of a PSID and verify the PSID against the control plane. Checking correct operation means that an initiator can use LSP Ping 
  to check whether a PSID reached the intended node and got processed by that node correctly. Moreover, verifying a PSID against the control 
  plane means that the initiator can use LSP Ping to verify whether a given node has the same understanding with the initiator on how the 
  PSID was constructed by the control plane. To that end, this document specifies three new Target Forwarding Equivalence Class (FEC) Stack 
  sub-TLVs for such PSID checks. </t>
  
  <t> LSP Traceroute <xref target="RFC8287"/> is left out of this document because transit nodes are not involved in PSID processing. </t>
  
  </section>
  
  <section title="Conventions">
  
  <section title="Requirements 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 title="Terminology">
    <t> This document uses the terminology defined in <xref target="RFC3031"/>, <xref target="RFC8402"/>, <xref target="RFC8029"/>, and 
	<xref target="RFC9545"/>, readers are expected to be familiar with those terms. </t>
	
    <t>Segment-List-ID
            <list>
                    <t> The Segment-List-ID field is a 4-octet identifier that uniquely identifies a segment list within the context of the 
					candidate path of an SR Policy. Although not defined in <xref target="RFC9256"/>, the Segment-List-ID is the same identifier 
					as that can be signalled through control plane procotols including BGP (Section 2.1 of <xref target="I-D.ietf-idr-sr-policy-seglist-id"/>, 
					PCEP (Section 5.2 of <xref target="I-D.ietf-pce-multipath"/>), and BGP-LS (Section 5.7.4 of <xref target="I-D.ietf-idr-bgp-ls-sr-policy"/>).
                    </t>
            </list>
    </t> 
	
  </section>
  
  </section>
  
  <section title="Path Segment ID Sub-TLVs">

  <t> Analogous to what's defined in Section 5 of <xref target="RFC8287"/> and Section 4 of <xref target="RFC9703"/>, three new sub-TLVs 
  are defined for the Target FEC Stack TLV (Type 1), the Reverse-Path Target FEC Stack TLV (Type 16), and the Reply Path TLV (Type 21). 
  Note that the structures of the three new sub-TLVs follow the TLV's structure defined in Section 3 of <xref target="RFC8029"/>. </t>
  
  <texttable title="Sub-TLVs for PSID Checks">
   <ttcol align='left'>Sub-Type</ttcol>
   <ttcol align='left'>Sub-TLV Name</ttcol>
   <c>TBD1</c><c>SR Policy Associated PSID</c>
   <c>TBD2</c><c>SR Candidate Path Associated PSID</c>
   <c>TBD3</c><c>SR Segment List Associated PSID</c>
  </texttable>
  
  <t> As specified in Section 2 of <xref target="RFC9545"/>, a PSID is used to identify a segment list, some or all segment lists in a 
  Candidate path or an SR policy, so three different Target FEC Stack sub-TLVs need to be defined for PSID. The ordered list of selection 
  rules for the three Target FEC Stack sub-TLVs are defined as follows:
      <list style="symbols">
	  <t> When a PSID is used to identify all segment lists in an SR Policy, the Target FEC Stack sub-TLV of the type "SR Policy Associated 
	  PSID" MUST be used for PSID checks. </t>
	  <t> When a PSID is used to identify all segment lists in an SR Candidate Path, the Target FEC Stack sub-TLV of the type "SR Candidate 
	  Path Associated PSID" MUST be used for PSID checks. </t>
	  <t> When a PSID is used to identify a Segment List, the Target FEC Stack sub-TLV of the type "SR Segment List Associated PSID" MUST be 
	  used for PSID checks. </t>
	  <t> When a PSID is used to identify some segment lists in a Candidate path or an SR policy, the Target FEC Stack sub-TLV of the type 
	  "SR Segment List Associated PSID" MUST be used for PSID checks. In this case, multiple LSP Ping messages MUST be sent, and one Target 
	  FEC Stack sub-TLV of the type "SR Segment List Associated PSID" MUST be carried in each LSP Ping message. </t>
	  </list>
  </t>
  
  <t> These three new Target FEC Stack sub-TLVs are not expected to be present in the same message. If more than one of these sub-TLVs are 
  present in a message, only the first sub-TLV will be processed per the validation rules in Section 4.</t>
  
  <section title="SR Policy Associated PSID Sub-TLV">
  
  <t> The SR Policy Associated PSID sub-TLV is defined as follows: </t>
  
  <figure anchor="Figure_1" title="SR Policy Associated PSID sub-TLV Format">
  <artwork align="left"> <![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 = TBD1          |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Address Type  |                   Reserved                    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~                     Headend (4 or 16 octets)                  ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                       Color (4 octets)                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~                    Endpoint (4 or 16 octets)                  ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]>  </artwork>
  </figure>
  
      <t>Type (length: 2 octets)
              <list>
                      <t> The Type field identifies the sub-TLV as an SR Policy Associated PSID Sub-TLV. The value is set to (TBD1) and is to be assigned by IANA.
                      </t>
              </list>
      </t>
	  
      <t>Length (length: 2 octets)
              <list>
                      <t> The Length field indicates the length of the sub-TLV in octets, excluding the 
					  first 4 octets (Type and Length fields).
                          <list>
					      <t> If the Headend and Endpoint fields are encoded as IPv4 addresses (4 octets each), the Length field MUST be set to 16. </t>
					      <t> If the Headend and Endpoint fields are encoded as IPv6 addresses (16 octets each), the Length field MUST be set to 40. </t>
					      </list>
                      </t>
              </list>
      </t>
  
      <t>Address Type (length: 1 octet)
              <list>
                      <t> This field indicates the IP address family used in the Headend and Endpoint fields:
                          <list>
					      <t> A value of 1 indicates IPv4. </t>
					      <t> A value of 2 indicates IPv6. </t>
						  <t> Other values are reserved. </t>
					      </list>
					  </t>
              </list>
      </t>
	  
      <t>Reserved (length: 3 octets)
              <list>
                       <t> This field is reserved for future use. It MUST be set to zero when sent and MUST be ignored upon receipt. </t>
              </list>
      </t>
  
      <t>Headend (length: 4 or 16 octets)
              <list>
                      <t> The Headend field encodes the headend address of the SR Policy. This field is defined in Section 2.1 of <xref target="RFC9256"/>. </t>
              </list>
      </t>
  
      <t>Color (length: 4 octets)
              <list>
                      <t> The Color field identifies the color (i.e., policy identifier) of the SR Policy and is encoded as defined in Section 2.1 of <xref target="RFC9256"/>. </t>
              </list>
      </t>
  
      <t>Endpoint (length: 4 or 16 octets)
              <list>
                      <t> The Endpoint field encodes the endpoint address of the SR Policy. This field is defined in Section 2.1 of <xref target="RFC9256"/>. </t>
              </list>
      </t>
  
  </section>
  
  <section title="SR Candidate Path Associated PSID Sub-TLV">
  
  <t> The SR Candidate Path Associated PSID sub-TLV is formatted as follows: </t>
  
  <figure anchor="Figure_2" title="SR Candidate Path Associated PSID sub-TLV Format">
  <artwork align="left"> <![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 = TBD2          |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Address Type  |                   Reserved1                   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~                     Headend (4 or 16 octets)                  ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                       Color (4 octets)                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~                    Endpoint (4 or 16 octets)                  ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Protocol-Origin |                Reserved2                    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                                                               |
|                   Originator (20 octets)                      |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                Discriminator (4 octets)                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]>  </artwork>
  </figure>
  
      <t>Type (length: 2 octets)
              <list>
                      <t> The Type field identifies the sub-TLV as an SR Candidate Path Associated PSID sub-TLV. The value is set to (TBD2) and is to be assigned by IANA.
                      </t>
              </list>
      </t>
	  
      <t>Length (length: 2 octets)
              <list>
                      <t> The Length field indicates the length of the sub-TLV in octets, excluding the 
					  first 4 octets (Type and Length fields).
                          <list>
					      <t> If the Headend and Endpoint fields are encoded as IPv4 addresses (4 octets each), the Length field MUST be set to 44. </t>
					      <t> If the Headend and Endpoint fields are encoded as IPv6 addresses (16 octets each), the Length field MUST be set to 68. </t>
					      </list>
                      </t>
              </list>
      </t>
  
      <t>Address Type (length: 1 octet)
              <list>
                      <t> This field indicates the IP address family used in the Headend and Endpoint fields:
                          <list>
					      <t> A value of 1 indicates IPv4. </t>
					      <t> A value of 2 indicates IPv6. </t>
						  <t> Other values are reserved. </t>
					      </list>
					  </t>
              </list>
      </t>
	  
      <t>Reserved1 (length: 3 octets)
              <list>
                       <t> The Reserved1 field is reserved for future use. It MUST be set to zero when sent and MUST be ignored upon receipt. </t>
              </list>
      </t>
  
      <t>Headend (length: 4 or 16 octets)
              <list>
                      <t> The Headend field encodes the headend address of the SR Candidate Path. This field is defined in Section 2.1 of <xref target="RFC9256"/>. </t>
              </list>
      </t>
  
      <t>Color (length: 4 octets)
              <list>
                      <t> The Color field identifies the policy color and is defined in Section 2.1 of <xref target="RFC9256"/>. </t>
              </list>
      </t>
  
      <t>Endpoint (length: 4 or 16 octets)
              <list>
                       <t> The Endpoint field encodes the endpoint address of the SR Candidate Path. This field is defined in Section 2.1 of <xref target="RFC9256"/>. </t>
              </list>
      </t>
  
      <t>Protocol-Origin (length: 1 octet)
              <list>
                       <t> The Protocol-Origin field indicates the protocol that originated the SR Candidate Path. It is defined in Section 2.3 
					   of <xref target="RFC9256"/> and takes values from the IANA registry <xref target="PROTOCOL-ORIGIN"/>. If an unregistered 
					   value is used, validation at the responder MUST fail.
					   </t>
              </list>
      </t>
	  
      <t>Reserved2 (length: 3 octets)
              <list>
                       <t> The Reserved2 field is reserved for future use. It MUST be set to zero when sent and MUST be ignored upon receipt. </t>
              </list>
      </t>
  
      <t>Originator (length: 20 octets)
              <list>
                       <t> The Originator field identifies the originator of the SR Candidate Path and is encoded as defined in Section 2.4 of <xref target="RFC9256"/>. </t>
              </list>
      </t>
  
      <t>Discriminator (length: 4 octets)
              <list>
                       <t> The Discriminator field uniquely identifies the SR Candidate Path within the context of the Headend, Color, and Endpoint. 
					   This field is defined in Section 2.5 of <xref target="RFC9256"/>. </t>
              </list>
      </t>  
  
  </section>
  
  <section title="SR Segment List Associated PSID Sub-TLV">
  
  <t> The SR Segment List Associated PSID sub-TLV is used to identify a specific segment list within the context of a candidate path of an SR Policy. 
  The format of this sub-TLV is shown in Figure 3. </t>
  
  <figure anchor="Figure_3" title="SR Segment List Associated PSID sub-TLV Format">
  <artwork align="left"> <![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 = TBD3          |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Address Type  |                   Reserved1                   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~                     Headend (4 or 16 octets)                  ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                       Color (4 octets)                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~                    Endpoint (4 or 16 octets)                  ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Protocol-Origin |                Reserved2                    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                                                               |
|                    Originator (20 octets)                     |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               Discriminator (4 octets)                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             Segment-List-ID (4 octets)                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]>  </artwork>
  </figure>
  
      <t>Type
              <list>
                      <t> The Type field identifies the sub-TLV as an SR Segment List Associated PSID sub-TLV. The value is set to (TBD3) and is to be assigned by IANA.
                      </t>
              </list>
      </t>
	  
      <t>Length (length: 2 octets)
              <list>
                      <t> The Length field indicates the length of the sub-TLV in octets, excluding the 
					  first 4 octets (Type and Length fields).
                          <list>
					      <t> If the Headend and Endpoint fields are encoded as IPv4 addresses (4 octets each), the Length field MUST be set to 48. </t>
					      <t> If the Headend and Endpoint fields are encoded as IPv6 addresses (16 octets each), the Length field MUST be set to 72. </t>
					      </list>
                      </t>
              </list>
      </t>

      <t>Address Type (length: 1 octet)
              <list>
                      <t> This field indicates the IP address family used in the Headend and Endpoint fields:
                          <list>
					      <t> A value of 1 indicates IPv4. </t>
					      <t> A value of 2 indicates IPv6. </t>
						  <t> Other values are reserved. </t>
					      </list>
					  </t>
              </list>
      </t>
	  
      <t>Reserved1 (length: 3 octets)
              <list>
                       <t> The Reserved1 field is reserved for future use. It MUST be set to zero when transmitted and MUST be ignored upon receipt. </t>
              </list>
      </t>
	  
      <t>Headend (length: 4 or 16 octets)
              <list>
                      <t> The Headend field encodes the headend address of the SR Policy. This field is defined in Section 2.1 of <xref target="RFC9256"/>. </t>
              </list>
      </t>
  
      <t>Color (length: 4 octets)
              <list>
                      <t> The Color field identifies the color of the SR Policy and is encoded as specified in Section 2.1 of <xref target="RFC9256"/>. </t>
              </list>
      </t>
  
      <t>Endpoint (length: 4 or 16 octets)
              <list>
                       <t> The Endpoint field specifies the endpoint address of the SR Policy, as defined in Section 2.1 of <xref target="RFC9256"/>. </t>
              </list>
      </t>
  
      <t>Protocol-Origin (length: 1 octet)
              <list>
                       <t> The Protocol-Origin field indicates the protocol that originated the SR Candidate Path. It is defined in Section 2.3 
					   of <xref target="RFC9256"/> and takes values from the IANA registry <xref target="PROTOCOL-ORIGIN"/>. If an unregistered 
					   value is used, validation at the responder MUST fail.
					   </t>
              </list>
      </t>
	  
      <t>Reserved2 (length: 3 octets)
              <list>
                       <t> The Reserved2 field is reserved for future use. It MUST be set to zero when transmitted and MUST be ignored upon receipt. </t>
              </list>
      </t>
  
      <t>Originator (length: 20 octets)
              <list>
                       <t> The Originator field identifies the originator of the SR Candidate Path and is defined in Section 2.4 of <xref target="RFC9256"/>. </t>
              </list>
      </t>
  
      <t>Discriminator (length: 4 octets)
              <list>
                       <t> The Discriminator field uniquely identifies the SR Candidate Path within the context of the Headend, Color, and Endpoint. 
					   This field is defined in Section 2.5 of <xref target="RFC9256"/>. </t>
              </list>
      </t>  
  
      <t>Segment-List-ID (length: 4 octets)
              <list>
                      <t> The Segment-List-ID field is a 4-octet identifier that uniquely identifies a segment list within the context of the candidate path of an SR Policy.
					  This field is defined in terminology of Section 2.2.
                      </t>
              </list>
      </t>  
	  
  </section>
  
  </section>
  
  <section title="PSID FEC Validation">

  <t> The MPLS LSP Ping procedures may be initiated by the headend of the Segment Routing path or a 
  centralized topology-aware data plane monitoring system as described in <xref target="RFC8403"/>. For the 
  PSID, the responder nodes that receive echo request and send echo reply MUST be the endpoint of the 
  SR path. </t>
  
  <t> When an endpoint receives the LSP echo request packet with top FEC being the PSID, it MUST perform 
  validity checks on the content of the PSID FEC Stack sub-TLV.</t>
  
  <t> If a malformed FEC Stack sub-TLV is received, then a return code of 1, "Malformed echo request received" as defined 
  in <xref target="RFC8029"/> MUST be sent. The section below is appended to step 4a of Section 7.4 of <xref target="RFC8287"/>. </t>
  
    <section title="PSID FEC Validation Rules">
  
          <t>4b. Segment Routing PSID Validation: </t>
		  
          <t>If the Label-stack-depth is 1 and the Target FEC Stack sub-TLV 
		  at FEC-stack-depth is TBD1 (SR Policy Associated PSID sub-TLV), { 
          <list>
          <t>Set the Best-return-code to 10, "Mapping for this FEC is not
            the given label at stack-depth &lt;RSC&gt;" if any below
            conditions fail (the notation &lt;RSC&gt; refers to the Return Subcode): 
          <list style="symbols">
          <t>Validate that the PSID is signaled or provisioned for the SR Policy { 
          <list style="symbols">
		  
          <t>Validate that the signaled or provisioned headend, color, and endpoint, for the PSID, matches with the 
		  corresponding fields in the received SR Policy Associated PSID sub-TLV. </t>
		  
          </list>	
	      } </t>	  
		  
          </list>			  
          } </t>
		  
          <t>If all the above validations have passed, set the return code to 3
            "Replying router is an egress for the FEC at stack-depth &lt;RSC&gt;". </t>
			
          <t>Set FEC-Status to 1 and return. </t>
		  
          </list>		  
          } </t>
		  
          <t>Else, if the Label-stack-depth is 1 and the Target FEC Stack sub-TLV 
		  at FEC-stack-depth is TBD2 (SR Candidate Path Associated PSID sub-TLV), { 
          <list>
          <t>Set the Best-return-code to 10, "Mapping for this FEC is not
            the given label at stack-depth &lt;RSC&gt;" if any below
            conditions fail: 
          <list style="symbols">
          <t>Validate that the PSID is signaled or provisioned for the SR Candidate Path { 
          <list style="symbols">
		  
          <t>Validate that the signaled or provisioned headend, color, endpoint, originator, and discriminator, 
		  for the PSID, matches with the corresponding fields in the received SR Candidate Path Associated PSID sub-TLV. </t>
		  
          </list>	
	      } </t>
		  
          </list>			  
          } </t>
		  
          <t>If all the above validations have passed, set the return code to 3
            "Replying router is an egress for the FEC at stack-depth &lt;RSC&gt;". </t>
			
          <t>Set FEC-Status to 1 and return. </t>
		  
          </list>		  
          } </t>
		  
          <t>Else, if the Label-stack-depth is 1 and the Target FEC Stack sub-TLV
         at FEC-stack-depth is TBD3 (SR Segment List Associated PSID sub-TLV), { 
          <list>
          <t>Set the Best-return-code to 10, "Mapping for this FEC is not
            the given label at stack-depth &lt;RSC&gt;" if any below
            conditions fail: 
          <list style="symbols">
          <t>Validate that the PSID is signaled or provisioned for the SR Segment List { 
          <list style="symbols">
		  
          <t>Validate that the signaled or provisioned headend, color, endpoint, originator, discriminator, and segment-list-id, 
		  for the PSID, matches with the corresponding fields in the received SR Segment List Associated PSID sub-TLV. </t>

          </list>	
          } </t>		  
		  
          </list>			  
          } </t>
		  
          <t>If all the above validations have passed, set the return code to 3
            "Replying router is an egress for the FEC at stack-depth &lt;RSC&gt;". </t>
			
          <t>Set FEC-Status to 1 and return. </t>
		  
          </list>		  
          } </t>

    <t> When an SR Policy Associated PSID sub-TLV, or an SR Candidate Path Associated PSID sub-TLV, or an SR Segment List 
	Associated PSID sub-TLV is carried in Reverse-Path Target FEC Stack TLV (Type 16) or Reply Path TLV (Type 21), it MUST be 
	sent by an endpoint in an echo reply. The headend MUST perform validity checks as described above without setting the return 
	code. If any of the validations fail, then the headend MUST drop the echo reply and SHOULD log and/or report an error.</t>
  
    </section>
  </section>
  
  <section title="Security Considerations">
  
  <t> This document defines additional MPLS LSP Ping sub-TLVs and follows the mechanisms defined in <xref target="RFC8029"/>. 
  All the security considerations defined in Section 5 of <xref target="RFC8029"/> apply to this document. The MPLS LSP Ping 
  sub-TLVs defined in this document do not impose any additional security challenges to be considered.</t>
  
  </section>
  
  <section title="IANA Considerations"> 
  
  <t> IANA is requested to assign three new Target FEC Stack sub-TLVs from the "Sub-TLVs for TLV Types 1, 16, and 21" registry 
  <xref target="MPLS-LSP-PING"/> within the "TLVs" registry of the "Multiprotocol Label Switching (MPLS) Label Switched Paths (LSPs) 
  Ping Parameters" registry group. The Standards Action range that requires an error message to be returned if the sub-TLV is not 
  recognized (range 0-16383) should be used.</t>
  
  <texttable title="Sub-TLVs for TLV Types 1, 16, and 21 Registry">
   <ttcol align='left'>Sub-Type</ttcol>
   <ttcol align='left'>Sub-TLV Name</ttcol>
   <ttcol align='left'>Reference</ttcol>
   <c>TBD1</c><c>SR Policy Associated PSID</c><c>Section 3.1 of THIS_DOCUMENT</c>
   <c>TBD2</c><c>SR Candidate Path Associated PSID</c><c>Section 3.2 of THIS_DOCUMENT</c>
   <c>TBD3</c><c>SR Segment List Associated PSID</c><c>Section 3.3 of THIS_DOCUMENT</c>
  </texttable>
  
  </section>

  <section title="Acknowledgements">
  <t> The authors would like to acknowledge Loa Andersson, Detao Zhao, Ben Niven-Jenkins, Greg Mirsky, Ketan Talaulikar, James 
  Guichard, Jon Geater, Gorry Fairhurst, Bing Liu, Mohamed Boucadair, Eric Vyncke, Gunter Van de Velde, and Mahesh Jethanandani 
  for their thorough review and very helpful comments. </t>
  <t> The authors would like to acknowledge Yao Liu and Quan Xiong for the very helpful face to face discussion.</t>
  </section>  
  
</middle>
  
<back>
    <references title="Normative References">
     <?rfc include="reference.RFC.9545"?>
     <?rfc include="reference.RFC.8287"?>
     <?rfc include="reference.RFC.2119"?>
     <?rfc include="reference.RFC.8174"?>
     <?rfc include="reference.RFC.8029"?>
     <?rfc include="reference.RFC.9256"?>
     <reference anchor="PROTOCOL-ORIGIN"
                 target="https://www.iana.org/assignments/segment-routing/segment-routing.xhtml#sr-policy-protocol-origin">
        <front>
          <title>SR Policy Protocol Origin</title>
          <author></author>
        </front>
     </reference>
     <reference anchor="MPLS-LSP-PING"
                 target="http://www.iana.org/assignments/mpls-lsp-ping-parameters">
        <front>
          <title>Multi-Protocol Label Switching (MPLS) Label Switched Paths (LSPs) Ping Parameters</title>
          <author></author>
        </front>
     </reference>
    </references>
	
    <references title="Informative References">
     <?rfc include="reference.RFC.3031"?>
     <?rfc include="reference.RFC.8402"?>
     <?rfc include="reference.RFC.8403"?>
     <?rfc include="reference.RFC.9703"?>
     <?rfc include="reference.I-D.ietf-idr-sr-policy-seglist-id"?>
     <?rfc include="reference.I-D.ietf-pce-multipath"?>
     <?rfc include="reference.I-D.ietf-idr-bgp-ls-sr-policy"?>
    </references>	
</back>
</rfc>
