<?xml version="1.0"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC8287 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8287.xml">
<!ENTITY RFC8029 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8029.xml">
<!ENTITY RFC3443 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3443.xml">
<!ENTITY RFC5226 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5226.xml">
<!ENTITY RFC8402 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8402.xml">
]>
<?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" docName="draft-rathi-mpls-egress-tlv-for-nil-fec-00"
 ipr="trust200902">
<front>
  <title abbrev="Egress TLV for Nil FEC ">
  Egress TLV for Nil FEC in Label Switched Path Ping and Traceroute Mechanisms
  </title>

  <author initials="D." surname="Rathi" fullname="Deepti N. Rathi">
    <organization>Juniper Networks Inc.</organization>
    <address>
      <postal>
        <street>Exora Business Park</street>
        <city>Bangalore</city>
        <region>KA</region>
        <code>560103</code>
        <country>India</country>
      </postal>
      <email>deeptir@juniper.net</email>
    </address>
  </author>
 
  <author initials="K." surname="Arora" fullname="Kapil Arora">
    <organization>Juniper Networks Inc.</organization>
    <address>
      <postal>
        <street>Exora Business Park</street>
        <city>Bangalore</city>
        <region>KA</region>
        <code>560103</code>
        <country>India</country>
      </postal>
      <email>kapilaro@juniper.net</email>
    </address>
  </author>

 <author initials="S." surname="Hegde" fullname="Shraddha Hegde">
    <organization>Juniper Networks Inc.</organization>
    <address>
      <postal>
        <street>Exora Business Park</street>
        <city>Bangalore</city>
        <region>KA</region>
        <code>560103</code>
        <country>India</country>
      </postal>
      <email>shraddha@juniper.net</email>
    </address>
  </author>

  
  <date year="2020"/>
  <area>Routing</area>
  <workgroup>Routing area</workgroup>
  <keyword>FEC</keyword>
  <keyword>OAM</keyword>
  <keyword>OSPF</keyword>
  <keyword>IS-IS</keyword>
  <keyword>SPRING</keyword>
  <abstract>
    <t>Segment routing supports the creation of explicit paths using adjacency-
	sids, node-sids, and anycast-sids. The SR-TE paths are built by stacking 
	the labels that represent the nodes and links in the explicit path. A very
	useful Operations And Maintenance (OAM) requirement is to be able to ping
	and trace these paths. A simple mpls ping/traceroute mechanism comprises of
	ability to traverse the SR-TE path without having to validate the control
	plane state. This document describes mpls ping and traceroute procedures
	using Nil FEC with additional extensions.
	</t> 

  </abstract>

  <note 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>
  </note>

</front>

