<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>

<rfc category='std' ipr='trust200902' docName='draft-ietf-mpls-spring-lsp-ping-01'>

<front>
<title abbrev="LSP Ping/Trace for SR on MPLS">Label Switched Path (LSP) Ping/Trace for Segment Routing Networks Using MPLS Dataplane</title>

<author initials="N." surname="Kumar" fullname="Nagendra Kumar">
	<organization>Cisco Systems, Inc.</organization>
	<address>
		<postal>
		<street>7200 Kit Creek Road</street>
		<city>Research Triangle Park</city> <region>NC</region> <code>27709</code>
		<country>US</country>
		</postal>
	<email>naikumar@cisco.com</email>
	</address>
</author>

<author initials="G." surname="Swallow" fullname="George Swallow">
	<organization>Cisco Systems, Inc.</organization>
	<address>
		<postal>
		<street>1414 Massachusetts Ave</street>
		<city>Boxborough</city> <region>MA</region> <code>01719</code>
		<country>US</country>
		</postal>
	<email>swallow@cisco.com</email>
	</address>
</author>

<author initials="C." surname="Pignataro" fullname="Carlos Pignataro">
	<organization>Cisco Systems, Inc.</organization>
	<address>
		<postal>
		<street>7200 Kit Creek Road</street>
		<city>Research Triangle Park</city> <region>NC</region> <code>27709-4987</code>
		<country>US</country>
		</postal>
	<email>cpignata@cisco.com</email>
	</address>
</author>

<author initials="N." surname="Akiya" fullname="Nobo Akiya">
	<organization>Big Switch Networks</organization>
	<address>
		<postal>
		<street></street>
		<city></city> <region></region> <code></code>
		<country></country>
		</postal>
	<email>nobo.akiya.dev@gmail.com</email>
	</address>
</author>
<author initials="S." surname="Kini" fullname="Sriganesh Kini">
	<organization>Individual</organization>
	<address>
		<postal>
		<street></street>
		<city></city> <region></region> <code></code>
		<country></country>
		</postal>
	<email>sriganeshkini@gmail.com</email>
	</address>
</author>
<author initials="H." surname="Gredler" fullname="Hannes Gredler">
	<organization>Juniper Networks</organization>
	<address>
		<postal>
		<street></street>
		<city></city> <region></region> <code></code>
		<country></country>
		</postal>
	<email>hannes@juniper.net</email>
	</address>
</author>
<author fullname="Mach(Guoyi) Chen" initials="M." surname="Chen">
      <organization>Huawei</organization>
 
      <address>
        <postal>
          <street/>
 
          <city/>
 
          <region/>
 
          <code/>
 
          <country/>
        </postal>
 
        <email>mach.chen@huawei.com</email>
      </address>
    </author>
    
<date/>
<area>Internet</area>
<workgroup>Network Work group</workgroup>

<keyword>mpls</keyword>

<abstract><t>Segment Routing architecture leverages the source routing and tunneling paradigms and
            can be directly applied to MPLS data plane. A node steers a packet through a 
controlled set of instructions called segments, by prepending the packet with a Segment
Routing header. </t>
<t> The segment assignment and forwarding semantic nature of 
Segment Routing raises additional consideration for connectivity verification and
fault isolation in LSP with Segment Routing architecture. This document illustrates the problem and 
describe a mechanism to perform LSP Ping and Traceroute on Segment Routing network over MPLS data plane.
</t>
</abstract>
</front>

<middle>
	
<section title="Introduction">
					<t><xref target="I-D.ietf-spring-segment-routing" /> introduces and explains 
		Segment Routing architecture
		that leverages the source routing and tunneling paradigms. A node steers a packet through a 
		controlled set of instructions called segments, by prepending the packet with Segment Routing header. A
		detailed definition about Segment Routing architecture is available in 
		<xref target="I-D.ietf-spring-segment-routing" /></t>
		<t>As defined in <xref target="I-D.ietf-spring-segment-routing-mpls" />, 
		the Segment Routing architecture can be directly applied to MPLS data plane in a way that, the Segment
		identifier (Segment ID) will be of 20-bits size and Segment Routing header is the label stack. </t>
		
		<t>"Detecting Multi-Protocol Label Switched (MPLS) Data Plane Failures"
		<xref target="RFC4379" /> defines a simple and efficient 
		mechanism to detect data plane failures in Label Switched Paths (LSP) by specifying 
		information to be carried in an MPLS "echo request" and "echo reply" for the purposes
		of fault detection and isolation. Mechanisms for reliably sending the echo reply are defined.
		 The functionality defined in <xref target="RFC4379" />is modeled after the ping/traceroute 
		 paradigm (ICMP echo request <xref target="RFC0792" />) and is typically referred 
		 to as LSP ping and LSP traceroute. <xref target="RFC6424" /> updates <xref target="RFC4379" />
		 to support hierarchal and stitching LSPs.
		</t>
		
		<t>Unlike LDP or RSVP which are the other
		well-known MPLS control plane protocols, segment assignment in Segment Routing architecture
		 is not hop-by-hop basis.</t>
		<t>This nature of Segment Routing raises additional consideration for fault detection and
		 isolation in Segment Routing network. This document illustrates the problem and 
		describe a mechanism to perform LSP Ping and Traceroute on Segment Routing network over MPLS data plane.
		</t>
					
	    </section>
	 
    <section title="Requirements notation">
					<t>
					The key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
					"SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY",
					and "OPTIONAL" in this document are to be interpreted as
					described in <xref target="RFC2119"/>.
					</t>
    </section>
    
    <section title="Terminology">
    	<t>This document uses the terminologies defined in <xref target="I-D.ietf-spring-segment-routing" />,
    	<xref target="RFC4379" />, 
    	and so the readers are expected to be familiar with the same.
    	</t>
    </section>
    
<section title="Challenges with Existing mechanism">
<t>This document defines sub-TLVs for the Target FEC Stack TLV and explains how they can 
be used to tackle below challenges.
</t>
	<section title="Path validation in Segment Routing networks">
	<t><xref target="RFC4379" /> defines the OAM machinery that helps with fault detection and
	 isolation in MPLS dataplane path with the use of various Target FEC 
	Stack Sub-TLV that are carried in MPLS Echo Request packets and used by the responder for 
	FEC validation. While it is obvious that new Sub-TLVs need to be assigned, the 
	unique nature of Segment Routing architecture raises a need for additional machinery for 
	path validation. This section discuss the challenges as below:
	</t>
					<figure>
						<artwork><![CDATA[
				
                      L1
                  +--------+
                  |   L2   |
                  R3-------R6
                 /           \
                /             \
        R1----R2               R7----R8
                \             /  
                 \           /
                  R4-------R5

          Figure 1: Segment Routing network

 The Node segment IDs for R1, R2, R3, R4, R5, R6, R7 and R8 are 5001, 5002, 5003, 5004, 5005, 5006, 5007, 5008 respectively.
 
    9136 --> Adjacency Segment ID from R3 to R6 over link L1.
    9236 --> Adjacency Segment ID from R3 to R6 over link L2.
    9124 --> Adjacency segment ID from R2 to R4.
    9123 --> Adjacency Segment ID from R2 to R3.

			]]></artwork>
					</figure>
<t>The forwarding semantic of Adjacency Segment ID is to pop the segment ID and send the packet to 
a specific neighbor over a specific link. A malfunctioning node may forward packets using 
Adjacency Segment ID to incorrect neighbor or over incorrect link. Exposed segment ID (after 
incorrectly forwarded Adjacency Segment ID) might still allow such packet to reach the 
intended destination, although the intended strict traversal has been broken.</t>

<t>Assume in above topology, R1 sends traffic with segment stack as {9124, 5008} so that the path taken 
will be R1-R2-R4-R5-R7-R8. If the Adjacency Segment ID 9124 is misprogrammed in R2 to send the packet to R1 or R3, 
it will still be delivered to R8 but is not via the expected path. 
</t>

