Configure BGP shortcuts using next-hop MPLS for BGP to use IGP metrics of the next hop instead of using LSP 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.
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
device(config-bgp)# show ip bgp next-hop
safi : BGP UNICAST SAFI Type Codes - B:BGP D:Connected I:ISIS L:Local O:OSPF R:RIP S:Static OSPF Codes - i:Internal 1:External Type 1 2:External Type 2 Next Hop Type Cost ResolveSchema Router IP Port
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