BGP best path selection, without the mnemonic panic
Every CCNP candidate has met the list — the eleven-ish steps BGP walks through to pick a best path. Most people memorize a mnemonic, panic in the lab, and forget it by dinner. Let's fix that by understanding what the steps are actually for.
The steps that matter in practice
In real networks, the overwhelming majority of best-path decisions are settled by the first four comparisons:
- Weight — Cisco-local, not exchanged. Your router's personal opinion.
- Local preference — how your AS prefers to exit. Set it at the edge, respected everywhere inside.
- Locally originated — routes you injected yourself win over learned ones.
- AS path length — the closest thing BGP has to a metric.
Everything after that — origin code, MED, eBGP over iBGP, IGP metric to the next hop, and the tiebreakers down to router ID — exists to break ties when the policy knobs above were never touched.
Watch the decision happen
R1# show ip bgp 203.0.113.0/24
BGP routing table entry for 203.0.113.0/24, version 42
Paths: (2 available, best #2, table default)
65002 65010
10.1.12.2 from 10.1.12.2 (2.2.2.2)
Origin IGP, localpref 100, valid, external
65003 65010
10.1.13.3 from 10.1.13.3 (3.3.3.3)
Origin IGP, localpref 200, valid, external, best
Both paths have the same AS path length, but the second one carries a local preference of 200 — so the comparison never even reaches AS path. That's the pattern to internalize: the decision process stops at the first difference.
How to study this for the lab
- Build two exits from your AS and manipulate one attribute at a time.
- Predict the winner before you check
show ip bgp. - When you're wrong, that's the good part — figure out which earlier step you forgot.
Rule of thumb: if you're manipulating outbound traffic, think local preference. If you're influencing inbound traffic, think AS path prepending or MED — and accept that the neighbor AS gets the final vote.
We'll cover each attribute in its own post, with full labs. BGP rewards patience more than any other protocol on the blueprint.