Back

BGP path selection process

The Border Gateway Protocol (BGP) is a complex routing protocol that plays a crucial role in the functioning of the internet. It is responsible for finding the best route for data transmission between different networks, ensuring that data packets are delivered efficiently and effectively[2][9].


BGP Path Selection Process

The BGP path selection process is a multi-step algorithm that determines the best path for routing traffic. The process begins by comparing various attributes of each available path. These attributes can be administratively manipulated to control the path that is selected[10].


The BGP path selection algorithm follows these steps in order:


  1. Highest weight is preferred. This attribute only has local significance.
  2. If weight is not set, the route with the highest local preference is chosen.
  3. Routes that the router originated are preferred.
  4. The path with the shortest Autonomous System (AS) path is preferred.
  5. The path with the lowest origin type (IGP is lower than EGP, and EGP is lower than incomplete) is preferred.
  6. The path with the lowest Multi-Exit Discriminator (MED) is preferred.
  7. eBGP paths are preferred over iBGP paths.
  8. The path with the lowest IGP metric to the BGP next hop is preferred.
  9. If both routes are external, the oldest one is preferred.
  10. The path with the lowest router ID is preferred[1][4].


This process continues until it narrows down to one best path. All paths are stored in the BGP table, but only the best one gets installed in the routing table[4].


The complexity of the BGP path selection process arises from the numerous steps involved and the various attributes that need to be considered. Each attribute can be influenced by different factors, including network policies, contracts, and engineering performance[8].


Moreover, BGP is often referred to as a Business Policy Engine because it doesn’t necessarily select the best path from a performance perspective. Instead, it often selects the best path from a business point of view[8].


While BGP does not directly consider latency in its path selection process, the chosen path can significantly impact the latency experienced by data packets traveling through the internet. A path with fewer hops or less congestion, for example, might result in lower latency[9].


However, it’s important to note that BGP doesn’t dynamically adjust to latency changes. If the latency of a link increases, BGP won’t automatically reroute traffic unless the link fails or other BGP attributes change[3][6][12].


In conclusion, the BGP path selection process is a complex but essential part of internet routing. It ensures efficient data transmission, but its complexity and lack of direct consideration for latency can sometimes lead to suboptimal paths from a latency perspective.

Share: