Disabling MPLS TTL propagation
By stretch | Monday, December 22, 2008 at 7:19 a.m. UTC
As you're probably aware, the IP header includes a time-to-live (TTL) field which serves as a hop counter. At every routed hop, the TTL is decremented by one; if the TTL reaches zero before the packet reaches its destination, the packet is discarded and (optionally) an ICMP TTL exceeded message is sent to its source. MPLS labels also have a TTL field:
MPLS routers copy the TTL of an IP packet when it enters a label-switched path (LSP), such that an IP packet with a TTL of 255 receives an MPLS label with a TTL of 255. By default, IOS routers will decrement the MPLS TTL of an MPLS-encapsulated packet in place of the IP TTL, at every label-switched hop.
Cisco calls behavior this TTL propagation. Because the MPLS TTL is copied (or "propagated") from the IP TTL, a traceroute from R1 to R6 in the above topology will list every hop in the path, be it routed or label-switched. (Note that the final leg of the MPLS portion of the path, from R4 to R5, is not label-switched due to penultimate hop popping.)
R1# traceroute 10.0.56.6 Type escape sequence to abort. Tracing the route to 10.0.56.6 1 10.0.12.2 28 msec 36 msec 12 msec 2 10.0.23.3 84 msec 28 msec 68 msec 3 10.0.34.4 68 msec 68 msec 68 msec 4 10.0.45.5 68 msec 76 msec 60 msec 5 10.0.56.6 60 msec * 68 msec
Cisco IOS provides the option to disable MPLS TTL propagation, with the no mpls ip propagate-ttl command under global configuration. If applied, this command should be applied to all routers in the MPLS domain.
R2(config)# no mpls ip propagate-ttl
R3(config)# no mpls ip propagate-ttl
R4(config)# no mpls ip propagate-ttl
R5(config)# no mpls ip propagate-ttl
With TTL propagation disabled, the MPLS TTL is calculated independent of the IP TTL, and the IP TTL remains constant for the length of the LSP. Because the MPLS TTL never drops to zero, none of the LSP hops (R2-R3 and R3-R4) trigger an ICMP TTL exceeded message and consequently these hops are not recorded in the traceroute from R1:
R1# traceroute 10.0.56.6 Type escape sequence to abort. Tracing the route to 10.0.56.6 1 10.0.12.2 16 msec 12 msec 12 msec 2 10.0.45.5 60 msec 60 msec 60 msec 3 10.0.56.6 60 msec * 52 msec
About the Author
Jeremy Stretch is a network engineer living in the Raleigh-Durham, North Carolina area. He is known for his blog and cheat sheets here at Packet Life. You can reach him by email or follow him on Twitter.
May 23, 2009 at 4:38 p.m. UTC
First of all congratulation for such a great site. I learned a lot reading article here today. I will make sure i visit this site once a day so i can learn more.
July 19, 2009 at 10:49 a.m. UTC
It is realy a good presentation to get the concept of
traceroute and no mpls ip propagate-ttl.
January 13, 2010 at 6:43 p.m. UTC
Tested this with vrf's did not work for me. I will be t/s it.
April 24, 2010 at 6:07 p.m. UTC
A lucid explanation of IP vs MPLS TTL concept via pictures. Thank you for a great site!
April 14, 2011 at 10:05 p.m. UTC
I had labbed this up and wondered why my last hop within the MPLS cloud was still showing up on the traceroute. I googled it and came here, and found the answer - penultimate hop popping. Of course, it all makes sense now!
August 18, 2011 at 10:27 a.m. UTC
The "challenge" intstead of captcha is wonderfull. Keep on pressing F5.
October 25, 2011 at 4:48 p.m. UTC
Great Explanation, better that I found in the internet
December 22, 2011 at 3:14 a.m. UTC
Good stuff Jeremy,
Your explanations are the to the point and clear. Great Job. I do come and visit this site every now and then.
March 16, 2015 at 12:37 p.m. UTC
soo clear about TTL in MPLS
Thank you and i am after you for further updates .
September 26, 2016 at 12:45 p.m. UTC
Thanks Stretch. Your explanation clears this for me. Appreciated you Sir.