BGP redistribution metric

Unanswered Question
Sep 4th, 2008

When redistributing protocols into BGP and using the metric command at the end, what value is that metric value. On cisco documenation, it saids its the IGP metric value, but how is that affect BGP? In other words in the decision process for BGP, how does affecting the BGP redistributed metric value change the BGP decision process for that redistributed route?

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Giuseppe Larosa Thu, 09/04/2008 - 10:30

Hello Timothy,

BGP is different then IGP protocols like OSPF, RIP or EIGRP.

BGP uses a multidimensional array of attributes to decide what is the best path for a route.

All received paths and locally generated are hosted in the BGP table and the BGP protocol uses its own hierarchy of criteria to pick up a best advertisement for each IP prefix.

IGP metric is copied in BGP MED attribute but this is not the first attribute to be examined.

Use this doc as a reference

First BGP next hop must be reachable (known in the local router IP routing table)

then comes all the other parameters:


local preference

locally originated

shortest AS path

origin of route



the BGP MED can change the decision if there is a tie on the previous parameters in the path selection algorithm, otherwise it plays no role.

Hope to help


tsmarcyes Thu, 09/04/2008 - 10:57

Basically I was wanting to know what that redistribute (IGP) metric means. So, if I set that value to lets say 100

"router bgp 1" "redistribute EIGRP 1 metric 100" is that basically setting the MED to 100?

So my question now is, if the IGP metric is copied into the BGP Med atrribute, and the decision is based on the lowest MED value, how does that work with protocols such as EIGRP where the metrics values are based on a higher metric(values-bandwidth). So if you have two places where EIGRP routes are being redistributed into BGP, and the EIGRP metrics are being copied to the MED attribute. What if you have one EIGRP route being redistribute with a 10 MB bandwidth metric and another EIGRP route being redistributed with a 1 MB metric, does the redistribution process make the actual higher metric (10 MB)a lower med value after being redistribute and the lower metric (1 MB) a higher med value?

guruprasadr Thu, 09/04/2008 - 22:49


Refer to the below sample configuration:

In this situation, the IGP is OSPF and the same is redistributed into BGP with METRIC Values.

In BGP, Prefer the path with the lowest multi-exit discriminator (MED). Here in the example, the PRY is preferred because with 0" as METRIC (by default) and SEC is SET with METRIC of 200.

If the PRY Fails, the SEC LINK would prefer. The METRIC Values that are SET while redistribution (of OSPF) are considered as MED attributes in BGP.



address-family ipv4 vrf 1000-Customer-Mesh

redistribute connected

redistribute static

redistribute ospf 111 vrf 1000-Customer-Mesh match internal external 1 external 2

no auto-summary

no synchronization


SEC Link:


address-family ipv4 vrf 1000-Customer-Mesh

redistribute connected

redistribute ospf 111 vrf 1000-Customer-Mesh metric 200 match internal external 1 external 2

no auto-summary

no synchronization


Hope I am Informative.


Best Regards,

Guru Prasad R

Giuseppe Larosa Thu, 09/04/2008 - 23:17

Hello Timothy,

sorry for my first generic answer.

>> "router bgp 1" "redistribute EIGRP 1 metric 100" is that basically setting the MED to 100?


Actually EIGRP metric is based on cumulative delay and the inverse of the lowest BW link in the path to destination.

When copying the IGP metric the calculation result will be copied and no info about what were the EIGRP metric components is retained.

You use an array of parameters BW, delay... to provide a seed metric for redistribution into EIGRP not for redistribution from EIGRP.

It is the target routing protocol that needs a seed metric to import prefixes from the source protocol.

In your case one router will advertise better paths that will be installed and used in all the provider domain iBGP.

In case of failure of that router or other events the backup paths via the second router are ready to be used.

Hope to help



This Discussion