Path Tracing in SR-MPLS networks
Clarence Filsfils
Cisco Systems, Inc.
Belgium
cf@cisco.com
Ahmed Abdelsalam, Ed.
Cisco Systems, Inc.
Italy
ahabdels@cisco.com
Pablo Camarillo Garvia, Ed.
Cisco Systems, Inc.
Spain
pcamaril@cisco.com
Israel Meilik
Broadcom
Israel
israel.meilik@broadcom.com
Mike Valentine
Goldman Sachs
USA
michael.j.valentine@gs.com
Ruediger Geib
Deutsche Telekom
Germany
Ruediger.Geib@telekom.de
Jonathan Desmarais
Colt Technology Services
UK
Jonathan.Desmarais@colt.net
09 November 2024
General
SPRING
Internet-Draft
Path Tracing provides a record of the packet path as a sequence of interface ids. In addition, it provides a record of end-to-end delay, per-hop delay, and load on each interface that forwards the packet.
Path Tracing has the lowest MTU overhead compared to alternative proposals such as [INT], [RFC9197], [I-D.song-opsawg-ifit-framework], and [I-D.kumar-ippm-ifa].
Path Tracing supports fine grained timestamp. It has been designed for linerate hardware implementation in the base pipeline.
This document defines the Path Tracing specification for the SR-MPLS dataplane. The Path Tracing specification for the SRv6 dataplane is defined in [I-D.filsfils-spring-path-tracing].
Introduction
Path Tracing provides a record of the packet path as a sequence of interface ids. In addition, it provides a record of end-to-end delay, per-hop delay, and load on each interface that forwards the packet.
Path Tracing has the lowest MTU overhead compared to alternative proposals such as [INT], [RFC9197], [I-D.song-opsawg-ifit-framework], and [I-D.kumar-ippm-ifa].
Path Tracing supports fine grained timestamp. It has been designed for linerate hardware implementation in the base pipeline.
Path Tracing is applicable to both SR-MPLS [RFC8660], as well as SRv6 [RFC8986]. This document defines the Path Tracing specification for the SR-MPLS dataplane. The SRv6 dataplane is detailed in [I-D.filsfils-spring-path-tracing].
Terminology
The following terms used within this document are defined in [RFC6790], [RFC8402], [RFC8754], [RFC8986], [I-D.decraene-mpls-slid-encoded-entropy-label-id] and [I-D.filsfils-spring-path-tracing]: Segment Routing (SR), SR Domain, Segment Identifier (SID), SR-MPLS SID, SR Policy, Segment Routing Header (SRH), SR source node, transit node, SR Endpoint, SA, DA, EL, ELI, ELC, PT, PT Probing Instance, PT Source, PT Midpoint, PT Sink, RC, MCD, SRH PT-TLV, TEF.
The following terms are used in this document as defined below:
MPLS HbH-PT: MPLS Hop-by-Hop Path Tracing Option used for Path Tracing. It contains a stack of MCDs. It is defined in Section 6.1 of this document.
SEL: Structured Entropy Label as defined in [I-D.decraene-mpls-slid-encoded-entropy-label-id].
TEF Label: MPLS Label bound to Timestamp, Encapsulation and Forward (TEF) behavior. The allocation of the TEF Label is out of scope of this document.
PTI: PT Indicator is a flag bit used to indicate the presence of the MPLS HbH-PT after the BoS Label and triggers PT behavior at a PT Midpoint.
Requirements Language
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 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.
PT Source Node Dataplane Behavior
For each configured PT Probing Instance, according to the probe-rate, the PT Source generates a PT probe packet as follows:

S01. Generate a new packet
S02. Push an SRH PT-TLV
S03. Set the session ID field of the SRH PT-TLV as per
     PT Probing Instance configuration
S04. Set the Sequence Number field of SRH PT-TLV and
     increase local counter
S05. Push an MPLS HbH-PT header
S06. Set all bits of MCD Stack of the MPLS HbH-PT header to zero
S07. Set the VER field of the MPLS HbH-PT to 0x2
S08. Set the value of Opt Data Len field as per
     the PT Probing Instance configuration
S09. Push an MPLS Structured Entropy Label (SEL)
S10. Set the PTI flag in the ELC field of the SEL
S11. Set the value of the SEL entropy field as per
     the PT Probing Instance configuration
S12. Set Bottom of Stack bit (S) of the SEL to 1
S13. Push an MPLS Entropy Indicator Label (ELI)
S14. Push an MPLS TEF Label as per the PT Probing
     Instance configuration
S15. Set the TC and TTL value of the TEF Label as per
     PT Probing Instance configuration
S16. Push an SR-MPLS transport Label stack as per the
     PT Probing Instance configuration
S17. Set the TC and TTL value of the SR-MPLS transport Labels
     as per PT Probing Instance configuration
S18. Add padding bytes after SRH PT-TLV to reach the desired
     packet size as per the MTU sweeping range configuration in
     the PT Probing Instance configuration
S19. Perform MPLS lookup using the topmost label to
     determine the Outgoing Interface (IFACE-OUT)
S20. Record Transmit 64-bit timestamp (SRC.T64) in the
     T64 field of the SRH PT-TLV
S21. Record IFACE-OUT ID (SRC.OIF) in the IF_ID field
     of the SRH PT-TLV
S22. Record IFACE-OUT Load (SRC.OIL) in the IF_LD field
     of the SRH PT-TLV
S23. Forward the packet via IFACE-OUT

Notes:
- The pseudocode describes local processing at a node. An implementation of the pseudocode is compliant as long as the externally observable wire protocol is as described in the pseudocode.
PT Midpoint Node Dataplane Behavior
When an MPLS LSR router receives an MPLS packet with SEL, the MPLS LSR router processes the SEL as follows:

S01. When processing SEL {
S02.    Use Entropy field to compute ECMP hash and decide IFACE-OUT
S03.    IF (SEL[ELC].PTI == 1 and SEL[BOS] == 1) {
S04.       Compute the Midpoint MCD for IFACE-OUT
S05.       Locate the MPLS HbH-PT immediately after SEL
S06.       MPLS_HbH-PT.MCD_Stack[3:Opt_Data_Len -1] =
           MPLS_HbH-PT.MCD_Stack[0:Opt_Data_Len -4]
              //Shift MCD Stack 3Bytes to the right
S07.       MPLS_HbH-PT.MCD_Stack[0:2] = MCD[0:2]
             //i.e., Push the MCD at the beginning of the Stack
S08.    }
S09. }

Notes:
- The PT Midpoint behavior MUST be implemented in the normal pipeline to experience the regular datapath (i.e., linerate). Offloading the processing of this option to either the slow-path or a co-processors is not acceptable and yields invalid results.
PT Sink Node Dataplane Behavior
We define a new MPLS Label bound to an SRv6 Policy with Timestamp, Encapsulation and Forward ("TEF Label" for short). When Node N receives an MPLS packet with topmost Label is TEF Label, N performs the TEF behavior to the MPLS packet.

S01. Record Rx 64-bit timestamp (SNK.T64)
S02. Record incoming interface ID (Sink.IIF)
S03. Record incoming interface Load (Sink.IIL)
S04. Push a new IPv6 header
S05. Set the IPv6 SA to the Sink node loopback
S06. Set the IPv6 DA to the first SID in the SRv6 SID List
S07. Set the IPv6 Next Header field to 43 (SRH)
S08. Append an SRH
S09. Set the SRH Next Header field to 137 (MPLS)
S10. Write the SID list in the SRH
S11. Append an SRH PT-TLV
S12. Set the session ID field of the SRH PT-TLV to zero
S13. Set the Sequence Number field of the SRH PT-TLV to zero
S14. Write Sink.T64 in the T64 field of the SRH PT-TLV
S15. Write Sink.IIF in the IF_ID field of the SRH PT-TLV
S16. Write Sink.IIL in the IF_LD field of the SRH PT-TLV
S17. Perform an IPv6 lookup and forward the packet

Notes:
- The pseudocode describes local processing at a node. An implementation of the pseudocode is compliant as long as the externally observable wire protocol is as described in the pseudocode.
PT Headers
MPLS Hop-by-Hop Path Tracing Option
We define a new header called MPLS Hop-by-Hop Path Tracing option ("MPLS HbH-PT" for short). The header is used to collect the MCD of each PT Midpoint on the packet path. The MPLS HbH-PT has the following format:

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  VER  |  RSVD |  Opt Data Len |                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
|                                                               |
~                           MCD Stack                           ~
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      Figure 1: IPv6 Hop-by-Hop Path Tracing Option Format

Where:
- VER: In MPLS, the first nibble after the Label stack indicates the packet IP protocol version. VER is set to 0x2.
- RSVD: Reserved 4-bits. Currently not used.
- Opt Data Len: carries the length of MCD stack (in bytes). Used by PT Midpoint to determine the MCD stack shift value.
- MCD Stack: used to collect the MCDs from PT Midpoints
Note: The MPLS Hop-by-Hop Path Tracing option has a variable length. The operator, upon configuring the Source node behavior, MUST select an option length that is supported by all the routers in the network.
Benefits
- Insignificant MTU overhead:
  - PT has the lowest MTU overhead compared to alternative solutions such as [INT], [RFC9197], [I-D.song-opsawg-ifit-framework], and [I-D.kumar-ippm-ifa].
- Linerate and HW friendliness:
  - Designed for linerate hardware implementation, using the regular forwarding pipeline. No offloading to co-processors whose databases might defer from forwarding pipeline.
  - Leverages mature hardware capabilities (basic shift operation); no packet resizing at every node along the path
- Scalable Fine-grained Timestamp:
  - 64-bits timestamp at PT SRC and PT SNK
  - 8-bits truncated timestamp at PT Midpoint leveraging flexible per-outgoing-link template allowing diverse link types in the same measurement (e.g., DC, metro, WAN)
- Scalable Load measurement
Security Considerations
TBD
IANA Considerations
TBD

Normative References

Informative References
[INT]

In-band Network Telemetry (INT) Dataplane Specification
2020
[RFC9197]
[I-D.song-opsawg-ifit-framework]
[I-D.kumar-ippm-ifa]
[I-D.filsfils-spring-path-tracing]
[RFC8660]
[RFC8986]
[RFC6790]
[RFC8402]
[RFC8754]
[I-D.decraene-mpls-slid-encoded-entropy-label-id]
[RFC2119]
[RFC8174]
Contributors
Jisu Bhattacharya
Cisco Systems, Inc.
USA
jisu@cisco.com
Rakesh Gandhi
Cisco Systems, Inc.
Canada
rgandhi@cisco.com
Shay Zadok
Broadcom
Israel
shay.zadok@broadcom.com
Mark Yufit
Broadcom
Israel
mark.yufit@broadcom.com
Bart Janssens
Colt Technology Services
Belgium
Bart.Janssens@colt.net