Limiting the Number of Hops the LSP Can Traverse

By default, the path calculated by CSPF can consist of no more than 255 hops, including the ingress and egress LERs. The user can optionally change this maximum to a lower number.

To limit CSPF to choosing a path consisting of no more than 20 hops for LSP tunnel1, complete the following steps.
  1. Enable the device for configuration.
    device# configure
  2. Enable the MPLS router.
    device(config)# router mpls
  3. Enable and configure the label switched path (LSP).
    device(config-router-mpls)# lsp tunnel1
    In this example, the selected LSP is named tunnel1 .
  4. Configure the limit number of hop the LSP can traverse.
    device(config-router-mpls-lsp-tunnel1)# hop-limit 20
    In this example the hop-limit is set to 20.

Example

the following example limits the CSPF to choosing a path of no more than 20 hops for LSP tunnel1.

device# configure terminal
device(config)# router mpls
device(config-router-mpls)# lsp tunnel1
device(config-router-mpls-lsp-tunnel1)# hop-limit 20