Networking Q&As Logo
Networking Q&As Part of the Q&A Network
Real Questions. Clear Answers.
Ask any question about Networking here... and get an instant response.
Q&A Logo Q&A Logo

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.
✅ Answered with Networking best practices.

← Back to All Questions

Q&A Network
The Q&A Network
Networking
Ask Questions / Get Answers about Networking!
Cybersecurity
Ask Questions / Get Answers about Cybersecurity!
AI Education
Ask Questions / Get Answers about AI Education!
AI Design
Ask Questions / Get Answers about AI Design!
SEO
Ask Questions / Get Answers about SEO!
MobileDev
Ask Questions / Get Answers about Mobile Developement!
Photography
Ask Questions / Get Answers about Photography!
Monetization
Ask Questions / Get Answers about Ad & Monetization!
Web Hosting
Ask Questions / Get Answers about Hosting!
JavaScript
Ask Questions / Get Answers about JavaScript!
Web Development
Ask Questions / Get Answers about Web Development!
Analytics
Ask Questions / Get Answers about Analytics!
Cloud Computing
Ask Questions / Get Answers about Cloud Computing!
AI
Ask Questions / Get Answers about AI!
Video Editing
Ask Questions / Get Answers about Video Editing!
AI Ethics
Ask Questions / Get Answers about AI Ethics!
HTML
Ask Questions / Get Answers about HTML!
VR & AR
Ask Questions / Get Answers about VR & AR!
AI Audio
Ask Questions / Get Answers about AI Audio!
AI Business
Ask Questions / Get Answers about AI Business!
Security
Ask Questions / Get Answers about Website Security!
IoT
Ask Questions / Get Answers about IoT!
AI Images
Ask Questions / Get Answers about AI Images!
AI Marketing
Ask Questions / Get Answers about AI Marketing!
Bootstrap
Ask Questions / Get Answers about Bootstrap!
WordPress
Ask Questions / Get Answers about WordPress!
AI Writing
Ask Questions / Get Answers about AI Writing!
Web Languages
Ask Questions / Get Answers about Web Languages!
Performance
Ask Questions / Get Answers about Web Vitals!
Data Science
Ask Questions / Get Answers about Data Science!
AI Video
Ask Questions / Get Answers about AI Video!
DevOps
Ask Questions / Get Answers about DevOps!
Tailwind
Ask Questions / Get Answers about Tailwind!
CSS
Ask Questions / Get Answers about CSS!
Robotics
Ask Questions / Get Answers about Robotics!
AI Coding
Ask Questions / Get Answers about AI Coding!
Chatbots
Ask Questions / Get Answers about Chatbots!
Quantum
Ask Questions / Get Answers about Quantum Computing!