BGP Best-Path Explainer
Cisco IOS keeps every path it learns for a prefix, then runs an ordered list of tiebreakers to pick exactly one best path: highest weight, highest LOCAL_PREF, locally originated, shortest AS_PATH, lowest origin code, lowest MED, eBGP over iBGP, lowest IGP metric to the next hop, oldest eBGP path, then lowest router ID, then finally lowest neighbor address. Edit the candidate paths by hand (up to six), load one of five preset scenarios, or paste real show ip bgp output, then step through the walkthrough one rule at a time and watch paths get eliminated with the exact reason each one lost.
Open the ExplainerWhat it does
- All eleven IOS best-path rules, run in order, exactly as the router runs them
- Edit paths by hand or paste show ip bgp output (detail or table format)
- Five preset scenarios, each decided by a different rule
- Step-by-step walkthrough: eliminations, reasons, and a rulebook progress bar
- Winner card with a synthetic show ip bgp block showing the decided path
- Ties and unknown values are reported honestly, never guessed at
Frequently asked
What order does it run the rules in?
The IOS order: highest weight, highest LOCAL_PREF, locally originated, shortest AS_PATH, lowest origin code, lowest MED (compared only within the same neighboring AS), eBGP over iBGP, lowest IGP metric to the next hop, oldest eBGP path, then lowest router ID.
Can I paste real show ip bgp output?
Yes. Per-prefix detail output (show ip bgp
What happens to fields show ip bgp doesn't print?
IGP metric on eBGP paths, router IDs from the table format, and path age never appear in show ip bgp output. They're left unknown, shown as a question mark, and called out on the rule where they'd matter, rather than guessed at. Weight and MED that IOS itself defaults are filled in and the parse status says so.