This site requires JavaScript for navigation. Please enable JavaScript for the best learning experience.

BGP selects a single best path to a destination, and inserts it in the IP routing table. IP datagrams are only forwarded based on routes in the IP table, NOT by the routes in the BGP table.

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:


  1. 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'.
  2. 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.
  3. Highest WEIGHT
    Weight is a Cisco-proprietary setting and only exists on the router on which it is configured. It is otherwise useless throughout an AS.
  4. Highest LOCAL_PREF (used within an AS)
  5. Prefer LOCALLY ORIGINATED route (originated from this router)
  6. Shortest AS-PATH
  7. Lowest ORIGIN type:
  9. Prefer eBGP route over iBGP route
  10. Lowest IGP metric to BGP NEXT_HOP
  11. Prefer FIRST RECEIVED EXTERNAL ROUTE (prefer the OLDEST external PATH)
  12. Prefer lowest router ID
    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.
  13. Minimum CLUSTER_ID length
  14. Lowest neighbor address

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.


Bookmark this page and SHARE:  


Support InetDaemon.Com

Get Tutorials in your INBOX!

Free Training