1. Use the traceroute Command to Verify MPLS Labels
Action
To verify MPLS labels, enter the following JUNOS CLI operational mode command, where
host-nameis the IP address or the name of the remote host:user@host>traceroutehost-nameSample Output 1
user@R1>traceroute 100.100.6.1traceroute to 100.100.6.1 (100.100.6.1), 30 hops max, 40 byte packets1 10.1.12.2 (10.1.12.2) 0.861 ms 0.718 ms 0.679 msMPLS Label=100048 CoS=0 TTL=1 S=12 10.1.24.2 (10.1.24.2) 0.822 ms 0.731 ms 0.708 msMPLS Label=100016 CoS=0 TTL=1 S=13 10.1.46.2 (10.1.46.2) 0.571 ms !N 0.547 ms !N 0.532 ms !NSample Output 2
user@R1>traceroute 10.0.0.6traceroute to 10.0.0.6 (10.0.0.6), 30 hops max, 40 byte packets1 10.1.13.2 (10.1.13.2) 0.605 ms 0.548 ms 0.503 ms2 10.0.0.6 (10.0.0.6) 0.761 ms 0.676 ms 0.675 msWhat It Means
Sample Output 1 shows that MPLS labels are used to forward packets through the network. Included in the output is a label value (
MPLS Label=100048), the time-to-live value (TTL=1), and the stack bit value (S=1).The
MPLS Labelfield is used to identify the packet to a particular LSP. It is a 20-bit field, with a maximum value of (2^^20-1), or approximately 1,000,000.The TTL value contains a limit on the number of hops that this MPLS packet can travel through the network (1). It is decremented at each hop, and if the TTL value drops below one, the packet is discarded.
The bottom of the stack bit value (
S=1) indicates that is the last label in the stack and that this MPLS packet has one label associated with it. The MPLS implementation in the JUNOS software supports a stacking depth of 3 on the M-series routers and up to 5 on the T-series platforms. For more information on MPLS label stacking, see RFC 3032, MPLS Label Stack Encoding.MPLS labels appear in Sample Output 1 because the
traceroutecommand is issued to a BGP destination where the BGP next hop for that route is the LSP egress address. The JUNOS software default behavior uses LSPs for BGP traffic when the BGP next hop equals the LSP egress address.Sample Output 2 shows that MPLS labels do not appear in the output for the
traceroutecommand. If the BGP next hop does not equal the LSP egress address or the destination is an IGP route, the BGP traffic does not use the LSP. Instead of using the LSP, the BGP traffic is using the IGP (IS-IS, in this case) to reach the egress address (R6).