07-06-2012 03:12 AM - edited 03-07-2019 07:37 AM
Hello,
we have a BGP Router with the full Internt Routing Table, which is connected to an internal BGP Route-Reflector and an Internet Exchange.
In the follwing output i'm wondering why the Router has elected the path via AS 20676, although it`s an internal learned Route and there's another external path:
#show ip bgp 195.160.248.0/22
BGP routing table entry for 195.160.248.0/22, version 369303261
Paths: (5 available, best #4, table default)
Not advertised to any peer
8881 34161
80.81.203.35 (metric 20) from XX.XX.XX.67 (XX.XX.XX.67)
Origin IGP, metric 90, localpref 90, valid, internal
Community: 0:174 0:1299 0:3356 0:15169 XXXX:1102 XXXX:1820 XXXX:1999 43252:43252
Originator: XX.XX.XX.82, Cluster list: 0.0.0.20
8881 34161
80.81.192.80 from 80.81.193.157 (80.81.193.157)
Origin IGP, metric 101, localpref 90, valid, external
Community: 0:174 0:1299 0:3356 0:6762 0:8391 0:8442 0:9189 0:12329 0:12355 0:12654 0:15169 0:16276 0:20633 0:21263 0:41039 6695:6695 XXXX:1105 XXXX:1810 XXXX:1999
8881 34161
80.81.192.80 from 80.81.192.157 (80.81.192.157)
Origin IGP, metric 101, localpref 90, valid, external
Community: 0:174 0:1299 0:3356 0:6762 0:8391 0:8442 0:9189 0:12329 0:12355 0:12654 0:15169 0:16276 0:20633 0:21263 0:41039 6695:6695 XXXX:1105 XXXX:1810 XXXX:1999
20676 34161
XX.XX.XX.76 (metric 2) from XX.XX.XX.66 (XX.XX.XX.66)
Origin IGP, metric 0, localpref 90, valid, internal, best
Community: XXXX:1100 XXXX:1810 XXXX:1999
Originator: XX.XX.XX.76, Cluster list: 0.0.0.20
1299 20676 20676 20676 34161
213.248.73.137 from 213.248.73.137 (80.239.146.37)
Origin IGP, localpref 80, valid, external
Community: XXXX:1000 XXXX:1810 XXXX:1999
According to http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094431.shtml,
rules 1-5 cannot be used for an best path selection, because all attributes are equal.
Rule 6 should not be relevant, because the MED are only be compared if the first AS in the path is the same. but in this case the chosen Path over AS20676 has another first AS comparing to the Path over AS8881.
Rule 7 should be the tie-breaker in this case, because the path over AS20676 is an internal route (learned via iBGP from a Route-Reflector).
The result should be, that the external learned path over AS8881 should be chosen and prefered over internal routes!!!
The Router is an 7600/SUP720 with IOS 1.2(33)SRE
07-06-2012 03:33 AM
what about forcing to compare MED:
http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094925.shtml
HTH
Alessio
07-06-2012 03:51 AM
No, that's not the main point. MEDs are not the problem in this case.
I think the router has chosen the wrong internal (iBGP) Path, although there`s an external (eBGP) path!
P.S. It`s IOS Version 12.2(33)SRE
07-06-2012 06:18 AM
Hi there,
comparing other entries, this is why it is chosen over all others.
> Origin IGP, metric 0, localpref 90, valid, internal, best
its a metric manipulation by ur adjacent AS, not supported in classic BGP though. it'll work if the AS path length is the same for all candidates, which in ur case it is. for better clarification could u post the bgp config (except the neighbor statements) here plz?
Devices usually dont mistake unless we config them to do so
HTH,
Soroush.
07-06-2012 07:40 AM
Hello,
can you explain your reply? I don't understand, what "metric manipulation by ur adjacent AS" means, because my router should follow the normal BGP Selection Process and we don't have bgp always-compare-med
configured!?
Because the router is connected to an internet exchange, the whole BGP Config is very long. The path AS20676 is learnt by another router (we set the local-preference 90 to the neighbor AS20676) and then sent to our 1st BGP Route-Reflector (XX.XX.XX.66) which sends this path to the router from the 1st post.
XX.XX.XX.67 is our 2nd Route-Reflector. Both RRs form a RR-Cluster with Cluster-ID 20
07-06-2012 08:25 AM
sometimes, ISP's under an internal agreement between each other could set a metric value for their routes that advertise to their clients, this way clients will send traffic to certain routes through a certain ISP, in case of multi-homing.
from what I see in that output, if i want to reason behind the current Best path, is [at least] using the bgp deterministic-med command in bgp configuration.
>> could u plz check that?
HTH,
Soroush.
07-06-2012 09:52 AM
No, we don't use any special bgp commands like bgp always-compare-med or bgp deterministic-med.
That's exactly the problem, because in any circumstances the router should prefer an external Path against an internal path over another AS!?
In my opinion the router must choose the path 8881 34161, because this path is shorter than
1299 20676 20676 20676 34161 and the other pathes are internal !!!
07-06-2012 10:12 AM
Ok then, in this case... the Timing of receiving these entries might be the reason behind the best path selection.
"When BGP receives multiple routes to a particular destination, it lists them in the reverse order that they were received, from the newest to the oldest. BGP then compares the routes in pairs, starting with the newest entry and moving toward the oldest entry (starting at top of the list and moving down)."
it can justify this behavior (from top to bottom we assume 1 to 5):
1 and 2: Same Local perf, AS path, Origin. since they have a same AS_path, the lower MED value [Metric 90] wins!
1 and 3: Just like 1 and 2, entry 1 Wins due to the lower MED value.
1 and 4: Same Local perf, AS path, Origin, both Internal. effective: Lowest IGP Metric to Next hop! [Metric 2], 4 is the winner.
4 and 5: Lower AS PATH. Winner is 4 ! .... 4 is the best path.
HTH,
plz Rate if it helped.
Soroush.
07-06-2012 12:22 PM
Hmm, this would be an explanation. Where did you found the quoted text?
As a conclusion, i think the bgp deterministic-med would be a good solution to configure...
07-06-2012 01:08 PM
actually it is recommended by cisco to enable deterministic med accross network.
the qouted txt is from here:
http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094925.shtml#examp
dont forget to rate useful posts, for benefit of members of the community!
HTH,
Soroush.
07-07-2012 04:10 AM
Hi there! I see something wrong in configuration what you shared it!
First of all @kfr you are right is should choose external path than Internal and MED ( metric) here is not included in our condition because here Local Perf and Weight are responsible in this condition, MED is responsible if the outside Network comes in to our AS BGP. But here in this case we want to go out from Our AS to outside AS, So MED is not included in our conditions. After that I hope to see this which is in your configuration what you pased it :
#show ip bgp 195.160.248.0/22
BGP routing table entry for 195.160.248.0/22, version 369303261
Paths: (5 available, best #4, table default)
Not advertised to any peer
Look to Not advertise to any peer, to solve this problem you have to make a clear ip bgp * soft (recommended) or clear ip bgp * all then wait a moment to get adevrtised by group. I think after that it will choose external path as Rule says.
or check the bgp neighbor and make shutdown ano no shutdown to the interfaces.
I hope this will be valuable and useful for you.
Regards,
Mohammad Said
07-07-2012 10:20 AM
Hi,
mohammad saeed wrote:
Hi there! I see something wrong in configuration what you shared it!
First of all @kfr you are right is should choose external path than Internal and MED ( metric) here is not included in our condition because here Local Perf and Weight are responsible in this condition, MED is responsible if the outside Network comes in to our AS BGP.
Mohammad, i say u r definitely wrong. could u plz post the reference u used about this MED's responsibility?
HTH,
Soroush.
07-07-2012 10:31 AM
MED use for outside in othere meaning, If you want to Let the outside AS comes to your AS here is you should use MED or AS prepeneded,. But here in this case we want our AS to go out to another AS so MED here it is not working to control the path.
MED give our network specific metric to the outside AS if it is come back. this is common scense in BGP!
to apply metric ( neighbor x.x.x.x route-map xxxx out)
and also look to this scentence in the first of configuration : Not advertised to any peer
which means there is not complete advertising between peers,!!!
may be someone changed the local preference the make Clear command but he didn't wait enough time or there is a problem with connectivity!!
07-07-2012 11:14 AM
MED application has two sides to be considered, to influence and to be influenced by:
* from the upstream AS view, MED gives u the ability to influence path selection of other ASes in certain situations.
* from the downstream AS view, the path with the lower MED could be the best path, depending on ther criterias, here we are the downstream.
but here the MED is not the problem, if u read my previous posts here.
the sentence "Not advertised to any peer" is there because this router is a route reflector client, so it wont advertise this route.
btw, reason behind this selection is cleared, if u read previous posts.
HTH,
Soroush.
07-07-2012 11:22 AM
Hello Soroush,
you have done a very good job on this thread and I agree you have found an answer to the issue presented by the original poster.
The link you have provided is helpful and it deserves a good rating.
Go on this way!
Best Regards
Giuseppe
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