Emergency server help: get in touch

BGP Best Path Selection Simulator

Enter the attributes of two to four BGP paths and see, step by step in Cisco IOS order, which path wins and which attribute decided, with options such as always-compare-med.

Where it runs
Runs in your browser
Last updated
October 12, 2026

This BGP best path simulator walks two to four paths for the same prefix through the Cisco IOS best-path algorithm and shows which step decided the winner. It runs entirely in your browser: nothing you type is sent to our server.

Loading the tool… It runs in your browser and needs JavaScript.

The order of the steps

  1. Highest weight (Cisco only, local to the router)
  2. Highest local preference
  3. Locally originated routes
  4. Shortest AS path
  5. Lowest origin (IGP, then EGP, then incomplete)
  6. Lowest MED (only between paths from the same neighbouring AS, unless always-compare-med)
  7. eBGP over iBGP
  8. Lowest IGP metric to the next hop
  9. Lowest router ID
  10. Shortest cluster list
  11. Lowest neighbour address

Why MED surprises people

By default MED is only compared between paths from the same neighbouring AS, so a lower MED from a different provider does nothing. A path without MED counts as 0 (the best) unless you set bgp bestpath med missing-as-worst. The simulator lets you toggle both.

Not modelled: next-hop reachability, AIGP, multipath, the oldest-eBGP-path rule and deterministic-MED grouping. Use it to understand and plan, then confirm with show ip bgp PREFIX.

How we checked it

We checked the simulator on 11-12 October 2026 with sample paths where the decision falls at AS path length, eBGP over iBGP and MED (with and without always-compare-med).

Frequently asked questions

What is the first step in BGP best path selection?

On Cisco, highest weight. Weight is local to the router. The first standard attribute is local preference.

Why is MED ignored?

Because the paths come from different neighbouring ASes. Enable bgp always-compare-med to compare them anyway.

Does a shorter AS path always win?

Only if weight, local preference and local origination are equal; those steps come first.

Share this tool

Free website test

Is your website set up right?

Check SSL, security headers, redirects, robots.txt, sitemap, llms.txt and security.txt in one test. It takes about 30 seconds.