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!
SEO
Ask Questions / Get Answers about SEO!
AI Marketing
Ask Questions / Get Answers about AI Marketing!
CSS
Ask Questions / Get Answers about CSS!
VR & AR
Ask Questions / Get Answers about VR & AR!
Video Editing
Ask Questions / Get Answers about Video Editing!
Analytics
Ask Questions / Get Answers about Analytics!
DevOps
Ask Questions / Get Answers about DevOps!
Data Science
Ask Questions / Get Answers about Data Science!
AI Audio
Ask Questions / Get Answers about AI Audio!
Web Hosting
Ask Questions / Get Answers about Hosting!
Tailwind
Ask Questions / Get Answers about Tailwind!
Robotics
Ask Questions / Get Answers about Robotics!
Cloud Computing
Ask Questions / Get Answers about Cloud Computing!
Chatbots
Ask Questions / Get Answers about Chatbots!
Quantum
Ask Questions / Get Answers about Quantum Computing!
AI
Ask Questions / Get Answers about AI!
AI Education
Ask Questions / Get Answers about AI Education!
Web Development
Ask Questions / Get Answers about Web Development!
IoT
Ask Questions / Get Answers about IoT!
JavaScript
Ask Questions / Get Answers about JavaScript!
HTML
Ask Questions / Get Answers about HTML!
AI Coding
Ask Questions / Get Answers about AI Coding!
Security
Ask Questions / Get Answers about Website Security!
Bootstrap
Ask Questions / Get Answers about Bootstrap!
AI Images
Ask Questions / Get Answers about AI Images!
AI Business
Ask Questions / Get Answers about AI Business!
Photography
Ask Questions / Get Answers about Photography!
MobileDev
Ask Questions / Get Answers about Mobile Developement!
AI Design
Ask Questions / Get Answers about AI Design!
WordPress
Ask Questions / Get Answers about WordPress!
AI Video
Ask Questions / Get Answers about AI Video!
Monetization
Ask Questions / Get Answers about Ad & Monetization!
Cybersecurity
Ask Questions / Get Answers about Cybersecurity!
AI Ethics
Ask Questions / Get Answers about AI Ethics!
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!