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.
- 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).
- Prefer the path with the largest
weight (weight is a Cisco proprietary parameter).
- If the weights are the same,
prefer the route with the largest local preference.
- If the routes have the same local
preference, prefer the route that was locally originated
(originated by this router).
- If the local preference is the
same, prefer the route with the shortest AS_path.
- 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).
- If the origin type is the same,
prefer the route with the lowest MED.
- 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.
- 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).
- 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.
- The router ID is usually the
highest IP address on the router or the loopback (virtual)
address. The router ID could be implementation specific.
|