<?xml version="1.0" encoding="iso-8859-1"?>
<!--<!DOCTYPE rfc SYSTEM "rfc4748.dtd"> -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY rfc2119 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY rfc8174 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml">
<!ENTITY rfc8287 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8287.xml">
<!ENTITY rfc8690 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8690.xml">
<!ENTITY rfc8029 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8029.xml">
<!ENTITY rfc8402 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8402.xml">
<!ENTITY rfc8403 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8403.xml">
<!ENTITY I-D.ietf-spring-mpls-path-segment PUBLIC "" "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-spring-mpls-path-segment.xml">
<!ENTITY I-D.ietf-spring-segment-routing-policy PUBLIC "" "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-spring-segment-routing-policy.xml">
<!ENTITY I-D.lp-idr-sr-path-protection PUBLIC "" "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.lp-idr-sr-path-protection.xml">
<!ENTITY I-D.ietf-idr-sr-policy-path-segment PUBLIC "" "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-idr-sr-policy-path-segment.xml">
<!ENTITY I-D.ietf-pce-segment-routing-policy-cp PUBLIC "" "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-pce-segment-routing-policy-cp.xml">
<!ENTITY I-D.ietf-pce-sr-path-segment PUBLIC "" "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-pce-sr-path-segment.xml">
<!ENTITY I-D.ietf-idr-segment-routing-te-policy PUBLIC "" "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-idr-segment-routing-te-policy.xml">
<!ENTITY I-D.ietf-spring-sr-policy-yang PUBLIC "" "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-spring-sr-policy-yang.xml">
<!ENTITY I-D.ietf-mpls-sr-epe-oam PUBLIC "" "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-mpls-sr-epe-oam.xml">
]>

<rfc category="std" ipr="trust200902" docName="draft-xp-mpls-spring-lsp-ping-path-sid-00">

<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<?rfc toc="yes"?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>

<front>
        <title abbrev="LSP Ping/Trace for SR Path SID"> Label Switched Path (LSP) Ping/Traceroute for Segment Routing (SR) 
		Path Segment Identifiers (SIDs) with MPLS Data Planes
 </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/>

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

       <!-- uri and facsimile elements may also be added -->
     </address>
    </author>
	
  <author fullname="Peng Shaofu" initials="P" surname="Shaofu">
      <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>

	
    <date year="2020"/>
  
    <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> Path Segment is a type of SR segment, which is used to identify an SR path. This document provides Target Forwarding 
  Equivalence Class (FEC) stack TLV definitions for Path Segment Identifiers. </t>
    </abstract>
    
</front>
  
<middle>

  <section title="Introduction">

  <t> Path Segment is a type of SR segment, which is used to identify an SR path. Path Segment in MPLS based segment routing 
  network is defined in <xref target="I-D.ietf-spring-mpls-path-segment"/>. </t>
  
  <t> When Path Segment is used, it's inserted by the ingress node of the SR path, and then processed by the egress node of 
  the SR path. The position of Path Segment Label within the MPLS label stack is immediately following the segment list of 
  the SR path. Note that the Path Segment would not be popped up until it reaches the egress node. </t>
  
  <t> This document provides Target Forwarding Equivalence Class (FEC) stack TLV definitions for Path-SIDs. Procedures for 
  LSP Ping and Traceroute as defined in <xref target="RFC8287"/> and <xref target="RFC8690"/> are applicable to Path-SIDs as 
  well. </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="RFC8402"/> and <xref target="RFC8029"/>, readers are expected 
	to be familiar with those terms. </t>
  </section>
  
  </section>
  
  <section title="Path Segment ID Sub-TLV">

  <t> Analogous to what's defined in Section 5 of <xref target="RFC8287"/> and Section 4 of <xref target="I-D.ietf-mpls-sr-epe-oam"/>, 
  two 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).</t>
  
  <figure>
  <artwork>
