BGP : Route selection process

Consider only (synchronized) routes with no AS loops and a valid next hop and then:
1. Prefer highest weight - local to router
2. Prefer highest local preference - global within AS
3. Prefer route originated by the local router (next hop=0.0.0.0)
4. Prefer shortest AS path
5. Prefer lowest origin code (IGP