Didn’t find the answer you were looking for?
How does BGP select the best path for routing traffic between autonomous systems?
Asked on Dec 02, 2025
Answer
BGP (Border Gateway Protocol) selects the best path for routing traffic between autonomous systems using a series of attributes and rules to determine the most efficient route. These attributes include weight, local preference, AS-path length, origin type, MED (Multi-Exit Discriminator), and more, which BGP evaluates in a specific order to decide the best path.
Example Concept: BGP path selection is a multi-step process where the protocol evaluates paths based on several attributes in a specific order. Initially, BGP considers the highest weight (a Cisco-specific attribute) and local preference, which are often manually configured to influence routing decisions. If these are equal, BGP examines the shortest AS-path, preferring paths with fewer autonomous systems. Further tie-breaking involves checking the origin type, MED, eBGP over iBGP paths, and the lowest IGP metric to the BGP next hop. Finally, BGP may use router ID or cluster list length for final decisions.
Additional Comment:
- BGP is a path vector protocol used for inter-domain routing.
- The weight attribute is Cisco-specific and not propagated to other routers.
- Local preference is used within an AS to prefer certain paths.
- AS-path length helps prevent routing loops by counting AS hops.
- MED is used to influence inbound traffic from neighboring ASes.
- BGP prefers eBGP paths over iBGP paths for route selection.
Recommended Links:
