34
reaches the path vector limit, LDP also determines that a loop has occurred and terminates the
LSP establishment.
Configuration restrictions and guidelines
•
To use this feature, you must enable it on all LSRs that the LSP passes through.
•
To avoid extra LDP overhead, do not use this feature if most of the devices in an MPLS network
support the TTL mechanism. Using the TTL mechanism can prevent endless routing loops.
Configuration procedure
To configure LDP loop detection:
Step Command Remarks
1.
Enter system view.
system-view
N/A
2.
Enter LDP view or enter
LDP-VPN instance view.
•
Enter LDP view:
mpls ldp
•
Enter LDP-VPN instance view:
a. mpls ldp
b. vpn-instance
vpn-instance-name
N/A
3.
Enable loop detection.
loop-detect
By default, loop detection is
disabled.
After loop detection is
enabled, the device uses both
the maximum hop count and
the path vector methods to
detect loops.
4.
Set the maximum hop
count.
maxhops
hop-number
By default, the maximum hop
count is 32.
5.
Set the path vector limit.
pv-limit
pv-number
By default, the path vector
limit is 32.
Configuring LDP session protection
If two LDP peers have both a direct link and an indirect link in between, you can configure this feature
to protect their LDP session when the direct link fails.
LDP establishes both a Link Hello adjacency over the direct link and a Targeted Hello adjacency over
the indirect link with the peer. When the direct link fails, LDP deletes the Link Hello adjacency but still
maintains the Targeted Hello adjacency. In this way, the LDP session between the two peers is kept
available, and the FEC-label mappings based on this session are not deleted. When the direct link
recovers, the LDP peers do not need to re-establish the LDP session or re-learn the FEC-label
mappings.
When you enable the session protection feature, you can also specify the session protection
duration. If the Link Hello adjacency does not recover within the duration, LDP deletes the Targeted
Hello adjacency and the LDP session. If you do not specify the session protection duration, the two
peers will always maintain the LDP session over the Targeted Hello adjacency.
LDP session protection is applicable only to IPv4 networks.
To configure LDP session protection: