BGP Path Selection Criteria

BGP Path Selection Criteria
BGP tries to narrow its path selection down to one best path; it does not load
balance by default. To do so, it examines the path attributes of any loop-free,
synchronized (if synchronization is enabled) routes with a reachable nexthop
in the following order:
1. Choose the route with the highest weight.
2. If weight is not set, choose the route with the highest local preference.
3. Choose routes that you advertise.
4. Choose the path with the shortest autonomous system path.
5. Choose the path with the lowest origin code (i is lowest, e is next, ? is
last).
6. Choose the route with the lowest MED, if the same autonomous
system advertises the possible routes.
7. Choose an eBGP route over an iBGP route.
8. Choose the route through the nearest IGP neighbor.
9. Choose the oldest route.
10. Choose a path through the neighbor with the lowest router ID.
11. Choose a path through the neighbor with the lowest IP address.
To enable BGP to load balance over more than one path, you must enter the
command maximum-paths number-of-paths. BGP can load balance over a
maximum of six paths.