08-04-2004 09:09 AM - edited 03-02-2019 05:32 PM
This is a part of the show ip bgp command output:
mfr-3662#sh ip bgp
BGP table version is 23451883, local router ID is x.x.x.x
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
* 6.1.0.0/16 65.121.100.200 26000 0 209 701 668 i
*> 144.228.200.51 11 0 1239 701 668 i
* 6.2.0.0/22 65.121.100.200 26000 0 209 701 668 i
*> 144.228.200.51 11 0 1239 701 668 i
* 6.3.0.0/18 65.121.100.200 26000 0 209 701 668 i
*> 144.228.200.51 11 0 1239 701 668 i
It seems that the path selection decision is made based on the lower "Metric" that Sprint routes have.
What is the "Metric" and how is it calculated?
Thanks,
Gabi
08-04-2004 10:22 AM
See the following URL. There is a lot of determining factors that are involved in choosing the best BGP metric to use, depending on IBGP,EBGP, AS_PATH, etc.
http://www.cisco.com/en/US/tech/tk365/tk207/technologies_tech_note09186a0080094823.shtml
08-04-2004 12:58 PM
I know the BGP path selection is made on the attributes but no information I could found if these attributes are used to calculate the metric or not. In this case the customer did not change the local pref. or the weight and it looks that the path is the same. My question is how is the metric calculated? Does it have any relevance in the routing decision?
Thanks,
08-04-2004 03:41 PM
Metric means MED in this case; lower MEDs are preferred. If you're receiving non-default (i.e., non-zero) MED values from providers, it's because the providers are calculating them internally somehow and sending them to you along with the routes themselves. You can use an inbound routing policy to zero them out, if you'd like.
Note however that MEDs aren't typically compared from different AS's, which would prevent them from coming into play in your case. (The "bgp always-compare-med" command overrides this.) So it could be router ID that is breaking the tie here.
08-05-2004 10:17 AM
Thanks for your reply. Is it any way to find out what are the two router Id's for the two providers or see a routing update that comes from both to learn more about why the selection is done in this way? Is it possible to config BGP so it would not look at the router Id's?
Thanks, Gabi
08-05-2004 01:27 PM
"show ip bgp neighbors
See http://www.cisco.com/en/US/tech/tk365/tk80/technologies_tech_note09186a0080094431.shtml for some more information. It turns out that router-ID is ignored by default; I had forgotten about this. The reason the routes from Sprint are preferred in your case may simply be that you're receiving them before you receive the routes from Qwest. I can't recall if there's a command that will spell out for you why a particular route was or wasn't chosen -- someone else here may know. (Juniper makes this easy, but I don't recall having ever done it on a Cisco.) But a "show ip bgp
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide