Disabling MPLS TTL propagation

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_label.png

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.

TTL_propagation.png

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.)

traceroute_with_propagation.png

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:

traceroute_without_propagation.png

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 freelance networking engineer, instructor, and the maintainer of PacketLife.net. He currently lives in Fairfax, Virginia, on the edge of the Washington, DC metro area. Although primarily an R&S guy, he likes to get into everything, and runs a free network training lab out of his basement for fun. You can contact him by email or follow him on Twitter.

Comments

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.

It is realy a good presentation to get the concept of

traceroute and no mpls ip propagate-ttl.

Tested this with vrf's did not work for me. I will be t/s it.

A lucid explanation of IP vs MPLS TTL concept via pictures. Thank you for a great site!

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!

The "challenge" intstead of captcha is wonderfull. Keep on pressing F5.

Great Explanation, better that I found in the internet

Domingues
CCIE R&S#29765
leandro.domingues.almeida@gmail.com

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.

Regards,
Kishore

Leave a Comment


Register to comment as a member. You'll look cooler.

Optional; will not be displayed publicly or given out.

No commercial links. Only personal (e.g. blog, Twitter, or LinkedIn) and/or on-topic links, please.
_____ is a base-16 numbering system.