Following are the steps that a BGP router takes when determining which path is the preferred to a destination. After a BGP path criterion has been selected, the path selection process ends for that session.
1. Verify that the next hop is accessible.
2. (Internal Paths Only) If synchronization is enabled, the route must exist in the IGP to be selected.
3. (Cisco Proprietary) Use the path with the largest weight because the weight gives the path preference.
4. If routes have identical weights, use the route with the highest local preference.
5. If routes have identical local preference, use the route that the local router originated.
6. If no route was originated, use the shorter AS path.
7. If AS paths are the identical length, choose the external path over an internal path.
8. If all routes are external, use the route with the lowest origin code.
9. If the origin codes are the same and the paths came from the same AS, use the path with the lowest MULTI_EXIT_DISC (MED) attribute.
10.The EBGP path holds preference over the IBGP path. 11.Select the shortest path within the AS (the lowest IGP metric).
12.If multipath (Cisco IOS "maximum-path") is enabled, then multiple paths can be inserted into the routing table, if both (or all) paths are external routes and originated from the same autonomous system. 13.Use the route with the lowest IP address value for the BGP Router ID (RID). 14.If IGP is disabled and only internal paths are left, use the path through the closest neighbor.
Was this article helpful?