The setup has the LDP tunneling over RSVP. In the CLI output, we can see 2 mpls labels at R2 of the LDP-tunneling. One label is for the LDP, the other is for the RSVP. However, when decoded the ttrace of ping packets, only single MPLS label is seen and that's the RSVP label and the packet doesn't show the LDP label.
Topology: R1 ------- R2 ------- R3 ------- R4 LDP + lsp R2-toR4 + +-----------------------+ LDP tunneling
The CLI output shows 2 label operations on R2, one is LDP label swap to 731275, and the other is push the RSVP label 5725.
root@R20> show route label 134243 extensive
mpls.0: 3985 destinations, 3985 routes (3985 active, 0 holddown, 0 hidden)
134243 (1 entry, 1 announced)
TSI:
KRT in-kernel 134243 /52 -> {list:Swap 731275, Push 5725(top), Swap 731275, Push 1244(top)}
*LDP Preference: 9
Next hop type: Router, Next hop index: 0
Address: 0x97c4a1c
Next-hop reference count: 1
Next hop: 192.10.21.41 via ae2010.10 weight 0x1, selected
Label-switched-path R2-TO-R4
Label operation: Swap 731275, Push 5725(top)
Label TTL action: no-prop-ttl, no-prop-ttl(top)
Ttrace packet:
PFE 0 Parcel Dump:
Wallclock: 0x4a2dc3aa
Reorder: EA2X_REORDER_SEND_TERMINATE (d) HasTail 0 Stat 1
ReorderId 170b Color 0 Qop ENQUEUE (2) Qsys WAN (0) Queue InSrvc (28)
Stats Map 0 len_adjust 18 cnt_addr 004129e
Magic 0000 Tun 0 IngQ 1 RefCnt 0 OptLbk 0 TailHndl 1a587b6cfe96434b
IxPreClass 1 IxPort 07 IxMyMac 1
d570b0400028872205b0c84b003004129e0000a4e11a587b6cfe96434b67ae 8100800a88470165 d1ff45000054c27d 00003f016e184552 e0014552e06d0800 bc20a5e102656540 0246000b41040809 0a0b0c0d0e0f1011 1213141516171819 1a1b1c1d1e1f2021 2223242526272829 2a2b2c2d2e2f3031 323334353637
The decoded packet is showing below. In the MPLS header, we can only see single MPLS label stack with RSVP label 5725, and there's no LDP label showing in the packet.
Frame 1: 106 bytes on wire (848 bits)
Encapsulation type: Ethernet (1)
Arrival Time: Oct 30, 2023 23:49:58.000000000 CET
Time shift for this packet: 0.000000000 seconds
Epoch Time: 1698706198.000000000 seconds
Time delta from previous captured frame: 0.000000000 seconds
Time delta from previous displayed frame: 0.000000000 seconds
Time since reference or first frame: 0.000000000 seconds
Frame Number: 1
Frame Length: 106 bytes (848 bits)
Capture Length: 106 bytes (848 bits)
Frame is marked: False
Frame is ignored: False
Protocols in frame: eth:ethertype:vlan:ethertype:mpls:ip:icmp:data
Ethernet II
Destination: JuniperN_58:7b:6c (a4:e1:1a:58:7b:6c)
Address: JuniperN_58:7b:6c (a4:e1:1a:58:7b:6c)
. ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
. ...0 .... .... .... .... = IG bit: Individual address (unicast)
Source: fe:96:43:4b:67:ae (fe:96:43:4b:67:ae)
Address: fe:96:43:4b:67:ae (fe:96:43:4b:67:ae)
. ..1. .... .... .... .... = LG bit: Locally administered address (this is NOT the factory default)
Type: 802.1Q Virtual LAN (0x8100)
802.1Q Virtual LAN
100. .... .... .... = Priority: Video, < 100ms latency and jitter (4)
.0 .... .... .... = DEI: Ineligible
. 0000 0000 1010 = ID: 10
Type: MPLS label switched packet (0x8847)
MultiProtocol Label Switching Header
0000 0001 0110 0101 1101 .... .... .... = MPLS Label: 5725 (0x0165d)
. .... .... .... .... 000. .... .... = MPLS Experimental Bits: 0
. .... .... .... .... ...1 .... .... = MPLS Bottom Of Label Stack: 1
. .... .... .... .... .... 1111 1111 = MPLS TTL: 255
Internet Protocol Version 4
0100 .... = Version: 4
. 0101 = Header Length: 20 bytes (5)
Differentiated Services Field: 0x00 (DSCP: CS0, ECN: Not-ECT)
0000 00.. = Differentiated Services Codepoint: Default (0)
. ..00 = Explicit Congestion Notification: Not ECN-Capable Transport (0)
Total Length: 84
Identification: 0xc27d (49789)
000. .... = Flags: 0x0
0... .... = Reserved bit: Not set
.0.. .... = Don't fragment: Not set
.0. .... = More fragments: Not set
.0 0000 0000 0000 = Fragment Offset: 0
Time to Live: 63
Protocol: ICMP (1)
Header Checksum: 0x6e18
Header checksum status: Unverified
Source Address: 69.82.224.1
Destination Address: 69.82.224.109
Internet Control Message Protocol
Type: 8 (Echo (ping) request)
Code: 0
Checksum: 0xbc20 [correct]
Checksum Status: Good
Identifier (BE): 42465 (0xa5e1)
Identifier (LE): 57765 (0xe1a5)
Sequence Number (BE): 613 (0x0265)
Sequence Number (LE): 25858 (0x6502)
Timestamp from icmp data: Oct 30, 2023 20:21:42.737540000 CET
Timestamp from icmp data (relative): 12495.262460000 seconds
Data ????
Data: 08090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b?
Length: 48
PFE is forwarding packets as programmed. At ingress R2 ldp route is present only in inet.3 table and not in inet.0 table. ICMP ping selects path which is present in inet.0 table. When icmp ping is executed from R2, IP forwarding happens in R2 because of which only one label is present in mpls header of the outgoing packet of R4.
Configure "set protocols mpls traffic-engineering bgp-igp-both-ribs". After the configuration, could see ldp route is available in inet.0 table at R2. Now when icmp ping is executed from R2, ldp route is chosen for forwarding the packets from R2. The outgoing packet then has 2 labels as expected.