maxhops

Use maxhops to set the maximum hop count for loop detection.

Use undo maxhops to restore the default.

Syntax

maxhops hop-number

undo maxhops

Default

The maximum hop count for loop detection is 32.

Views

LDP view

LDP-VPN instance view

Predefined user roles

network-admin

Parameters

hop-number: Specifies the maximum hop count for loop detection, in the range of 1 to 32.

Usage guidelines

LDP adds a hop count in a label request or label mapping message. The hop count increments by 1 on each LSR. When the hop count reaches the maximum hop count configured by this command, LDP considers that a loop occurs and terminates LSP establishment.

Set a proper maximum hop count according to the number of LSRs in your network. For example, set a smaller maximum hop count in small networks to allow for fast loop detection. Set a higher maximum hop count in large networks to ensure that LSPs can be successfully established.

The configuration of this command takes effect only on new LDP sessions. To apply the configuration to existing LDP sessions, you must reset the LDP sessions by using the reset mpls ldp command.

Examples

# Set the maximum hop count to 25 for loop detection on the public network.

<Sysname> system-view
[Sysname] mpls ldp
[Sysname-ldp] maxhops 25

Related commands

display mpls ldp parameter

loop-detect

pv-limit