CiscoTools.dev

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 Explainer

What it does

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 ) and the fixed-column table format both parse. A table covering several prefixes is grouped per prefix, and the selection runs on the one carrying the best marker.

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.