BGP path selection
BGP path selection
Remember,
WEIGHT is a Cisco proprietary attribute, is not forwarded to any peers, and only applies to
the local router.
Step 2. If the WEIGHT attributes are equal, select the path with the largest LOCAL_PREF
value (ranging from 0 to 4,294,967,295).
Step 3. If the WEIGHT and LOCAL_PREF values are equal, select the path that originated
from the local router, either by local configuration or redistribution.
Step 4. If the WEIGHT, LOCAL_PREF, and local origination of the route are equal, select
the route with the shortest AS_PATH.
Step 5. If all the previous attributes are equal, select the path with the most desirable
ORIGIN. Remember, IGP is preferred, and EGP is considered before Incomplete.
Step 6. If the previous attributes are equal and there is more than one exit path to a
network, prefer the path with the lowest MED value (ranging from 0 to 4,294,967,295).
Step 7. If the MED value is equal or not used, prefer E-BGP paths to I-BGP paths.
Step 8. If both paths are E-BGP (or both paths are not E-BGP), prefer the path with the
lowest IGP metric.
If BGP multipath is enabled, and there are multiple external or confederation-external
paths from the same neighboring AS or sub-AS, multiple paths are added to the Loc-RIB
table at this point. The oldest path is considered the best path when forwarding updates to
other routers.
Step 9. If the paths are external, select the oldest path (the path that was received first).
Step 10. If the paths were received at the same time, prefer the path that came from the
peer with the lowest BGP-ID.
Step 11. If the route was received from a route reflector, select the path with the lowest
CLUSTER_ID (BGP_ID of the route reflector) length.
Step 12. If the path was received from the same host, either peer or route reflector, select
the path that came from the neighbor with the lowest peer IP address (the address of the
directly [or nearest indirectly connected if not directly connected]) connected interface.