Locations of visitors to this page Perfect dream will never let you sleep in peace...untill you make it real: BGP Best path selection

Sunday, May 1, 2011

BGP Best path selection


The following process summarizes how BGP chooses the best route on a Cisco router.

1> Prefer the route with the highest weight. (The weight attribute is proprietary to Cisco and is local to the router only.)
2> If multiple routes have the same weight, prefer the route with the highest local preference
value. (The local preference is used within an autonomous system.)

3>If multiple routes have the same local preference, prefer the route that the local router originated. A locally originated route has a next hop of 0.0.0.0 in the BGP table.

4>If none of the routes were locally originated, prefer the route with the shortest autonomous system path.

5>If the autonomous system path length is the same, prefer the lowest origin code (IGP < EGP < incomplete).

6> If all origin codes are the same, prefer the path with the lowest MED. (The MED is exchanged between autonomous systems.) The MED comparison is made only if the neighboring autonomous system is the same for all routes considered, unless the bgp always-compare-med command is enabled

7>If the routes have the same MED, prefer external paths to internal paths. If synchronization is disabled and only internal paths remain, prefer the path through the closest IGP neighbor, which means that the router
prefers the shortest internal path within the autonomous system to reach the destination (the
shortest path to the BGP next hop).

8>For EBGP paths, select the oldest route to minimize the effect of routes going up and down (flapping).
9>Prefer the route with the lowest neighbor BGP router ID value.

10>If the BGP router IDs are the same, prefer the router with the lowest neighbor IP address.--->this will for sure break the tie

No comments:

Post a Comment