Wednesday 13 February 2008

BGP Route Selection

If a router has some routes to reach a prefixes ( the same network and mask ), it has to select one of the routes as best route. For example :


The '>' sign in the left indicate that the route is the best path from the router.
*> 12.123.1.236 0 7018 701 703 80 i

Router uses the BGP attributes to select which route is the best path. The steps of selection process are :
  • next-hop attribute is reachable
  • prefer route with highest weight (local to router)
  • prefer route with highest local preference (global within AS)
  • Prefer route that the router originated
  • prefer route with the shortest AS path
  • prefer route with lowest origin code
  • prefer route with lowest MED
  • prefer external route (EBGP) over internal route (IBGP)

If all routes have the same BGP attributes ( all routes are equally good ), router will checks the BGP sessions on which it received the updates and chooses the route that was received from the router which has the lowest BGP router-ID.

No comments: