Since each distinct prefix is a unique destination, BGP will select and advertise only a single best path. To decide which is the 'best path', BGP uses an extensive tie-breaking algorithm. At each step, BGP seeks to break a tie between metrics. The selection process ends at the point where a tie between routes is broken by a better metric. The metrics used are as follows:
BEST PATH ALGORITHM
- The first path received is automatically the 'best path'. Any further paths received are compared to this path to determine if the new path is 'best'.
- Is the route VALID? To be valid:
- The route must be synchronized with the Interior Gateway Protocol (unless synchronization is turned off).
- The route must appear in the IP routing table (see previous bullet point).
- The NEXT_HOP must be reachable.
- The AS_PATHs received from an external AS must not contain the local AS, or they will be discarded.
- The local routing policy must permit the route. If the neighbor is filtering the route, they won't use it.
Weight is a Cisco-proprietary setting and only exists on the router on which it is configured. It is otherwise useless throughout an AS.
IGP < EGP < INCOMPLETE
The Cisco router ID is IP address of the router, which in turn is the highest IP address on the router, or its Loopback Interface if it has one.
From this list, you can see it is impossible for two BGP routes to TIE each other and become equally preferred. As has been stated elsewhere in this site, BGP contains only a single best path to any given destination. BGP runs across the entire Internet, therefore it must manage to reduce the number of advertised routes in order to prevent the Internet from becoming flooded with route advertisement traffic. Thus, this algorithm is designed to eliminate all but 1 route to a destination.