BGP route selection
BGP discards routes with unreachable NEXT_HOPs. If multiple routes to the same destination are available, BGP selects the best route in the following sequence:
The route with the highest Preferred_value.
The route with the highest LOCAL_PREF.
The route generated by the network command, the route redistributed by the import-route command, or the summary route in turn.
The route with the shortest AS_PATH.
The IGP, EGP, or INCOMPLETE route in turn.
The route with the lowest MED value.
The route learned from EBGP, confederation EBGP, confederation IBGP, or IBGP in turn.
The route with the smallest next hop metric.
The route with the shortest CLUSTER_LIST.
The route with the smallest ORIGINATOR_ID.
The route advertised by the router with the smallest router ID.
The route advertised by the peer with the lowest IP address.
The CLUSTER_IDs of route reflectors form a CLUSTER_LIST. If a route reflector receives a route that contains its own CLUSTER ID in the CLUSTER_LIST, the router discards the route to avoid routing loops.
If load balancing is configured, the system selects available routes to implement load balancing.