BGP Best Path Selection

Border Gateway Protocol (BGP) routers typically receive multiple paths to the same destination. The BGP best path algorithm decides which is the best path to install in the IP routing table and to use for traffic forwarding. The best route selection criteria occurs in the following order:

  • Exclude any route with inaccessible next hop
  1. Prefer the path with the highest weight (local to router, Cisco-proprietary parameter)
  2. Prefer the path with the highest Local Preferance. (global within autonomous system)
  3. Prefer the path that was locally originated. (including redistributed routers from IGP)
  4. Prefer the path with the shortest AS_PATH (compare length only)
  5. Prefer the path with the lowest origin type (IGP < EGP < Incomplete)
  6. Prefer the path with the lowest multi-exit discriminator (MED)
  7. Prefer eBGP over iBGP paths.
  8. Prefer the path whose next-hop address has the lowest IGP metric
  9. Multipath determination
  10. For external BGP (eBGP) paths, prefer the oldest path
  11. Prefer paths from router with lower BGP router ID
  12. Prefer the path with the minimum cluster list length. (in BGP RR environments)
  13. Prefer the path that comes from the lowest neighbor address. (Tie-breaker)

Related links:


Popular posts from this blog

Specifying SSH port in Ansible Inventory

Ansible-Playbook to display output of multiple show commands (using stdout_lines with Loop)

Filtering Routes in BGP using Route-maps and Prefix-list

Ansible Playbook for Network OS Upgrade with pre and post checks

Bypassing Proxy Server in Google Chrome

VMware NSX Traffic Flow — East-West & North-South

Export or Backup Azure Network Security Groups into CSV using PowerShell

Ansible-playbook for backing up running config of Cisco IOS