8.8 Issue with Using Private AS Numbers
8.8.10 The BGP decision process
BGP bases its decision process on the attribute values. When faced with multiple routes to the same destination, BGP chooses the best route for routing traffic toward the destination. The following process summarizes how BGP chooses the best route.
  1. If the next hop is inaccessible, the route is ignored (this is why it is important to have an IGP route to the next hop).
  2. Prefer the path with the largest weight (weight is a Cisco proprietary parameter).
  3. If the weights are the same, prefer the route with the largest local preference.
  4. If the routes have the same local preference, prefer the route that was locally originated (originated by this router).
  5. If the local preference is the same, prefer the route with the shortest AS_path.
  6. If the AS_path length is the same, prefer the route with the lowest origin type (where IGP is lower than EGP, and EGP is lower than INCOMPLETE).
  7. If the origin type is the same, prefer the route with the lowest MED.
  8. If the routes have the same MED, prefer the route in the following manner: External (EBGP) is better than confederation external, which is better than IBGP.
  9. If all the preceding scenarios are identical, prefer the route that can be reached via the closest IGP neighbor-that is, take the shortest internal path inside the AS to reach the destination (follow the shortest path to the BGP NEXT_HOP).
  10. If the internal path is the same, the BGP router ID will be a tie breaker. Prefer the route coming from the BGP router with the lowest router ID.
  11. The router ID is usually the highest IP address on the router or the loopback (virtual) address. The router ID could be implementation specific.