<t>MPLS traceroute may help with detecting such deviation in above mentioned scenario. However, in a different example, it may not be 
helpful. For example if R3, due to misprogramming, forwards packet with Adjacency Segment ID 9236 via link L1 while it is expected
to be forwarded over Link L2.
</t>
</section>

<section title="Service Label">
<t>A Segment ID can represent a service based instruction. An Segment Routing header can have label stack entries where
the label represents a service to be applied along the path. Since these labels
 are part of the label stack, they can influence the path taken by a packet and consequently
 have implications on MPLS OAM. Service Label is left for future study.
</t>
</section>
</section>

<section title="Segment ID sub-TLV">
<t>The format of the following Segment ID sub-TLVs follows the philosophy of Target FEC Stack
   TLV carrying FECs corresponding to each label in the label stack.
   When operated with the procedures defined in <xref target="RFC4379" />, this allows LSP
   ping/traceroute operations to function when Target FEC Stack TLV
   contains more FECs than received label stack at responder nodes.</t>
   
<t>Three new sub-TLVs are defined for Target FEC Stack TLVs (Type 1), 
Reverse-Path Target FEC Stack TLV (Type 16) and Reply Path TLV (Type 21).
</t>
<figure>
	<artwork><![CDATA[
	sub-Type    Value Field
	--------  ---------------
	 34      IPv4 IGP-Prefix Segment ID
	 35      IPv6 IGP-Prefix Segment ID
	 36      IGP-Adjacency Segment ID
	
											]]></artwork>
										</figure>
		<t>Service Segments and FRR will be considered in future version.</t>
	<section title="IPv4 IGP-Prefix Segment ID">
	<t>The format is as below:</t>
	
	<figure>
						<artwork><![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
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                         IPv4 Prefix                           |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |Prefix Length  |    Protocol   |         Reserved              |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               

  
	  ]]></artwork>
					</figure>
					
		<t>IPv4 Prefix
			<list><t>This field carries the IPv4 prefix to which the Segment 
			ID is assigned. In case of Anycast Segment ID, this field will
			carry IPv4 Anycast address. If the prefix is shorter than 32 bits, trailing bits
			SHOULD be set to zero.</t>
			</list>
		</t>		
		<t>Prefix Length
			<list><t>The Prefix Length field is one octet, it gives the length of
			the prefix in bits (values can be 1 - 32).</t>
			</list>
		</t>
		<t>Protocol
			<list><t>Set to 1 if the IGP protocol is OSPF and 2 if IGP protocol is ISIS.
			</t>
			</list>
		</t>
	</section>
	
	<section title="IPv6 IGP-Prefix Segment ID">
	<t>The format is as below:</t>
	
	<figure>
						<artwork><![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
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                                                               |
  |                         IPv6 Prefix                           |
  |                                                               |
  |                                                               |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |Prefix Length  |    Protocol   |              Reserved         |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  

	  ]]></artwork>
					</figure>
					
		<t>IPv6 Prefix
			<list><t>This field carries the IPv6 prefix to which the Segment 
			ID is assigned. In case of Anycast Segment ID, this field will
			carry IPv4 Anycast address. If the prefix is shorter than 128 bits, trailing
			bits SHOULD be set to zero.</t>
			</list>
		</t>		
		<t>Prefix Length
			<list><t>The Prefix Length field is one octet, it gives the length of
			the prefix in bits (values can be 1 - 128).</t>
			</list>
		</t>
		<t>Protocol
			<list><t>Set to 1 if the IGP protocol is OSPF and 2 if IGP protocol is ISIS.
			</t>
			</list>
		</t>
	</section>
	<section title="IGP-Adjacency Segment ID">
	<t>The format is as below:
	</t>
	<figure>
						<artwork><![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
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |   Adj. Type   |    Protocol   |          Reserved             |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                Local Interface ID (4 or 16 octets)            |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                Remote Interface ID (4 or 16 octets)           |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  ~                                                               ~
  |          Advertising Node Identifier (4 or 6 octets)          |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  ~                                                               ~
  |             Receiving Node Identifier (4 or 6 octets)         |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
	  ]]></artwork>
					</figure>
					
		<t>Adj. Type (Adjacency Type)
			<list><t>Set to 1, when the Adjacency Segment is Parallel Adjacency as defined in
			section 3.5.1 of <xref target="I-D.ietf-spring-segment-routing" />. Set to 4,
			when the Adjacency segment is IPv4 based and is not a parallel adjacency. Set to 
			6, when the Adjacency segment is IPv6 based and is not a parallel adjacency.</t>
			</list>
		</t>
		
		<t>Protocol
			<list><t>Set to 1 if the IGP protocol is OSPF and 2 if IGP protocol is ISIS
			</t>
			</list>
		</t>
		
		<t>Local Interface ID
			<list><t>An identifier that is assigned by local LSR for a link on which Adjacency 
			Segment ID is bound. This field is set to local link address (IPv4 or IPv6). 
			Incase of unnumbered, 32 bit link identifier defined in <xref target="RFC4203" />, 
			<xref target="RFC5307" /> is used.
			If the Adjacency Segment ID represents parallel adjacencies (Section 
			3.5.1 of <xref target="I-D.ietf-spring-segment-routing" />) this field MUST be set 
			to zero.
			</t>
			</list>
		</t>
		<t>Remote Interface ID
			<list><t>An identifier that is assigned by remote LSR for a link on which Adjacency
			Segment ID is bound. This field is set to remote (downstream neighbor)
			link address (IPv4 or IPv6).
			In case of unnumbered, 32 bit link identifier defined in <xref target="RFC4203" />,
			<xref target="RFC5307" /> is used.
			If the Adjacency Segment ID represents parallel adjacencies (Section 
			3.5.1 of <xref target="I-D.ietf-spring-segment-routing" />) this field MUST be set 
			to zero.</t>
			</list>
		</t>		
		
		<t>Advertising Node Identifier
			<list><t>Specifies the advertising node identifier. When Protocol is set to 1, 
			then the 32 rightmost bits represent OSPF Router ID and if protocol is set to 
			2, this field carries 48 bit ISIS System ID.</t>
			</list>
		</t>
		
		<t>Receiving Node Identifier
			<list><t>Specifies the downstream node identifier. When Protocol is set to 1, 
			then the 32 rightmost bits represent OSPF Router ID and if protocol is set to 
			2, this field carries 48 bit ISIS System ID.</t>
			</list>
		</t>
		
</section>
</section>


<section title="Extension to Downstream Mapping TLV">
<t>In an echo reply, the Downstream Mapping TLV [RFC4379] is used to
   report for each interface over which a FEC could be forwarded.  For
   a FEC, there are multiple protocols that may be used to distribute
   label mapping.  The "Protocol" field of the Downstream Mapping TLV is
   used to return the protocol that is used to distribute a specific a
   label.  The following protocols are defined in section 3.2 of
   [RFC4379]:
</t>
    <figure>
			<artwork><![CDATA[
   Protocol #        Signaling Protocol
   ----------        ------------------
            0        Unknown
            1        Static
            2        BGP
            3        LDP
            4        RSVP-TE
					  ]]></artwork>
		</figure>
<t>With segment routing, OSPF or ISIS can be used for label
   distribution, this document adds two new protocols as follows:
</t>
    <figure>
			<artwork><![CDATA[
   Protocol #        Signaling Protocol
   ----------        ------------------
       TBD5                  OSPF
       TBD6                  ISIS
					  ]]></artwork>
		</figure>

</section>
<section title="Procedures">
<t>This section describes aspects of LSP Ping and traceroute operations that require further considerations beyond <xref target="RFC4379" />.</t>

<section title="FECs in Target FEC Stack TLV">

<t>When LSP echo request packets are generated by an initiator, FECs carried in Target FEC Stack TLV may need to have deviating contents. This document outlines expected Target FEC Stack TLV construction mechanics by initiator for known scenarios.

