Networking Tutorials

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

  1. Weight — Cisco-proprietary, local to the router; highest wins.
  2. Local preference — shared across your AS; highest wins (controls outbound path).
  3. Locally originated routes preferred.
  4. Shortest AS-path — fewer autonomous systems to cross.
  5. 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.

VS
Vipul Sir — Lead Instructor, Attila Technologies20+ years in Cisco networking. Teaching CCNA, CCNP, CCIE & CyberOps in Ahmedabad since 2004.

Want hands-on training?

Learn this on real Cisco lab devices with placement support at Attila Technologies, Ahmedabad.

Start your networking career with Attila Technologies

Hands-on Cisco training, real lab devices and placement support in Ahmedabad.