Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Is there any wrong with bgp route selection process?

According to the books,. bgp uses the following criteria, in the order presented, to select a path for a destination:

1. If the path specifies a next hop that is inaccessible, drop the update.

2. Prefer the path with the largest weight.

3. If the weights are the same, prefer the path with the largest local preference.

4. If the local preferences are the same, prefer the path that was originated by BGP running on this router.

5. If no route was originated, prefer the route that has the shortest AS_path.

6. If all paths have the same AS_path length, prefer the path with the lowest origin type (where IGP is lower than EGP, and EGP is lower than Incomplete).

7. If the origin codes are the same, prefer the path with the lowest MED attribute.

8. If the paths have the same MED, prefer the external path over the internal path.

But i think that the the eighth factor should be the first factor to be concerned.

Because the administrative distance of ebgp is 20,while ibgp is 200,so if two routes have different distance,cisco router alway choose the lower administrative distance path and pay no attention to anything else.So am i right?

2 REPLIES
New Member

Re: Is there any wrong with bgp route selection process?

You are correct that the administrative distance will be considered.

However, if routes are learned from two different routers from the same AS, both routes will be EBGP routes with Admin Distance 20. This will be true even though one of the routes was "learned" via IBGP. My understanding is the only ways to have a BGP route marked IBGP if it were redistributed from the IGP, or the route was marked "backdoor".

The other point is the table you reference is the decision tree to insert routes into the routing table from the BGP table, not how the routing table orders / evaluates the route.

In no event will any route be inserted into the route table without a valid next hop.

The order would be #1, Admin Distance, #2-8.

My understanding of #8: the packet comes into one of the BGP routers attached to another AS (AS B). If everything else is the same, send it to AS B rather than the other router in your AS that is attached to AS B. Doing otherwise would create a routing loop.

Hope this helps;

Doug

New Member

Re: Is there any wrong with bgp route selection process?

I agree with you that administrative distance be considered in bgp selecting path. however, It has been put into low power of the eight classes.

The eighth is equal to administrative distance. for example, you received two routes for the same destination from two edge routers and do "show ip bgp" in one router, you'll find the route with high local-preference is preferred than the other one even if it's a IBGP route.

249
Views
0
Helpful
2
Replies
CreatePlease login to create content