Configuring BGP shortcuts using next-hop MPLS with Follow-IGP metrics

When combined with the BGP install-igp-cost command, you can change the route cost from BGP MED to IGP cost and is used when BGP routes are added to the RIB Manager.

A route map is required to set the BGP MED value to the IGP metric by the set metric-type internal command. When combined with a BGP outbound policy for route set metric-type internal command, you can set IP over MPLS routes using IGP metric to send out as the BGP MED value.

To configure BGP shortcuts using next-hop MPLS with IGP metrics, perform the following steps.

  1. In privileged EXEC mode, enter global configuration mode.
    device# configure terminal
    
  2. Enable BGP routing.
    device(config)# router bgp
    
  3. Enter the local-as command to configure the autonomous system number (ASN) in which your device resides.
    device(config-bgp-router)# local-as 10
    
  4. Enter the neighbor remote-as command to configure the ASN for a remote neighbor.
    device(config-bgp-router)# neighbor 10.1.1.2 remote-as 20

    Repeat this step for additional remote neighbors, as required.

  5. Enter the address-family unicast command using the ipv4 parameter to enter BGP address-family IPv4 unicast configuration mode.
    device(config-bgp-router)# address-family ipv4 unicast
    
  6. Enable next-hop MPLS with the IGP metric option to use IGP metrics instead of LSP metrics.
    device(config-bgp-ipv4u)# next-hop-mpls follow-igp
    
  7. Exit address family configuration mode.
    device(config-bgp-ipv4u)# Ctrl-z
    
  8. Verify the configuration.
    device(config-bgp)# show ip bgp next-hop
    The show ip bgp next-hop command allows you to check BGP next hop resolution and the IGP cost for the next hop.

The following configuration is an example of the previous steps.

In this example, next-hop MPLS is enabled with the follow-igp option.

device# configure terminal
device(config)# router bgp
device(config-bgp-router)# local-as 10
device(config-bgp-router)# neighbor 10.1.1.2 remote-as 20
device(config-bgp-router)# neighbor 10.10.1.2 remote-as 20
device(config-bgp-router)# address-family ipv4 unicast
device(config-bgp-ipv4u)# next-hop-mpls follow-igp
device(config-bgp-ipv4u)# Ctrl-z