Hi Dear,
There are the steps of route selection in BGP
The Route Selection Process
1. The Next Hop attribute value for each route must be reachable in the local routing table;
otherwise, the local router discards the route.
2. The router selects the route with the highest Local Preference attribute value.
3. The router selects the route with the shortest AS Path length.
4. The router selects the route with the smallest Origin attribute value.
5. The router selects the route with the smallest Multiple Exit Discriminator attribute value.
This step is executed, by default, only for routes from the same neighboring AS.
6. The router selects routes learned from an EBGP peer over routes learned from an IBGP
peer. If the remaining routes are all EBGP-learned routes, the router skips to step 9.
7. The router selects the route with the smallest IGP metric to the advertised BGP Next Hop.
8. If Route Reflection is used for IBGP peering, the router selects the route with the shortest
Cluster-List length.
9. The router selects the route from the peer with the smallest numerical Router ID.
10. The router selects the route from the peer with the smallest numerical Peer Address.
- So the route will be selected based on Router ID if there is it reached to step no. 9 in the evaluation in both scenario.
Thanks,
Mohamed Elhariry
JNCIE-M/T # 1059, CCNP & CCIP