<middle>
  <section title="Introduction" anchor='intro'>

    <t>MPLS ping and traceroute mechanism as described in 
	<xref target="RFC8029"/> and related extensions for SR as defined in 
	<xref target="RFC8287"/> is very useful to precisely validate the control
	plane and data plane synchronization. It also provides ability to traverse
	multiple ECMP paths and validate each of the ECMP paths.</t>
	<t>In certain usecases, the traffic engineered (TE) paths are built using
	mechanisms described in <xref target="I.D-ietf-spring-segment-routing-policy"/>.
	When the TE paths are built by the controller, the head-end routers may not
	have the complete database of the network and may not be aware of the FEC
	associated with labels that are used in the label stack. In such cases,
	it is useful to have ability to traverse the paths using ping and traceroute
	without having to obtain the Forwarding  Equivalence Class (FEC) for each
	label. RFC 8029 supports this mechanism with Nil FEC. Nil FEC consists of
	the label and there is no other associated FEC information. The procedures
	described in RFC 8029 are mostly applicable when the Nil FEC is used where
	the Nil FEC is an intermediate FEC in the label stack. When all labels are
	represented using Nil FEC, it poses some challenges.</t>
    <t>  <xref target="Problems_with_Nil_FEC"/> discusses the problems
	associated with using all Nil FECs in a MPLS ping/traceroute procedure and
	<xref target="egress_tlv"/> and <xref target="detail_procedure"/> discusses
	simple extensions needed to solve the problem.
    </t> 

  </section>

  <section anchor='Problems_with_Nil_FEC' title='Problem with Nil FEC'>

    <t>The purpose of Nil FEC as described in <xref target="RFC8029"/> is to
	ensure hiding of transit tunnel information and in some cases to avoid false
	negatives when the FEC information is not known.</t>
	<t>The MPLS ping/traceroute packet consists of only single Nil FEC
	corresponding to the complete label stack irrespective of number of segments
	in the label-stack. When router in the label-stack path receives MPLS
	ping/traceroute packets, there is no definite way to decide on whether its
	egress or transit since Nil FEC does not carry any information. So there is
	high possibility that the packet may be mis-forwarded to incorrect
	destination but the ping/traceroute might still show success.</t>
	<t>To avoid this problem, there is a need to add additional information in
	the MPLS ping/traceroute packet along with Nil FEC that will help to do
	needed validation on each router of the label-stack path and sends proper
	information to ingress router on success and failure.</t>
	<t>Thus it will be useful to add egress information in ping/traceroute
	packet that will help in validating Nil-FEC on each receiving router on
	label-stack path to ensure the correct destination.
    </t>

  </section>

  <section title="Egress TLV" anchor='egress_tlv'>

    <t>The Egress object is a TLV that MAY be included in an MPLS Echo Request
	message. Its an optional TLV and should appear before FEC-stack TLV in the
	MPLS Echo Request packet.
	In case multiple Nil FEC is present in Target FEC Stack TLV, Egress TLV
	should be added corresponding to the ultimate egress of the label-stack.
	The format is as specified below:
	</t>

    <figure>
    <artwork>
    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 = TBD (EGRESS TLV)  |          Length               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                      Prefix (4 or 16 octets)                  |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    </artwork>
    </figure>
        <t>Type             : TBD</t>
      
        <t>Length           : variable based on IPV4/IPV6 prefix. 
							  Length excludes the length of Type and length
							  field. Length will be 4 octets for IPv4 and
							  16 octets for IPv6.</t>

        <t>Prefix           : This field carries the valid IPv4 prefix of length
                       		  4 octets or valid IPv6 Prefix of length 16 octets.
	                          It can be obtained from egress of Nil FEC
							  corresponding to last label in the label-stack or
							  SR-TE policy endpoint field
							  <xref target="I.D-ietf-idr-segment-routing-te-policy"/>.
							  </t>

  </section>


  <section title="Procedure" anchor='detail_procedure'>

    <t>This section describes aspects of LSP Ping and Traceroute operations that
	require further considerations beyond <xref target="RFC8029"/>.</t>
    <section title="Sending Egress TLV in MPLS Echo Request" anchor='send_procedure'>
  	  <t>As stated earlier, when the sender node builds a Echo Request with
	  target FEC Stack TLV, Egress TLV SHOULD appear before Target FEC-stack TLV
	  in MPLS Echo Request packet.</t>

      <t>Ping</t>
        <t>When the sender node builds a Echo Request with target FEC Stack TLV
		that contains a single NiL FEC corresponding to the last segment of the
		SR-TE path, sender node MUST add a Egress TLV with prefix obtained from
		SR-TE policy endpoint field <xref target="I.D-ietf-idr-segment-routing-te-policy"/>
		to indicate the egress for this Nil FEC in the Echo Request packet.
		In case endpoint is not specified or is equal to 0, sender MUST use the
		prefix corresponding to last segment of the SR-TE path as prefix for
		Egress TLV.
        </t>

      <t>Traceroute</t>
        <t>When the sender node builds a Echo Request with target FEC Stack TLV
		that contains a single NiL FEC corresponding to complete segment-list of
		the SR-TE path, sender node MUST add a Egress TLV with prefix obtained
		from SR-TE policy endpoint field <xref target="I.D-ietf-idr-segment-routing-te-policy"/>
		to indicate the egress for this Nil FEC in the Echo Request packet.
		In case of multiple Nil FEC, Egress TLV SHOULD be added with prefix that
		indicate endpoint for last Nil-FEC corresponding to respective segment
		in label-stack. In case endpoint is not specified or is equal to 0,
		sender MUST use the prefix corresponding to the last segment endpoint of
		the SR-TE path i.e. ultimate egress as prefix for Egress TLV.
		</t>

      <t>Consider the SR-TE policy configured with label-stack as 1001, 1002
	  , 1003 and end point as X on ingress router N1 to reach egress router N3.
	  Segment 1003 belongs to N3 that has prefix X configured on it locally.
	  </t>
	  <t>In Ping Echo Request, with target FEC Stack TLV that contains a single
	  NiL FEC corresponding to 1003, should add Egress TLV for endpoint X with
	  type as EGRESS-TLV, length depends on if X is IPv4 or IPv6 address and
	  prefix as X.
	  </t>
	  <t>In Traceroute Echo Request, with target FEC Stack TLV that contains a
	  single NiL FEC corresponding to complete label-stack (1001, 1002, 1003) or
	  multiple Nil-FEC corresponding to each label in label-stack, should add
	  single Egress TLV for endpoint X with type as EGRESS-TLV, length depends
	  on if X is IPv4 or IPv6 address and prefix as X or endpoint of segment 1003.
	  In case X is not present or is set to 0, sender should use endpoint of
	  segment 1003 as prefix for Egress TLV.
      </t>
	   	   
     </section>
    <section title="Receiving Egress TLV in MPLS Echo Request"
	anchor='recv_procedure'>

      <t>No change in the processing for Nil FEC as defined in
	  <xref target="RFC8029"/> in Target FEC stack TLV Node that receives
	  an MPLS echo request.</t>
      <t>Additional processing done for Egress TLV on receiver node as follows:
	  </t>
      <t>1. Get the prefix from the Egress TLV</t>
      <t>2. Look up for an exact match of the prefix to any of locally
	  configured interface as well loopback address.</t>
      <t>3. Set Best-return-code to 3 ("Replying router is an egress for the
	  FEC at stack-depth") if found or to 8 ("Label switched at stack-depth")
	  and Best-rtn-subcode to Label-stack-depth to report transit switching
	  in MPLS Echo Reply message.</t>
      <t>4. If the Label-stack-depth is 0 and the Target FEC Stack sub-TLV at
	  FEC-stack-depth is Nil FEC and look up for EGRESS TLV prefix fails, set
	  the Best-return-code to 10, "Mapping for this FEC is not the given label
	  at stack-depth".</t>
      <t>5. If the Label-stack-depth is greater than 0 and the Target FEC Stack
	  sub-TLV at FEC-stack-depth is Nil FEC and look up for EGRESS TLV prefix
	  succeeds, set the Best-return-code to 10, "Mapping for this FEC is not
	  the given label at stack-depth".</t>

     </section>
  </section>


  <section anchor='backward_compatibility' title='Backward Compatibility'>
		 <t>The extension proposed in this document is backward compatible with
		 procedures described in <xref target="RFC8029"/>.</t>
		 
  </section>
  <section title='Security Considerations' anchor='sec-con'>
    <t>TBD</t>
  </section>
  <section anchor="iana-con" title="IANA Considerations">
    <section anchor="TLV" title="New TLV">
    
	  <t>IANA need to assign new value for EGRESS TLV in the 
	  "Multi-Protocol Label Switching (MPLS) Label Switched Paths (LSPs) Ping
	  Parameters" TLV registry <xref target="IANA"/>.
	  </t>
      <t> EGRESS TLV :    (TBD)</t>
    </section>
  </section>
  <section title='Acknowledgements' anchor='ack'>
    <t>TBD.</t>
  </section>
</middle>

<back>
  <references title='Normative References'>
     <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119">
       <front>
         <title>Key words for use in RFCs to Indicate Requirement Levels</title>
         <author initials="S." surname="Bradner" fullname="S. Bradner"/>
         <date year="1997" month="March"/>
         <abstract>
           <t>In many standards track documents several words are used to
		   signify the requirements in the specification.  These words are often
		   capitalized. This document defines these words as they should be
		   interpreted in IETF documents.  This document specifies an Internet
		   Best Current Practices for the Internet Community, and requests
		   discussion and suggestions for improvements.</t>
         </abstract>
       </front>
       <seriesInfo name="BCP" value="14"/>
       <seriesInfo name="RFC" value="2119"/>
       <seriesInfo name="DOI" value="10.17487/RFC2119"/>
     </reference>
     <reference anchor="RFC8029" target="https://www.rfc-editor.org/info/rfc8029">
       <front>
         <title>Detecting Multiprotocol Label Switched (MPLS) Data-Plane
		 Failures</title>
         <author initials="K." surname="Kompella" fullname="K. Kompella"/>
         <author initials="G." surname="Swallow" fullname="G. Swallow"/>
         <author initials="C." surname="Pignataro" fullname="C. Pignataro"
		 role="editor"/>
         <author initials="N." surname="Kumar" fullname="N. Kumar"/>
         <author initials="S." surname="Aldrin" fullname="S. Aldrin"/>
         <author initials="M." surname="Chen" fullname="M. Chen"/>
         <date year="2017" month="March"/>
         <abstract>
           <t>This document describes a simple and efficient mechanism to detect
		   data-plane failures in Multiprotocol Label Switching (MPLS) Label
		   Switched Paths (LSPs).  It defines a probe message called an "MPLS
		   echo request" and a response message called an "MPLS echo reply" for
		   returning the result of the probe.  The MPLS echo request is intended
		   to contain sufficient information to check correct operation of the
		   data plane and to verify the data plane against the control plane,
		   thereby localizing faults.</t>
           <t>This document obsoletes RFCs 4379, 6424, 6829, and 7537,
		   and updates RFC 1122.</t>
         </abstract>
       </front>
       <seriesInfo name="RFC" value="8029"/>
       <seriesInfo name="DOI" value="10.17487/RFC8029"/>
     </reference>
     <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174">
       <front>
         <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
         <author initials="B." surname="Leiba" fullname="B. Leiba"/>
         <date year="2017" month="May"/>
         <abstract>
           <t>RFC 2119 specifies common key words that may be used in protocol
		   specifications.  This document aims to reduce the ambiguity by
		   clarifying that only UPPERCASE usage of the key words have the
		   defined special meanings.</t>
         </abstract>
       </front>
       <seriesInfo name="BCP" value="14"/>
       <seriesInfo name="RFC" value="8174"/>
       <seriesInfo name="DOI" value="10.17487/RFC8174"/>
     </reference>
     <reference anchor="RFC8287" target="https://www.rfc-editor.org/info/rfc8287">
       <front>
         <title>Label Switched Path (LSP) Ping/Traceroute for Segment Routing
		 (SR) IGP-Prefix and IGP-Adjacency Segment Identifiers (SIDs) with MPLS
		 Data Planes</title>
         <author initials="N." surname="Kumar" fullname="N. Kumar"
		 role="editor"/>
         <author initials="C." surname="Pignataro" fullname="C. Pignataro"
		 role="editor"/>
         <author initials="G." surname="Swallow" fullname="G. Swallow"/>
         <author initials="N." surname="Akiya" fullname="N. Akiya"/>
         <author initials="S." surname="Kini" fullname="S. Kini"/>
         <author initials="M." surname="Chen" fullname="M. Chen"/>
         <date year="2017" month="December"/>
         <abstract>
           <t>A Segment Routing (SR) architecture leverages source routing and
		   tunneling paradigms and can be directly applied to the use of a
		   Multiprotocol Label Switching (MPLS) data plane. A node steers a
		   packet through a controlled set of instructions called "segments" by
		   prepending the packet with an SR header.
		   </t>
           <t>The segment assignment and forwarding semantic nature of SR raises
		   additional considerations for connectivity verification and fault
		   isolation for a Label Switched Path (LSP) within an SR architecture.
		   This document illustrates the problem and defines extensions to
		   perform LSP Ping and Traceroute for Segment Routing IGP-Prefix and
		   IGP-Adjacency Segment Identifiers (SIDs) with an MPLS data plane.
		   </t>
         </abstract>
       </front>
       <seriesInfo name="RFC" value="8287"/>
       <seriesInfo name="DOI" value="10.17487/RFC8287"/>
     </reference>
     <reference anchor="I.D-ietf-spring-segment-routing-policy"
	 target="https://datatracker.ietf.org/doc/html/draft-ietf-spring-segment-routing-policy-08">
       <front>
         <title>Segment Routing Policy Architecture</title>
         <author initials="C." surname="Filsfils" fullname="C. Filsfils"/>
         <author initials="K." surname="Talaulikar " fullname="K. Talaulikar"/>
         <author initials="A." surname="Bogdanov" fullname="A. Bogdanov"/>
         <author initials="P." surname="Mattes" fullname="P. Mattes"/>
         <author initials="D." surname="Voyer" fullname="D. Voyer"/>
         <date year="2020" month="July"/>
         <abstract>
           <t>Segment Routing (SR) allows a headend node to steer a packet flow
		   along any path. Intermediate per-flow states are eliminated thanks to
		   source routing. The headend node steers a flow into an SR Policy. The
		   header of a packet steered in an SR Policy is augmented with an
		   ordered list of segments associated with that SR Policy.
		   This document details the concepts of SR Policy and steering into an
		   SR Policy.
		   </t>
         </abstract>
       </front>
       <seriesInfo name="" value="draft-ietf-spring-segment-routing-policy-08"/>
       <seriesInfo name="" value="work in progress"/>
     </reference>
     <reference anchor="I.D-ietf-idr-segment-routing-te-policy" 
	 target="https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-09">
       <front>
         <title>Advertising Segment Routing Policies in BGP</title>
         <author initials="C." surname="Filsfils" fullname="C. Filsfils"
		 role="editor"/>
         <author initials="S." surname="Previdi" fullname="S. Previdi"
		 role="editor"/>
         <author initials="K." surname="Talaulikar " fullname="K. Talaulikar"/>
         <author initials="P." surname="Mattes" fullname="P. Mattes"/>
         <author initials="E." surname="Rosen" fullname="Eric C. Rosen"/>
         <author initials="D." surname="Jain" fullname="D. Jain"/>
         <author initials="S." surname="Lin" fullname="S. Lin"/>
         <date year="2020" month="may"/>
         <abstract>
           <t>This document defines a new BGP SAFI with a new NLRI in order to
		   advertise a candidate path of a Segment Routing (SR) Policy. An SR
		   Policy is a set of candidate paths, each consisting of one or more
		   segment lists. The headend of an SR Policy may learn multiple
		   candidate paths for an SR Policy. Candidate paths may be learned via
		   a number of different mechanisms, e.g., CLI, NetConf, PCEP, or BGP.
		   This document specifies the way in which BGP may be used to
		   distribute SR Policy candidate paths. New sub-TLVs for the Tunnel
		   Encapsulation Attribute are defined for signaling information about
		   these candidate paths.
		   </t>
         </abstract>
       </front>
       <seriesInfo name="" value="draft-ietf-idr-segment-routing-te-policy-09"/>
       <seriesInfo name="" value="work in progress"/>
     </reference>
   </references>
   <references title='Informative References'>  
     <reference anchor="IANA" target="http://www.iana.org/assignments/mpls-lsp-ping-parameters">
       <front>
         <title>Multiprotocol Label Switching (MPLS) Label Switched Paths (LSPs)
		 Ping Parameters</title>
		 <author fullname="IANA"/>
         <date/>
         <abstract>
           <t></t>
         </abstract>
       </front>
	 </reference>
  </references>
 </back>
</rfc>
