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.
- Highest Weight (Cisco-proprietary, local to the router)
- Highest Local Preference
- Locally originated routes preferred
- Shortest AS Path
- Lowest Origin type (IGP < EGP < Incomplete)
- Lowest MED
- eBGP paths preferred over iBGP
- Lowest IGP metric to the BGP next hop
Understanding this order is essential for traffic engineering decisions in multi-homed environments.