What is the BGP Path Selection Process?

BGP Path Selection Process

BGP exchanges routes (prefixes) between BGP peers. Each of these announcements from a peer for a prefix is called a path. [1] The routes within these UPDATE messages are stored within the BGP Table and kept separate from the Routing Information Base (RIB). The BGP process then selects the “best” path from all available paths and this path becomes the candidate route announced by BGP for inclusion.  [2]

BGP Path Selection

Below describes the BGP Path Selection process.

  1. Weight – Prefer the path with the HIGHEST weight (Cisco-proprietary parameter)
  2. Local Preference – Prefer the path with the HIGHEST local preference.
  3. Locally Originated – Prefer local-originated path (prefix) over one’s learnt from a neighbor.
  4. AS Path – Prefer the path with the SHORTEST AS Path.
  5. Origin Type – Prefer the path with LOWEST origin type. IGP is lower than EGP. EGP is lower than INCOMPLETE.
  6. MED – Prefer the path with the LOWEST MED (Multi-Exit Discriminator).
  7. eBGP over iBGP – Prefer eBGP learned routes over iBGP learned routes.
  8. IGP Metric – Prefer the path with the LOWEST IGP next-hop.
  9. Multipath – Determines if multiple paths are required.
  10. External Paths – When both paths are external prefer OLDEST path.
  11. Router ID – Prefer path that comes from the BGP router with the LOWEST ID.
  12. Neighbor Address – Prefer path that comes from the LOWEST neighbor address.

NOTE It is important to note that any route that has a next-hop that is not reachable is ALWAYS ignored.

References

[1] “BGP path selection process – Brocade.” http://www.brocade.com/content/html/en/vrouter5600/40r1/vrouter-40r1-bgp/GUID-2E28B5A8-7E2B-45CB-8948-CDFF3C7F3224.html . Accessed 7 Nov. 2017.
[2] “BGP path selection process – Brocade.” http://www.brocade.com/content/html/en/vrouter5600/40r1/vrouter-40r1-bgp/GUID-2E28B5A8-7E2B-45CB-8948-CDFF3C7F3224.html . Accessed 7 Nov. 2017.

Rick Donato

Want to become a networking expert?

Here is our hand-picked selection of the best courses you can find online:
Cisco CCNA 200-301 Certification Gold Bootcamp
Complete Cyber Security Course – Network Security
Internet Security Deep Dive course
Python Pro Bootcamp
and our recommended certification practice exams:
AlphaPrep Practice Tests - Free Trial