<![CDATA[
     Sub-Type    Sub-TLV Name
     --------    -----------------------------
      TBD1       SR Candidate Path's Path SID
      TBD2       SR Segment List's Path SID
]]>
  </artwork>
  </figure>
  
  <t> As specified in Section 3 of <xref target="I-D.ietf-idr-sr-policy-path-segment"/>, the Path Segment can be used to identify an 
  SR path (specified by SID list) or an SR candidate path, so two different Target FEC sub-TLVs need to be defined for Path Segment 
  ID. When a Path Segment is used to identify an SR path, then the Target FEC sub-TLV of SR Segment List's Path SID would be used to 
  validate the control plane to forwarding plane synchronization for this Path-SID; When a Path Segment is used to identify an SR 
  candidate path, then the Target FEC sub-TLV of SR Candidate Path's Path SID would be used to validate the control plane to forwarding 
  plane synchronization for this Path-SID.</t>

  <section title="SR Candidate Path's Path SID">
  
  <t> The format of SR Candidate Path's Path SID sub-TLV is as specified below: </t>
  
  <figure anchor="Figure_1" title="SR Candidate Path's Path SID sub-TLV">
  <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            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~                     Headend  (4/16 octets)                    ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                       Color  (4 octets)                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~                    Endpoint  (4/16 octets)                    ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Protocol-Origin|                    Reserved                   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                                                               |
|                  Originator  (20 octets)                      |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               Discriminator  (4 octets)                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

]]>
  </artwork>
  </figure>
  
      <t>Type
              <list>
                      <t>This field is set to the value (TBD1) which indicates that it's a 
					  SR Candidate Path's Path SID sub-TLV.
                      </t>
              </list>
      </t>
	  
      <t>Length
              <list>
                      <t>This field is set to the length of the sub-TLV's Value field in 
					  octets. If Headend and Endpoint fields are in IPv4 address format which 
					  is 4 octets long, it MUST be set to 40; If Headend and Endpoint fields 
					  are in IPv6 address format which is 16 octets long, it MUST be set to 64.
                      </t>
              </list>
      </t>
  
      <t>Headend
              <list>
                      <t>This field identifies the headend of an SR Policy, the same as defined 
					  in Section 2.1 of <xref target="I-D.ietf-spring-segment-routing-policy"/>. 
					  The headend is a 4-octet IPv4 address or a 16-octet IPv6 address.
                      </t>
              </list>
      </t>
  
      <t>Color
              <list>
                      <t>This field associates the SR Policy with an intent, the same as defined 
					  in Section 2.1 of <xref target="I-D.ietf-spring-segment-routing-policy"/>.  
					  The color is a 4-octet numerical value.
                      </t>
              </list>
      </t>
  
      <t>Endpoint
              <list>
                      <t>This field identifies the endpoint of an SR Policy, the same as defined 
					  in Section 2.1 of <xref target="I-D.ietf-spring-segment-routing-policy"/>.  
					  The endpoint is a 4-octet IPv4 address or a 16-octet IPv6 address.
                      </t>
              </list>
      </t>
  
      <t>Protocol-Origin
              <list>
                      <t>This field identifies the component or protocol that originates or signals 
					  the candidate path for an SR Policy, the same as defined in Section 2.3 of 
					  <xref target="I-D.ietf-spring-segment-routing-policy"/>.  The protocol-origin 
					  is a 1-octet value that follows the recommendation from Table 1 of Section 2.3 
					  of <xref target="I-D.ietf-spring-segment-routing-policy"/>, which specifies 
					  value 10 for "PCEP", value 20 for "BGP SR Policy" and value 30 for "Via Configuration".
                      </t>
              </list>
      </t>
  
      <t> Originator
              <list>
                      <t>This field identifies the node which provisioned or signaled the candidate 
					  path for an SR Policy, the same as defined in Section 2.4 of 
					  <xref target="I-D.ietf-spring-segment-routing-policy"/>.  The originator is a 
					  20-octet numerical value formed by the concatenation of the fields of the tuple 
					  &lt;ASN, node-address&gt;, among which ASN is a 4-octet number and node address is a 
					  16-octet value (an IPv6 address or an IPv4 address encoded in the lowest 4 octets). 
					  When Procotol-Origin is respectively "Via Configuration", or "PCEP", or "BGP SR Policy", 
					  the values of ASN and node address follow the specification in Section 2.4 of 
					  <xref target="I-D.ietf-spring-segment-routing-policy"/>.
                      </t>
              </list>
      </t>
  
      <t>Discriminator
              <list>
                      <t>This field uniquely identifies a candidate path within the context of an SR policy, 
					  the same as defined in Section 2.5 of <xref target="I-D.ietf-spring-segment-routing-policy"/>.  
					  The discriminator is a 4-octet value. When Protocol-Origin is respectively "Via Configuration", 
					  or "PCEP", or "BGP SR Policy", the value of discriminator follows the specification in Section 
					  2.5 of <xref target="I-D.ietf-spring-segment-routing-policy"/>.
                      </t>
              </list>
      </t>  
  
  </section>
  
  <section title="SR Segment List's Path SID">
  
  <t> The format of SR Segment List's Path SID sub-TLV is as specified below: </t>
  
  <figure anchor="Figure_2" title="SR Segment List's Path SID sub-TLV">
  <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            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~                     Headend  (4/16 octets)                    ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                       Color  (4 octets)                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~                    Endpoint  (4/16 octets)                    ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Protocol-Origin|                    Reserved                   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                                                               |
