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
Repeat this step for additional remote neighbors, as required.
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
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