Menu

BGP Best Path Selection Algorithm

How BGP chooses the best path among multiple routes to the same prefix.

BGP evaluates a strict, ordered list of attributes to select a single best path when multiple routes exist for the same prefix.

  1. Highest Weight (Cisco-proprietary, local to the router)
  2. Highest Local Preference
  3. Locally originated routes preferred
  4. Shortest AS Path
  5. Lowest Origin type (IGP < EGP < Incomplete)
  6. Lowest MED
  7. eBGP paths preferred over iBGP
  8. Lowest IGP metric to the BGP next hop

Understanding this order is essential for traffic engineering decisions in multi-homed environments.

Related Links