|                  Originator  (20 octets)                      |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               Discriminator  (4 octets)                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             Segment-List-ID  (4 octets)                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


]]>
  </artwork>
  </figure>
  
      <t>Type
              <list>
                      <t>This field is set to the value (TBD2) which indicates that it's a 
					  SR Segment List's Path SID sub-TLV.
                      </t>
              </list>
      </t>
	  
      <t>Length
              <list>
                      <t>This field is set to the length of the sub-TLV's Value field in 
					  octets. If Headend and Endpoint fields are in IPv4 address format which 
					  is 4 octets long, it MUST be set to 44; If Headend and Endpoint fields 
					  are in IPv6 address format which is 16 octets long, it MUST be set to 68.
                      </t>
              </list>
      </t>
  
      <t>Headend
              <list>
                      <t>This field identifies the headend of an SR Policy, the same as defined 
					  in Section 2.1 of <xref target="I-D.ietf-spring-segment-routing-policy"/>. 
					  The headend is a 4-octet IPv4 address or a 16-octet IPv6 address.
                      </t>
              </list>
      </t>
  
      <t>Color
              <list>
                      <t>This field associates the SR Policy with an intent, the same as defined 
					  in Section 2.1 of <xref target="I-D.ietf-spring-segment-routing-policy"/>.  
					  The color is a 4-octet numerical value.
                      </t>
              </list>
      </t>
  
      <t>Endpoint
              <list>
                      <t>This field identifies the endpoint of an SR Policy, the same as defined 
					  in Section 2.1 of <xref target="I-D.ietf-spring-segment-routing-policy"/>.  
					  The endpoint is a 4-octet IPv4 address or a 16-octet IPv6 address.
                      </t>
              </list>
      </t>
  
      <t>Protocol-Origin
              <list>
                      <t>This field identifies the component or protocol that originates or signals 
					  the candidate path for an SR Policy, the same as defined in Section 2.3 of 
					  <xref target="I-D.ietf-spring-segment-routing-policy"/>.  The protocol-origin 
					  is a 1-octet value that follows the recommendation from Table 1 of Section 2.3 
					  of <xref target="I-D.ietf-spring-segment-routing-policy"/>, which specifies 
					  value 10 for "PCEP", value 20 for "BGP SR Policy" and value 30 for "Via Configuration".
                      </t>
              </list>
      </t>
  
      <t> Originator
              <list>
                      <t>This field identifies the node which provisioned or signaled the candidate 
					  path for an SR Policy, the same as defined in Section 2.4 of 
					  <xref target="I-D.ietf-spring-segment-routing-policy"/>.  The originator is a 
					  20-octet numerical value formed by the concatenation of the fields of the tuple 
					  &lt;ASN, node-address&gt;, among which ASN is a 4-octet number and node address is a 
					  16-octet value (an IPv6 address or an IPv4 address encoded in the lowest 4 octets). 
					  When Procotol-Origin is respectively "Via Configuration", or "PCEP", or "BGP SR Policy", 
					  the values of ASN and node address follow the specification in Section 2.4 of 
					  <xref target="I-D.ietf-spring-segment-routing-policy"/>.
                      </t>
              </list>
      </t>
  
      <t>Discriminator
              <list>
                      <t>This field uniquely identifies a candidate path within the context of an SR policy, 
					  the same as defined in Section 2.5 of <xref target="I-D.ietf-spring-segment-routing-policy"/>.  
					  The discriminator is a 4-octet value. When Protocol-Origin is respectively "Via Configuration", 
					  or "PCEP", or "BGP SR Policy", the value of discriminator follows the specification in Section 
					  2.5 of <xref target="I-D.ietf-spring-segment-routing-policy"/>.
                      </t>
              </list>
      </t>  
  
      <t>Segment-List-ID
              <list>
                      <t>This field identifies an SR path within the context of a candidate path of an SR Policy, the 
					  same as "List Identifier" defined in Section 2.2 of <xref target="I-D.lp-idr-sr-path-protection"/>. 
					  The segment-list-ID is a 4-octet identifier of the corresponding segment list.
                      </t>
              </list>
      </t>  
	  
  </section>
  
  </section>
  
  <section title="Path-SID FEC Validation">

  <t> The MPLS LSP Ping/Traceroute 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 
  Path-SID, the responder nodes that receive echo request and send echo reply MUST be the endpoint of the 
  Segment Routing path. </t>
  
  <t> When an endpoint receives the LSP echo request packet with top FEC being the Path-SID, it SHOULD perform 
  validity checks on the content of the Path-SID FEC sub-TLV. The basic length check should be performed on the 
  received FEC.</t>
  
  <figure>
  <artwork>
<![CDATA[
    SR Candidate Path's Path SID
    ------------------
    Length = 40 or 64

    SR Segment List's Path SID
    ------------------
    Length = 44 or 68
]]>
  </artwork>
  </figure>
  
  <t> If a malformed FEC sub-TLV is received, then a return code of 1, "Malformed echo request received" as defined 
  in <xref target="RFC8029"/> SHOULD be sent.  The below section augments the section 7.4 of <xref target="RFC8287"/>. </t>
  
  <t>
  <list>
          <t>4a. Segment Routing Path-SID Validation: </t>
          <t>If the Label-stack-depth is 0 and the Target FEC Stack sub-TLV 
		  at FEC-stack-depth is TBD1 (SR Candidate Path's Path SID 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 Path Segment ID is signaled or provisioned for the SR Candidate Path { 
          <list style="symbols">
		  
          <t>When the Protocol-Origin field in the received SR Candidate Path's Path SID sub-TLV is 10, "PCEP" 
		  is used as the signaling protocol. And then validate that the Path Segment ID matches with the tuples 
		  identifying the SR Candidate Path within PCEP { 
          <list style="symbols">
		  
          <t>Validate that the signaled headend defined in <xref target="I-D.ietf-pce-segment-routing-policy-cp"/> and 
		  <xref target="I-D.ietf-pce-sr-path-segment"/>, for the Path SID, matches with the headend field in the received 
		  SR Candidate Path's Path SID sub-TLV. </t>
		  
          <t>Validate that the signaled color defined in <xref target="I-D.ietf-pce-segment-routing-policy-cp"/> and 
		  <xref target="I-D.ietf-pce-sr-path-segment"/>, for the Path SID, matches with the color field in the received 
		  SR Candidate Path's Path SID sub-TLV. </t>
		  
          <t>Validate that the signaled end-point defined in <xref target="I-D.ietf-pce-segment-routing-policy-cp"/> and 
		  <xref target="I-D.ietf-pce-sr-path-segment"/>, for the Path SID, matches with the endpoint field in the received 
		  SR Candidate Path's Path SID sub-TLV. </t>
		  
          <t>Validate that the signaled both originator ASN and originator address defined in 
		  <xref target="I-D.ietf-pce-segment-routing-policy-cp"/> and <xref target="I-D.ietf-pce-sr-path-segment"/>, for the 
		  Path SID, matches with the originator field in the received SR Candidate Path's Path SID sub-TLV. </t>
		  
          <t>Validate that the signaled discriminator defined in <xref target="I-D.ietf-pce-segment-routing-policy-cp"/> and 
		  <xref target="I-D.ietf-pce-sr-path-segment"/>, for the Path SID, matches with the discriminator field in the received 
		  SR Candidate Path's Path SID sub-TLV. </t>	
		  
          </list>	
	      } </t>

		  
          <t>When the Protocol-Origin field in the received SR Candidate Path's Path SID sub-TLV is 20, "BGP SR Policy" 
		  is used as the signaling protocol. And then validate that the Path Segment ID matches with the tuples identifying 
		  the SR Candidate Path within BGP SR Policy {
          <list style="symbols">
		  
          <t>Validate that the signaled headend defined in <xref target="I-D.ietf-idr-segment-routing-te-policy"/> and 
		  <xref target="I-D.ietf-idr-sr-policy-path-segment"/>, for the Path SID, matches with the headend field in the received 
		  SR Candidate Path's Path SID sub-TLV. </t>
		  
          <t>Validate that the signaled policy color defined in <xref target="I-D.ietf-idr-segment-routing-te-policy"/> and 
		  <xref target="I-D.ietf-idr-sr-policy-path-segment"/>, for the Path SID, matches with the color field in the received 
		  SR Candidate Path's Path SID sub-TLV. </t>
		  
          <t>Validate that the signaled endpoint defined in <xref target="I-D.ietf-idr-segment-routing-te-policy"/> and 
		  <xref target="I-D.ietf-idr-sr-policy-path-segment"/>, for the Path SID, matches with the endpoint field in the received 
		  SR Candidate Path's Path SID sub-TLV. </t>
		  
          <t>Validate that the signaled both ASN and BGP Router-ID defined in <xref target="I-D.ietf-idr-segment-routing-te-policy"/> 
		  and <xref target="I-D.ietf-idr-sr-policy-path-segment"/>, for the Path SID, matches with the originator field in the received 
		  SR Candidate Path's Path SID sub-TLV. </t>
		  
          <t>Validate that the signaled distinguisher defined in <xref target="I-D.ietf-idr-segment-routing-te-policy"/> and 
		  <xref target="I-D.ietf-idr-sr-policy-path-segment"/>, for the Path SID, matches with the discriminator field in the received 
		  SR Candidate Path's Path SID sub-TLV. </t>	
	  
          </list>	
		  } </t>
		  
          <t>When the Protocol-Origin field in the received SR Candidate Path's Path SID sub-TLV is 30, "Via Configuration" 
		  is used. And then validate that the Path Segment ID matches with the tuples identifying the SR Candidate Path within 
		  Configuration { 
          <list style="symbols">
		  
          <t>Validate that the provisioned headend defined in <xref target="I-D.ietf-spring-sr-policy-yang"/>, for the Path SID, 
		  matches with the headend field in the received SR Candidate Path's Path SID sub-TLV. </t>
		  
          <t>Validate that the provisioned color defined in <xref target="I-D.ietf-spring-sr-policy-yang"/>, for the Path SID, 
		  matches with the color field in the received SR Candidate Path's Path SID sub-TLV. </t>
		  
          <t>Validate that the provisioned endpoint defined in <xref target="I-D.ietf-spring-sr-policy-yang"/>, for the Path SID, 
		  matches with the endpoint field in the received SR Candidate Path's Path SID sub-TLV. </t>
		  
          <t>Validate that the provisioned originator defined in <xref target="I-D.ietf-spring-sr-policy-yang"/>, for the Path SID, 
		  matches with the originator field in the received SR Candidate Path's Path SID sub-TLV. </t>
		  
          <t>Validate that the provisioned discriminator defined in <xref target="I-D.ietf-spring-sr-policy-yang"/>, for the Path SID, 
		  matches with the discriminator field in the received SR Candidate Path's Path SID sub-TLV. </t>	
		  		  
          </list>	
          } </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 0 and the Target FEC Stack sub-TLV
         at FEC-stack-depth is TBD2 (SR Segment List's Path SID 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 Path Segment ID is signaled or provisioned for the SR Segment List { 
          <list style="symbols">
		  
          <t>When the Protocol-Origin field in the received SR Segment List's Path SID sub-TLV is 10, "PCEP" 
		  is used as the signaling protocol. And then validate that the Path Segment ID matches with the tuples 
		  identifying the SR Segment List within PCEP { 
          <list style="symbols">
		  
          <t>Validate that the signaled headend defined in <xref target="I-D.ietf-pce-segment-routing-policy-cp"/> and 
		  <xref target="I-D.ietf-pce-sr-path-segment"/>, for the Path SID, matches with the headend field in the received 
		  SR Segment List's Path SID sub-TLV. </t>
		  
          <t>Validate that the signaled color defined in <xref target="I-D.ietf-pce-segment-routing-policy-cp"/> and 
		  <xref target="I-D.ietf-pce-sr-path-segment"/>, for the Path SID, matches with the color field in the received 
		  SR Segment List's Path SID sub-TLV. </t>
		  
          <t>Validate that the signaled end-point defined in <xref target="I-D.ietf-pce-segment-routing-policy-cp"/> and 
		  <xref target="I-D.ietf-pce-sr-path-segment"/>, for the Path SID, matches with the endpoint field in the received 
		  SR Segment List's Path SID sub-TLV. </t>
		  
          <t>Validate that the signaled both originator ASN and originator address defined in 
		  <xref target="I-D.ietf-pce-segment-routing-policy-cp"/> and <xref target="I-D.ietf-pce-sr-path-segment"/>, for the 
		  Path SID, matches with the originator field in the received SR Segment List's Path SID sub-TLV. </t>
		  
          <t>Validate that the signaled discriminator defined in <xref target="I-D.ietf-pce-segment-routing-policy-cp"/> and 
		  <xref target="I-D.ietf-pce-sr-path-segment"/>, for the Path SID, matches with the discriminator field in the received 
		  SR Segment List's Path SID sub-TLV. </t>	
		  
          <t>Validate that the signaled Segment-List-ID by PCEP, for the Path SID, matches with the Segment-List-ID field 
		  in the received SR Segment List's Path SID sub-TLV. </t>	
		  
          </list>	
          } </t>		  
		  
          <t>When the Protocol-Origin field in the received SR Segment List's Path SID sub-TLV is 20, "BGP SR Policy" 
		  is used as the signaling protocol. And then validate that the Path Segment ID matches with the tuples identifying 
		  the SR Segment List within BGP SR Policy {
          <list>
		  
          <t>Validate that the signaled headend defined in <xref target="I-D.ietf-idr-segment-routing-te-policy"/> and 
		  <xref target="I-D.ietf-idr-sr-policy-path-segment"/>, for the Path SID, matches with the headend field in the received 
		  SR Segment List's Path SID sub-TLV. </t>
		  
          <t>Validate that the signaled policy color defined in <xref target="I-D.ietf-idr-segment-routing-te-policy"/> and 
		  <xref target="I-D.ietf-idr-sr-policy-path-segment"/>, for the Path SID, matches with the color field in the received 
		  SR Segment List's Path SID sub-TLV. </t>
		  
          <t>Validate that the signaled endpoint defined in <xref target="I-D.ietf-idr-segment-routing-te-policy"/> and 
		  <xref target="I-D.ietf-idr-sr-policy-path-segment"/>, for the Path SID, matches with the endpoint field in the received 
		  SR Segment List's Path SID sub-TLV. </t>
		  
          <t>Validate that the signaled both ASN and BGP Router-ID defined in <xref target="I-D.ietf-idr-segment-routing-te-policy"/> and 
		  <xref target="I-D.ietf-idr-sr-policy-path-segment"/>, for the Path SID, matches with the originator field in the received 
		  SR Segment List's Path SID sub-TLV. </t>
		  
          <t>Validate that the signaled distinguisher defined in <xref target="I-D.ietf-idr-segment-routing-te-policy"/> and 
		  <xref target="I-D.ietf-idr-sr-policy-path-segment"/>, for the Path SID, matches with the discriminator field in the received 
		  SR Segment List's Path SID sub-TLV. </t>	
		  
          <t>Validate that the signaled List Identifier defined in <xref target="I-D.lp-idr-sr-path-protection"/>, for the Path SID, 
		  matches with the Segment-List-ID field in the received SR Segment List's Path SID sub-TLV. </t>	
		  
          </list>	
          } </t>		  
		  
          <t>When the Protocol-Origin field in the received SR Segment List's Path SID sub-TLV is 30, "Via Configuration" 
		  is used. And then validate that the Path Segment ID matches with the tuples identifying the SR Segment List within 
		  Configuration { 
          <list style="symbols">
		  
          <t>Validate that the provisioned headend defined in <xref target="I-D.ietf-spring-sr-policy-yang"/>, for the Path SID, 
		  matches with the headend field in the received SR Segment List's Path SID sub-TLV. </t>
		  
          <t>Validate that the provisioned color defined in <xref target="I-D.ietf-spring-sr-policy-yang"/>, for the Path SID, 
		  matches with the color field in the received SR Segment List's Path SID sub-TLV. </t>
		  
          <t>Validate that the provisioned endpoint defined in <xref target="I-D.ietf-spring-sr-policy-yang"/>, for the Path SID, 
		  matches with the endpoint field in the received SR Segment List's Path SID sub-TLV. </t>
		  
          <t>Validate that the provisioned originator defined in <xref target="I-D.ietf-spring-sr-policy-yang"/>, for the Path SID, 
		  matches with the originator field in the received SR Segment List's Path SID sub-TLV. </t>
		  
          <t>Validate that the provisioned discriminator defined in <xref target="I-D.ietf-spring-sr-policy-yang"/>, for the Path SID, 
		  matches with the discriminator field in the received SR Segment List's Path SID sub-TLV. </t>	
		  
          <t>Validate that the provisioned Segment-List-ID through Yang Model, for the Path SID, matches with the Segment-List-ID field 
		  in the received SR Segment List's Path SID sub-TLV. </t>	

          </list>	
          } </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>
		  
  </list>
  </t> 

  </section>
  
  <section title="Security Considerations">
  
  <t> This document does not raise any additional security issues beyond those of the specifications referred to in the 
  list of normative references.</t>
  
  </section>
  
  <section title="IANA Considerations"> 
  
  <t> IANA is requested to assign two new sub-TLVs from the "sub-TLVs for TLV Types 1, 16, and 21" subregistry of the 
  "Multi-Protocol Label Switching (MPLS) Label Switched Paths (LSPs) Ping Parameters" registry <xref target="IANA" />. </t>
  
  <figure>
  <artwork>
<![CDATA[
  Sub-Type   Sub-TLV Name                    Reference
  --------   -----------------------------   ------------
   TBD1      SR Candidate Path's Path SID    Section 3.1
   TBD2      SR Segment List's Path SID      Section 3.2
]]>
  </artwork>
  </figure>
  
  </section>

  <section title="Acknowledgements">
  <t> The authors would like to acknowledge Zhao Detao for his thorough review and very helpful comments. </t>
  </section>  
  
</middle>
  
<back>

    <references title="Normative References">
	 &rfc8287;
	 &rfc8690;
	 &rfc2119;
     &rfc8174;
	 &rfc8029;
	 &I-D.ietf-spring-mpls-path-segment;
    </references>
    <references title="Informative References">
	 &rfc8402;
	 &rfc8403;
	 &I-D.ietf-mpls-sr-epe-oam;
	 &I-D.ietf-spring-segment-routing-policy;
	 &I-D.lp-idr-sr-path-protection;
	 &I-D.ietf-idr-sr-policy-path-segment;
	 &I-D.ietf-pce-segment-routing-policy-cp;
	 &I-D.ietf-pce-sr-path-segment;
	 &I-D.ietf-idr-segment-routing-te-policy;
	 &I-D.ietf-spring-sr-policy-yang;
     <reference anchor="IANA" 
     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><organization>Internet Assigned Numbers Authority (IANA)</organization></author>
     <date/>
     </front>
     </reference>
    </references>
	
</back>
</rfc>
