Choose the path with the lowest preference value (routing protocol process preference).
Prefer the path with higher local preference. For non-BGP paths, choose the path with the lowest preference2 value.
If the accumulated interior gateway protocol (AIGP) attribute is enabled, prefer the path with the lower AIGP attribute.
Prefer the path with the shortest autonomous system (AS) path value.
Prefer the route with the lower origin code. Routes learned from an IGP have a lower origin code than those learned from an exterior gateway protocol (EGP), and both have lower origin codes than incomplete routes (routes whose origin is unknown).
Prefer the path with the lowest multiple exit discriminator (MED) metric.
Prefer strictly internal paths, which include IGP routes and locally generated routes (static, direct, local, and so forth).
Prefer strictly external BGP (EBGP) paths over external paths learned through internal BGP (IBGP) sessions.
Prefer the path whose next hop is resolved through the IGP route with the lowest metric.
If both paths are external, prefer the currently active path to minimize route-flapping.
Prefer a primary route over a secondary route. A primary route is one that belongs to the routing table. A secondary route is one that is added to the routing table through an export policy.
Prefer the path from the peer with the lowest router ID. For any path with an originator ID attribute, substitute the originator ID for the router ID during router ID comparison.
Prefer the path with the shortest cluster list length. The length is 0 for no list.
Prefer the path from the peer with the lowest peer IP address.