<list>
    <t>Ping
    <list>
        <t>Initiator MUST include FEC(s) corresponding to the destination segment.</t>
        <t>Initiator MAY include FECs corresponding to some or all of segments imposed in the label stack by the initiator to communicate the segments traversed.</t>
    </list>
    </t>
    <t>Traceroute
    <list>
        <t>Initiator MUST initially include FECs corresponding to all of segments imposed in the label stack.</t>
        <t>When a received echo reply contains FEC Stack Change TLV with one or more of original segment(s) being popped, initiator MAY remove corresponding FEC(s) from Target FEC Stack TLV in the next (TTL+1) traceroute request as defined in section 4.3.1.2 of <xref target="RFC6424" />.</t>
        <t>When a received echo reply does not contain FEC Stack Change TLV, initiator MUST NOT attempt to remove FEC(s) from Target FEC Stack TLV in the next (TTL+1) traceroute request. </t>
    </list>
    </t>
</list>
</t>

</section>

<section title="FEC Stack Change sub-TLV">

<t>Section 3.3.1.3 of <xref target="RFC6424" /> defines FEC Stack Change sub-TLV that a router must include when the FEC stack changes.</t>

<t>The network node which advertised the Node Segment ID is responsible for generating FEC Stack Change sub-TLV of &amp;pop&amp; operation for Node Segment ID, regardless of if PHP is enabled or not.</t>

<t>The network node that is immediate downstream of the node which advertised the Adjacency Segment ID is responsible for generating FEC Stack Change sub-TLV of &amp;pop&amp; operation for Adjacency Segment ID.</t>

</section>

<section title="Segment ID POP Operation">

<t>The forwarding semantic of Node Segment ID with PHP flag is equivalent to usage of implicit Null in MPLS protocols.
 Adjacency Segment ID is also similar in a sense that it can be thought as next hop 
destined locally allocated segment that has PHP enabled. Procedures described in Section 4.4 of 
<xref target="RFC4379" /> relies on Stack-D and Stack-R explicitly having Implicit Null value. It may simplify 
implementations to reuse Implicit Null for Node Segment ID PHP and Adjacency Segment ID cases.</t>

</section>

<section title="Segment ID Check">
<t>This section updates the procedure defined in Step 6 of section 4.4. of <xref target="RFC4379" />
</t>
<t>
<list>
<t>If the Label-stack-depth is 0 and Target FEC Stack Sub-TLV at FEC-stack-depth is 34 (IPv4 IGP-Prefix Segment ID), the responder should set 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:
</t>
 <t>/* The responder LSR is to check if it is the egress of the IPv4 IGP-Prefix Segment ID described in the Target FEC Stack Sub-TLV, and if the FEC was advertised with the PHP bit set.*/</t>

<t>
    <list style="symbols">
    <t>Validate that Node Segment ID is advertised for IPv4 Prefix.</t>
    <t>Validate that Node Segment ID is advertised with No-PHP flag {
    	<list style="symbols">
    		<t>When Protocol is OSPF, NP-flag defined in Section 5 of <xref target="I-D.ietf-ospf-segment-routing-extensions" /> should be set to 0.</t>
    		<t>When Protocol is ISIS, P-Flag defined in Section 2.1 of <xref target="I-D.ietf-isis-segment-routing-extensions" /> should be set to 0.</t>
    </list> 
    </t>
    <t>}</t>
    </list>
</t>

<t>If the Label-stack-depth is more than 0 and Target FEC Stack Sub-TLV at FEC-stack-depth is 34 (IPv4 IGP-Prefix Segment ID), the responder is to set Best return code to 10 if any below conditions fail:

    <list style="symbols">
    <t>Validate that Node Segment ID is advertised for IPv4 Prefix.</t>
    </list>
</t>

<t>If the Label-stack-depth is 0 and Target FEC Sub-TLV at FEC-stack-depth is 35 (IPv6 IGP-Prefix Segment ID), set Best return code to 10 if any below conditions fail:
</t>
 <t>/* The LSR needs to check if its being a tail-end for the LSP and have the prefix advertised with PHP bit set*/</t>

<t>
    <list style="symbols">
    <t>Validate that Node Segment ID is advertised for IPv6 Prefix.</t>
    <t>Validate that Node Segment ID is advertised of PHP bit.</t>
    </list>
