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.
device# configure
device(config)# router mpls
device(config-router-mpls)# lsp tunnel1
device(config-router-mpls-lsp-tunnel1)# hop-limit 20
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