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
Leaf-3# sh ip bgp nexthop safi : BGP UNICAST SAFI Type Codes - B:BGP D:Connected I:ISIS L:Local O:OSPF S:Static L:MPLS M:MCAST U:Unnumbered OSPF Codes - i:Internal 1:External Type 1 2:External Type 2 Next Hop Type Cost ResolveSchema Router IP Port 173.168.10.1 Oi 2 IPv4/6 70.70.70.1 Eth 0/6 173.168.10.1 B 1 MPLS IPv4 0.0.0.0 Lsp 15 175.168.10.1 Oi 2 IPv4/6 70.70.70.1 Eth 0/6 175.168.10.1 B 1 MPLS IPv4 0.0.0.0 Lsp 13
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