</t>

<t>If the Label-stack-depth is more than 0 and Target FEC Sub-TLV at FEC-stack-depth is 35 (IPv6 IGP-Prefix Segment ID), set Best return code to 10 if any below conditions fail:
    <list style="symbols">
    <t>Validate that Node Segment ID is advertised for IPv6 Prefix.</t>
    </list>
</t>

<t>If the Label-stack-depth is 0 and Target FEC sub-TLV at FEC-stack-depth is 36 (Adjacency Segment ID), set Best return code to (error code TBD) if any below conditions fail:
    <list><t>When the Adj. Type is 1 (Parallel Adjacency):
    	<list style="symbols">
    		<t>Validate that Receiving Node Identifier is local IGP identifier.</t>
    		<t>Validate that Adjacency Segment ID is advertised by Advertising Node Identifier of Protocol in local IGP database.</t>
    	</list></t>
    </list>
    
    <list><t>When the Adj. Type is 4 or 6:
    	<list style="symbols">
    		<t>Validate that Remote Interface ID matches the local identifier of the interface (Interface-I) on which the packet was received.</t>
    		<t>Validate that Receiving Node Identifier is local IGP identifier.</t>
    		<t>Validate that IGP-Adjacency Segment ID is advertised by Advertising Node Identifier of Protocol in local IGP database.</t>
    	</list></t>
    </list>
    
</t>    
</list> 
</t>

</section>

	<section title="TTL Consideration for traceroute">
	<t>LSP Traceroute operation can properly traverse every hop of Segment 
Routing network in Uniform Model described in <xref target="RFC3443" />. If one or 
more LSRs employ Short Pipe Model described in <xref target="RFC3443" />, then LSP 
Traceroute may not be able to properly traverse every hop of Segment 
Routing network due to absence of TTL copy operation when outer label 
is popped. Short Pipe being the most commonly used model. The following TTL manipulation technique MAY 
be used when Short Pipe model is used.
	</t>
	
	<t>When tracing a LSP according to the procedures in <xref target="RFC4379" /> the TTL
   is incremented by one in order to trace the path sequentially along
   the LSP.  However when a source routed LSP has to be traced there are
   as many TTLs as there are labels in the stack.  The LSR that
   initiates the traceroute SHOULD start by setting the TTL to 1 for the
   tunnel in the LSP's label stack it wants to start the tracing from,
   the TTL of all outer labels in the stack to the max value, and the
   TTL of all the inner labels in the stack to zero.  Thus a typical
   start to the traceroute would have a TTL of 1 for the outermost label
   and all the inner labels would have TTL 0.  If the FEC Stack TLV is
   included it should contain only those for the inner stacked tunnels.
   The Return Code/Subcode and FEC Stack Change TLV should be
   used to diagnose the tunnel as described in <xref target="RFC4379" /> and 
   <xref target="RFC6424" />.  When the
   tracing of a tunnel in the stack is complete, then the next tunnel in
   the stack should be traced.  The end of a tunnel can be detected from
   the "Return Code" when it indicates that the responding LSR is an
   egress for the stack at depth 1.  Thus the traceroute procedures in
   <xref target="RFC4379" /> can be recursively applied to traceroute a source routed
   LSP.
	</t>
	</section>
</section>

<section title="Issues with non-forwarding labels">
<t>Source stacking can be optionally used to apply services on the
   packet at a LSR along the path, where a label in the stack is used to
   trigger service application.  A data plane failure detection and
   isolation mechanism should provide its functionality without applying
   these services.  This is mandatory for services that are stateful,
   though for stateless services <xref target="RFC4379" /> could be used as-is.  It MAY
   also provide a mechanism to detect and isolate faults within the
   service function itself.</t>

   <t>How a node treats Service label is outside the scope of this document and will
   be included in this or a different document later.
</t>

</section>

