Loop Detection

Cisco.com

• LDP relies on loop detection mechanisms built into IGPs that are used to determine the path.

• If, however, a loop is generated (that is, misconfiguration with static routes), the TTL field in the label header is used to prevent indefinite looping of packets.

• TTL functionality in the label header is equivalent to TTL in the IP headers.

• TTL is usually copied from the IP headers to the label headers (TTL propagation).

Loop detection in an MPLS-enabled network relies on more than one mechanism.

Most routing loops are prevented by the IGP used in the network. MPLS for unicast IP forwarding simply uses the shortest paths determined by the IGP. These paths are typically loop-free.

If, however, a routing loop does occur (for example, because of misconfigured static routes), MPLS labels also contain a time-to-live (TTL) field that prevents packets from looping indefinitely.

The TTL functionality in MPLS is equivalent to that of traditional IP forwarding. Furthermore, when an IP packet is labeled, the TTL value from the IP header is copied into the TTL field in the label. This is called TTL propagation.

Copyright © 2004, Cisco Systems, Inc. Label Assignment and Distribution 2-27

The PDF files and any printed representation for this material are the property of Cisco Systems, Inc., for the sole use by Cisco employees for personal study. The files or printed representations may not be used in commercial training, and may not be distributed for purposes other than individual self-study.

Alaxala Loop Detection

• Cisco routers have TTL propagation enabled by default.

• On ingress: TTL is copied from IP header to label header.

• On egress: TTL is copied from label header to IP header.

© 2004 Cisco Systems, Inc. All rights reserved. MPLS v2.1—2-27

• Cisco routers have TTL propagation enabled by default.

• On ingress: TTL is copied from IP header to label header.

• On egress: TTL is copied from label header to IP header.

© 2004 Cisco Systems, Inc. All rights reserved. MPLS v2.1—2-27

Continue reading here: Liberal or conservative label retention

Was this article helpful?

+2 0

Readers' Questions

  • tecla trentini
    Can we detect a routing loop looking for duplicate packets and increase ttl?
    16 days ago
  • Yes, a routing loop can be detected by looking for duplicate packets and increasing the Time to Live (TTL) value. In the Internet Protocol (IP), the TTL field is used to limit the lifespan of a packet, and routers decrease the TTL value as the packet is forwarded. When a routing loop occurs, packets can endlessly hop between several routers, causing duplicated packets to appear. One way to identify this is by monitoring for duplicate packets arriving at a router. If duplicate packets are detected, it indicates that the packet is being repeatedly forwarded in a loop. To mitigate routing loops, the TTL value of the IP header can be increased for each subsequent packet sent. By increasing the TTL, packets will eventually exceed the maximum allowed TTL value set by the network, causing routers to drop those packets. This prevents the packets from continually circulating in the loop. Therefore, detecting duplicate packets and incrementing the TTL value are effective methods to identify and prevent routing loops in network communication.
    • Jesse
      How mpls avoid loop prevention?
      5 months ago
    • MPLS avoids loop prevention using Label Switch Path (LSP) and Label Switched Router (LSR) technology. Through these technologies, each router in an MPLS network is given a unique label for each data packet it sends. This allows the network to construct a data path from source to destination, ensuring that data packets take the most efficient route and avoid any possible loop formation. Additionally, the routers can detect any potential loops and discard packets accordingly.