next-hop-mpls

Configures BGP shortcuts using next-hop MPLS to force BGP to use an MPLS tunnel as the preferred route to a destination network when an MPLS LSP tunnel is available.

Syntax

next-hop-mpls [ compare-lsp-metric | follow-igp ]
no next-hop-mpls [ compare-lsp-metric | follow-igp ]

Command Default

BGP uses the default BGP decision process and native IP forwarding to build BGP EMCP routes. Only IP routing tables are used to resolve routes for the routing table.

Parameters

compare-lsp-metric
Enables BGP to compare the configured LSP metrics as the IGP cost for the next hop.
follow-igp
Ignores the MPLS metric cost in the BGP decision process and uses the IGP cost. BGP checks when an MPLS LSP is present, and totally ignores the LSP metric.

Modes

BGP address-family IPv4 unicast configuration mode

Usage Guidelines

When the next-hop-mpls command is enabled without either option, BGP sets the LSP metrics to one.

Enabling or disabling an option takes effect immediately. BGP automatically recalculates the existing BGP routes.

The compare-lsp-metric and follow-igp options are mutually exclusive.

When the compare-lsp-metric option is configured and you change the LSP metric, the routing table is updated.

Use the no form of the command to disable global next-hop MPLS.

When you use the no form of the command with the compare-lsp-metric or follow-igp option, all LSP metrics become equal cost. However, global next-hop MPLS remains enabled.

For the follow-igp option, consider the following:

MPLS is supported only on devices based on the DNX chipset family. For a list of such devices, see "Supported Hardware".

Examples

The following example enables BGP shortcuts through next-hop MPLS and BGP to set the next hop IGP cost to one instead of the actual LSP metric.

device# configure terminal
device(config)# router bgp
device(config-bgp-router)# address-family ipv4 unicast
device(config-bgp-ipv4u)# next-hop-mpls

The following example enables BGP shortcuts through next-hop MPLS and BGP to use the configured LSP metrics as the IGP cost for the next hop.

device# configure terminal
device(config)# router bgp
device(config-bgp-router)# address-family ipv4 unicast
device(config-bgp-ipv4u)# next-hop-mpls compare-lsp-metric

The following example enables BGP shortcuts through next-hop MPLS and BGP to ignore the LSP metrics and to use the IGP cost for the next hop.

device# configure terminal
device(config)# router bgp
device(config-bgp-router)# address-family ipv4 unicast
device(config-bgp-ipv4u)# next-hop-mpls follow-igp