BGP Path Selection Explained: How the Best Route Wins
When BGP knows several paths to the same destination, it picks one using a strict ordered list of attributes. The first few decide most real cases: highest weight (Cisco-local), then highest local preference, then locally originated, then shortest AS-path.
The top of the decision list
- Weight — Cisco-proprietary, local to the router; highest wins.
- Local preference — shared across your AS; highest wins (controls outbound path).
- Locally originated routes preferred.
- Shortest AS-path — fewer autonomous systems to cross.
- Lowest origin, lowest MED, eBGP over iBGP… and further tie-breakers.
Why it matters
BGP runs the internet, so controlling path selection is how ISPs and enterprises steer traffic and enforce policy. Weight and local preference are the everyday tools; AS-path prepending is a common trick to make a path look worse. This is central CCNP ENARSI and CCIE material — grounded in the BGP basics.
Frequently asked questions
What is the first attribute BGP checks?
Weight — a Cisco-proprietary value local to the router. The highest weight wins before any other attribute is considered.
What is the difference between weight and local preference?
Weight is local to a single router (not advertised); local preference is shared across all routers in an AS and influences the whole AS's outbound path choice.
How do you make BGP prefer one path?
Commonly by raising weight or local preference on the preferred path, or by AS-path prepending to make alternative paths look longer/worse.
Related articles
Want hands-on training?
Learn this on real Cisco lab devices with placement support at Attila Technologies, Ahmedabad.