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

BGP Path Selection Process

Hi,

I would like to find out how does my router built up it best path. From the router itself, what command must i type to check on the following attribute in the bgp path selection .

Network Next Hop Metric LocPrf Weight Path

*>i61.30.96.0/25 203.208.174.86 100 0 19440 64686 i

* i 193.108.27.38 100 0 19440 64686 i

* i 193.108.27.38 100 0 19440 64686 i

Summary of the BGP Path Selection Process

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.

9. If the paths are still the same, prefer the path through the closest IGP neighbor.

10. Prefer the path with the lowest IP address, as specified by the BGP router ID.

1 REPLY

Re: BGP Path Selection Process

Network Next Hop Metric LocPrf Weight Path

*>i61.30.96.0/25 203.208.174.86 100 0 19440 64686 i

* i 193.108.27.38 100 0 19440 64686 i

* i 193.108.27.38 100 0 19440 64686 i

Looking at this table, you are getting 61.30.96.0/25 from all the 3 listed next-hops. Ofcourse these are reachable and hence all 3 routes are there in the BGP table. As you might see, Rules 2 through 8 are not valid, as all attributes look the same.

I think the first route via 203.208.174.86 was selected, based on rule 9, where the lowest cost to the IGP neighbor is considered. Note that all 3 routes are IBGP routes, indicated by the first "i" against each route at the left hand corner of each routing entry. So the router has decided to use 203.208.174.86 based on the rule of smallest cost to reach the IBGP neighbors.

I dont think this route was selected because of rule 10, because, if that was the case, the one with lowest router id should have been used.

What you need to do, is on your routing table, check which neighbor (whether 193.108.27.38 or 203.208.174.86) is nearest (cost wise) to this router).

Hope that helps

94
Views
0
Helpful
1
Replies
CreatePlease login to create content