<section title="Backward Compatibility with non Segment Routing devices">
	<t><xref target="I-D.ietf-spring-segment-routing-ldp-interop" /> describes how 
	Segment Routing operates in network where SR-capable and non-SR-capable nodes
	coexist. In such networks, there may not be any FEC mapping in the responder
	 when the Initiator is SR-capable while the responder is not (or vice-versa). But this is 
	 not different from RSVP and LDP interop scenarios. When LSP Ping is triggered, the responder
	  will set the FEC-return-code to Return 4, "Replying router has no mapping for the FEC at 
	 stack-depth".  
	</t>
	
	<t>Similarly when SR-capable node assigns Adj-SID for non-SR-capable node, LSP trace may
	fail as the non-SR-capable node is not aware of "IGP Adjacency Segment ID" sub-TLV and
	may not reply with FEC Stack change. This may result in any further downstream nodes
	to reply back with Return-code as 4, "Replying router has no mapping for the FEC at 
	 stack-depth".
	</t>
</section>

		<section title="IANA Considerations">
			<section title="New Target FEC Stack Sub-TLVs">
			<t> IANA is requested to assign 3 new Sub-TLVs from "Sub-TLVs for TLV Types 1,
			16 and 21" sub-registry.
			</t>
			<figure>
			<artwork><![CDATA[
     Sub-Type          Sub-TLV Name             Reference
   ----------        -----------------         ------------
      34        IPv4 IGP-Prefix Segment ID  Section 4.1 (this document)
      35        IPv6 IGP-Prefix Segment ID  Section 4.2 (this document)
      36        IGP-Adjacency Segment ID    Section 4.3 (this document)
				  ]]></artwork>
		</figure>
			</section>
		</section>
        <section title="Security Considerations">
		<t>This document defines additional Sub-TLVs and follows the mechanism defined
		in <xref target="RFC4379" />. So all the security consideration defined in
		<xref target="RFC4379" /> will be applicable for this document and in addition
		it does not impose any security challenges to be considered.</t>
		</section>
		<section title="Acknowledgement">
					<t> The authors would like to thank Stefano Previdi, Les Ginsberg,
					Balaji Rajagopalan, Harish Sitaraman, Curtis Villamizar, Pranjal Dutta and 
					Lizhong Jin for their review and comments.</t>
					<t> The authors wold like to thank Loa Andersson for his comments and
					recommendation to merge drafts.</t>
		</section>
	
	<section title="Contributing Authors">

    <t>Tarek Saad
    <vspace blankLines="0" />
	Cisco Systems
    <vspace blankLines="0" />
    Email: tsaad@cisco.com</t>

	<t>Siva Sivabalan
    <vspace blankLines="0" />
	Cisco Systems
    <vspace blankLines="0" />
    Email: msiva@cisco.com</t>
    
    <t>Balaji Rajagopalan
    <vspace blankLines="0" />
	Juniper Networks
    <vspace blankLines="0" />
    Email: balajir@juniper.net</t>
    
    <t>Faisal Iqbal
    <vspace blankLines="0" />
	Cisco Systems
    <vspace blankLines="0" />
    Email: faiqbal@cisco.com</t>

    </section>
    </middle>
	
<back>

    <references title="Normative References">
	
	<?rfc include="reference.RFC.2119"?>
	
	<?rfc include="reference.I-D.ietf-spring-segment-routing"?>
	
	<?rfc include="reference.I-D.ietf-spring-segment-routing-mpls"?>
	
	<?rfc include="reference.I-D.ietf-ospf-segment-routing-extensions"?>
	
	<?rfc include="reference.I-D.ietf-isis-segment-routing-extensions"?>
	
	<?rfc include="reference.I-D.ietf-spring-segment-routing-ldp-interop"?>
		
	<?rfc include="reference.RFC.4379"?>
	
    <?rfc include="reference.RFC.6424"?>
    
    <?rfc include="reference.RFC.0792"?>
    
    <?rfc include="reference.RFC.3443"?>
    
    <?rfc include="reference.RFC.4203"?>
    
    <?rfc include="reference.RFC.5307"?>

	  
    </references>
    
    <references title="Informative References">

    <?rfc include="reference.RFC.6425"?>
    
    <?rfc include="reference.RFC.6291"?>
    

    </references>


		</back>

</rfc>
