MPLS TTL Behavior

Introduction

Time to Live field is used to prevent forwarding loops sending packets indefinitely in a loop. MPLS TTL is similar to IP TTL field.

TTL Field

  • TTL value is from 255 to 1. It is decremented by each LSR. When it reaches 0, the packet is dropped and an alert is sent using ICMP type 11 code 0 (time exceeded).

TTL Behavior - IP to MPLS

These behaviors describe the default behavior of TTL values when labels are pushed or popped.

Ingress

  • When an IP packet is imposed with a label, the IP TTL value is first decremented then copied into the MPLS TTL.
  • As each LSR the MPLS frame's TTL is decremented.
  • This behavior can be modified with no mpls ip propagate-ttl.

Egress

  • When a MPLS label is popped, the MPLS TTL value is decremented then copied in the IP TTL field.
  • There is one safeguard, if the MPLS TTL value is great than IP TTL, that values is not copied over. This is to prevent a possible condition of forwarding loop and TTL never reaching 0.

TTL Behavior - MPLS to MPLS

These behaviors describe what happens to TTL values when MPLS Labels are swapped.

Swap

  • When two MPLS labels are swapped, decrement by 1 and copy over the result into the new label.

Push

  • When a new MPLS labels is pushed, decrement by 1 and copy over the result into the new label.

Pop

  • When a new MPLS labels is popped, decrement by 1 and copy over the result into the label below.

Relevant Commands

mpls ip propagate-ttl

By default on. Enables the copying of IP TTL to MPLS header.

R1(config)#        mpls ip propagate-ttl

no mpls ip propagate-ttl

Disables the copying of MPLS TTL from IP TTL. This prevents traceroute from seeing the internal network because its TTL of 1,2,3..n are not notices by the MPLS LSRs, they are tunneled.

R1(config)#      no mpls ip propagate-ttl

no mpls ip propagate-ttl forwarded

Disables the copying of MPLS TTL from IP TTL. This prevents traceroute from seeing the internal network but only for packets that are forwarded from customers and not provider's network.

R1(config)#        no mpls ip propagate-ttl forwarded

no mpls ip propagate-ttl local

Disables the copying of MPLS TTL from IP TTL. This prevents traceroute from seeing the internal network for local network.

R1(config)#        no mpls ip propagate-ttl local

mpls ip ttl-expiration pop

This command controls the behavior of popping labels if time expired occurs and you have to pop a custom number of labels. If the packet contains the same or fewer labels than specified parameter, it is forwarded through the use of the global IP routing table. If the packet contains more labels than you specified, the packet is forwarded through the use of the original label stack.

R1(config)#        mpls ip ttl-expiration pop (1-6)

Comments

rating: 0+x
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License