Premium Blog Scenario11.001

BGP Solutions and Insights

Interactive BGP Learning Environment

BGP is often introduced as the protocol used to exchange routing information between Autonomous Systems. While that definition is correct, understanding BGP properly requires looking beyond the protocol itself and understanding the networks, routing domains, policies, and forwarding infrastructure in which it operates.–

The Internet is a network of independently operated Autonomous Systems, each with its own infrastructure, addressing, routing policies, and operational requirements. BGP provides the interdomain routing mechanism that allows these networks to exchange reachability information and apply policy when determining which routes to accept, prefer, and advertise.

The interactive components in this section build that understanding progressively.

The Internet: A Network of Networks establishes the foundation by introducing Autonomous Systems, ASNs, interconnection, and the role of BGP in exchanging reachability between independently operated routing domains. The objective is to understand why an interdomain routing protocol is required when no single organisation controls the entire Internet.

Inside an Autonomous System then moves inside an individual routing domain. An Autonomous System can contain many routers, links, and routing functions. The section shows how eBGP connects different Autonomous Systems, how iBGP distributes BGP information within an AS, and how an IGP provides the internal reachability required to reach routers and BGP next hops.

How BGP Routes Move Through the Network follows the routing information itself. A prefix can be originated, advertised in a BGP UPDATE, received by another BGP speaker, and propagated according to BGP rules and local routing policy. As the route crosses AS boundaries, attributes such as AS_PATH provide information about the route’s interdomain propagation, while other attributes influence how the route is evaluated and advertised.

How BGP Selects a Path brings these concepts together. A BGP speaker can learn multiple routes to the same destination and must evaluate those candidates using its configured decision process. Attributes such as LOCAL_PREF, AS_PATH, ORIGIN, MED, and platform-specific attributes such as Cisco Weight can influence the selection.NEXT_HOP and other attributes also contribute to route resolution and forwarding, while communities are commonly used to carry policy information between BGP speakers.

Together, these interactive components establish a visual foundation for understanding BGP:

The network → The Autonomous System → Route movement → Path selection

The goal is not to reproduce every detail of a production BGP implementation. Instead, the visualisations make the relationships between networks, BGP speakers, routing information, policy, path attributes, and forwarding easier to understand. This provides the foundation for the more detailed protocol concepts, configuration examples, and hands-on BGP labs that follow.

ENGINEERING GUIDE · BGP

Interactive BGP Learning Environment

Understanding BGP requires more than knowing its commands or memorising the best-path sequence. BGP operates across interconnected Autonomous Systems, exchanges reachability information, applies routing policy and ultimately influences how traffic is forwarded through the network.

!
Engineering Observation The most useful way to understand BGP is to follow the relationship between the network, the route, the policy and the forwarding decision — and then use the simulator to investigate what actually happens.
01 · NETWORK

The Internet

Understand why the Internet is a collection of independently operated Autonomous Systems and why BGP is required between them.

02 · ARCHITECTURE

Inside the AS

See how IGP, iBGP and eBGP divide the work of internal reachability, route distribution and interdomain connectivity.

03 · PROPAGATION

Route Movement

Follow a prefix through BGP UPDATEs, route reception, policy processing, propagation and route installation.

04 · DECISION

Best Path

Examine how multiple valid candidates are compared using policy and BGP path attributes to determine the preferred route.

BGP Learning Model
AUTONOMOUS SYSTEMS
→
BGP UPDATE
→
ROUTE PROPAGATION
→
PATH SELECTION
→
FORWARDING
Engineering View

BGP is a control-plane decision system that determines how reachability information is learned, evaluated and propagated.

Prefixes UPDATEs Policy Attributes RIB FIB
BGP PREMIUM GUIDE

BGP Learning Path

Start with the structure of the Internet, move inside an Autonomous System, follow how BGP routes propagate, and finish with the logic behind best-path selection.

FOUNDATION ARCHITECTURE PROPAGATION DECISION
☕
Support Network Insight
Help support the development of interactive networking labs, BGP simulations, and educational content.
Support the Project
Interactive BGP Lab

Take the BGP Concepts Into the Lab

Reading explains how BGP works. The simulator lets you observe the routing system as it operates. Explore BGP sessions, route propagation, attributes, best-path decisions and network behaviour through an interactive engineering environment.

01 Understand Build the conceptual model from the BGP architecture and routing principles explained in this article.
02 Investigate Open the simulator and inspect routers, BGP sessions, routes, attributes and protocol state.
03 Experiment Change the network conditions and observe how BGP propagation and path selection respond.
BGP Core Simulator

Move from theory to hands-on BGP engineering. Explore the control plane, routing decisions and protocol behaviour in an interactive environment.

🚀 LAUNCH BGP SIMULATOR
Opens the BGP Core Simulator in a new browser tab.
BGP CONTROL PLANE REFERENCE

How the BGP Control Plane Fits Together

Explore the major components involved when BGP receives routing information, evaluates candidate paths, selects a best route, and programs forwarding.
Interactive Reference
P
BGP Peers
Neighbors establish sessions and exchange routing information.
BGP
BGP Control Plane
Receives routing information, applies policy, maintains candidate paths and selects routes.
U
BGP UPDATE
Carries NLRI, path attributes and withdrawals.
A
Path Attributes
Weight, Local Preference, AS Path, MED, Communities and more.
✓
Best Path
Candidate routes are compared using the BGP decision process.
R
RIB / FIB
The selected route is installed for forwarding.
Selected Component
BGP Control Plane
The BGP control plane receives routing information, applies routing policy, maintains candidate paths and runs the best-path decision process.
Interactive component
Control-plane relationship
Click any component to explore

The Internet: A Network of Networks

FOUNDATION · THE INTERNET
The Internet Is a Network of Networks
BGP exists because the Internet is made up of many independently operated networks. These networks must exchange reachability information without giving up control of their own infrastructure or routing policy.
BGP
FOUNDATION
AS
01 · NETWORKS
Autonomous Systems
Independent routing domains operate their own infrastructure, addressing and routing policies.
→
BGP
02 · CONTROL PLANE
Reachability
BGP exchanges IP prefix information between BGP speakers and applies policy to the routes being learned and advertised.
→
RIB
03 · ROUTING
Route Selection
Each BGP speaker evaluates the routes it knows and selects a preferred path according to its policy and decision process.
→
FIB
04 · DATA PLANE
Traffic Forwarding
The selected route can be installed for forwarding so packets can reach their destination through the network.
KEY IDEA
BGP does not create the Internet. It provides the interdomain routing mechanism that allows independently operated networks to exchange reachability, apply routing policy, and make their own path-selection decisions.
IN THIS SECTION
AS Autonomous Systems BGP Interdomain Routing ROUTES Reachability TRAFFIC Forwarding
Network Insight · BGP Engineering Use Case

Investigating Internet Reachability

Start from the enterprise router and investigate how BGP provides reachability to networks located in other Autonomous Systems. Use the simulated CLI to inspect neighbours, routes and routing state.

Internet Connectivity
AS Relationships
ISP-A AS 65001 Established
ISP-B AS 65002 Established
ISP-C AS 65003 Established
Enterprise R1 AS 65010 3 BGP Neighbours
Remote Network AS 65020 10.10.10.0/24
BGP Relationship
Established
Enterprise Router CLI
Simulated
R1#
show ip bgp summary
BGP router identifier 10.255.255.1 Local AS number 65010 Neighbor AS State/PfxRcd 192.0.2.1 65001 Established 192.0.2.2 65002 Established 192.0.2.3 65003 Established

What You See

R1 has three established external BGP sessions, each connecting the enterprise to a different Autonomous System.

What It Means

BGP allows independently operated networks to exchange reachability information across AS boundaries.

Engineering Principle

The Internet is a network of independently operated Autonomous Systems connected through routing relationships.

FOUNDATION · THE INTERNET

The Internet Is a Network of Networks

BGP exists because the Internet is not one centrally operated network. It is a collection of independently managed Autonomous Systems that connect to one another and exchange reachability information.

Internet Architecture · Independent Routing Domains
AS 65001 Provider Internet connectivity and external reachability
AS 65002 Transit Provides connectivity between other networks
AS 65010 Enterprise Owns internal infrastructure and routing policy
AS 65020 Cloud Hosts services and advertises reachable prefixes
BGP
Interdomain REACHABILITY
01 · Independence Each AS operates its own network

Infrastructure, addressing, routing policy and operational decisions remain under the control of the organisation operating the AS.

02 · Interconnection Networks establish routing relationships

BGP speakers exchange reachability information across AS boundaries so destinations can become reachable through neighbouring networks.

03 · Reachability Prefixes describe destinations

BGP advertises IP prefixes and associated path information rather than carrying the user packets themselves.

04 · Policy Each AS makes its own decisions

Networks can decide which routes to accept, prefer and advertise according to their own routing policies.

B
BGP · Control Plane

BGP exchanges reachability information between BGP speakers and provides the information used to evaluate and select routes.

→
Forwarding · Data Plane

Once routing information has been selected and resolved, the forwarding plane uses the resulting information to move packets toward their destinations.

!
Engineering Principle BGP does not create a single global routing authority. It allows independently operated Autonomous Systems to exchange reachability information while retaining control over their own routing policy.

The Internet is a vast “network of networks” — a global system of independently operated networks, including Internet service providers, enterprises, cloud providers, universities, and government organisations. These networks interconnect using shared protocols and standards, with BGP providing the primary mechanism for exchanging reachability information between Autonomous Systems. Each network manages its own infrastructure, routing policies, and operational requirements while participating in a larger, interconnected system.

Each Autonomous System contributes to the global routing system by originating or advertising IP prefixes that it is authorised to announce, while learning reachability to prefixes available through other networks. BGP allows these independently administered networks to exchange this information without requiring a central routing authority. As routes are learned and withdrawn, each network applies its own policies to determine which paths it will accept, prefer, and advertise to its neighbours.

This distributed model is fundamental to the resilience of the Internet. A network can have multiple connections to different providers or neighbouring Autonomous Systems, allowing alternative routes to exist when a link or routing path becomes unavailable. When a route is withdrawn or a topology changes, BGP can propagate the new reachability information so that affected networks can recalculate their available paths. The result is not a single global routing table controlled by one organisation, but a collection of interconnected routing domains making independent decisions based on shared protocols and local policy.

Because the Internet is composed of many independently operated networks, its topology and routing behaviour are constantly evolving. Links are added and removed, policies change, prefixes are originated or withdrawn, and business relationships influence how routes are exchanged. BGP provides the interdomain framework that allows these changes to propagate across the network while preserving the autonomy of each participating organisation.

Understanding this structure is essential to understanding BGP. Before examining how BGP selects between competing routes, it is important to understand what exists inside the Autonomous Systems that originate, receive, and propagate those routes.

NETWORK INSIGHT · BGP SERIES

How the Internet Connects

Before understanding BGP, understand the network it was designed for: an Internet made from thousands of independently operated Autonomous Systems that exchange reachability and carry traffic between one another.

Internet Topology
CONTROL + DATA PLANE
Data traffic
BGP control plane
Active scenario
Internet Traffic Journey
Step 0 / 7
READY

Follow traffic across the Internet

Run the scenario to see how traffic moves between independently operated networks and where BGP fits into the process.

Selected Object

The Internet

The Internet is not one network. It is a collection of independently operated networks interconnected using common protocols.

Key Concepts

Inside an Autonomous System

ARCHITECTURE · INSIDE THE AS
What Exists Inside an Autonomous System?
An Autonomous System is not a single router. It is a collection of routers, links and routing functions operating under a common administrative and routing-policy framework.
AS
ARCHITECTURE
IGP
01 · INTERNAL REACHABILITY
IGP
OSPF, IS-IS and other IGPs provide internal reachability between routers and help resolve BGP next hops.
iBGP
02 · BGP INFORMATION
iBGP
iBGP distributes BGP reachability information between BGP speakers inside the same Autonomous System.
eBGP
03 · AS BOUNDARY
eBGP
eBGP exchanges reachability information between neighbouring Autonomous Systems.
FIB
04 · DATA PLANE
Forwarding
Once a route is selected and resolved, the forwarding plane uses the resulting information to move packets.
IMPORTANT DISTINCTION
BGP and the IGP perform different jobs. BGP determines which routes are preferred and distributes BGP reachability information. The IGP provides the internal IP reachability required to reach BGP next hops. The forwarding plane then moves the actual packet.
INSIDE AN AS
IGP Internal Reachability iBGP BGP Information eBGP AS Connectivity FIB Packet Forwarding
Network Insight · BGP Engineering Use Case

Inside an Autonomous System

BGP does not operate alone inside an enterprise network. Use this interactive view to see how eBGP, iBGP and the IGP work together to move routing information from an external network toward the routers that ultimately forward traffic.

Inside AS 65010
Control Plane
Autonomous System 65010
R1 AS 65010 Internal
R2 AS 65010 Core Router
R3 AS 65010 BGP Edge
ISP AS 65001 eBGP
Remote Prefix 10.10.10.0/24 External
eBGP
iBGP
IGP
Router Investigation
Simulated
R3#
show ip bgp summary
BGP router identifier 10.255.255.3 Local AS number 65010 Neighbor AS Relationship 10.255.255.1 65010 iBGP 10.255.255.2 65010 iBGP 192.0.2.1 65001 eBGP BGP state: Established

What You See

R3 has both an external eBGP relationship and internal routing relationships within AS 65010.

What It Means

BGP exchanges external reachability while the IGP provides the internal reachability required to reach BGP next hops.

Engineering Principle

eBGP connects Autonomous Systems, iBGP distributes BGP information within an AS, and the IGP provides internal IP reachability.

ARCHITECTURE · AUTONOMOUS SYSTEM

Inside an Autonomous System

An Autonomous System does not use BGP for every routing function. Internal reachability, external route exchange, path selection and packet forwarding are separate engineering functions that work together.

Inside the AS
IGP Provides internal reachability between routers and establishes the paths used to reach next-hop addresses.
Internal Routers Maintain routing information and provide connectivity across the Autonomous System.
CONTROL PLANE
BGP

BGP carries interdomain reachability information and applies routing policy to determine which available path should be used.

eBGP → RIB → Best Path → FIB
AS Boundary
eBGP Exchanges reachability information with routers belonging to another Autonomous System.
External Prefixes Routes learned from other ASs become candidates for local policy and best-path selection.
01
IGP

Answers the internal reachability question: How do I reach the next hop?

02
iBGP

Distributes BGP reachability information between routers inside the same Autonomous System.

03
eBGP

Exchanges routing information across an Autonomous System boundary.

04
FIB

Converts the selected routing decision into forwarding information used by the data plane.

Engineering Principle

BGP is the control-plane decision system, not the forwarding mechanism. The routing process selects a path; the FIB is then programmed so packets can actually follow that decision.

Inside an Autonomous System (AS), routers operate within a common administrative and routing-policy domain. The AS controls its internal topology, addressing, and routing decisions, allowing operators to engineer traffic, provide redundancy, and manage connectivity according to their own operational requirements. An AS may contain anything from a small collection of routers to thousands of devices spanning multiple regions, data centres, and network segments.

Internal routing is typically provided by an Interior Gateway Protocol (IGP) such as OSPF or IS-IS in service-provider environments, with protocols such as EIGRP also used in some enterprise networks. The IGP is responsible for providing reachability within the AS, while BGP handles the exchange of interdomain and, where required, internal BGP routing information. This distinction is important: BGP determines which route is preferred, while the IGP can provide the underlying reachability needed to reach the BGP next hop.

Because the routers within an AS are operated under a common administrative framework, the network can be engineered around its own requirements. Operators can use IGP metrics, areas or levels, summarisation, routing policy, redundancy mechanisms, and traffic-engineering techniques to influence how traffic moves through the network. The objective may be rapid convergence, efficient use of links, predictable forwarding, geographic resilience, or isolation of particular services and workloads.

The internal architecture of an AS varies considerably depending on its purpose and scale. Some networks use traditional core, distribution, and access layers, while others use provider backbones, regional architectures, data-centre fabrics, MPLS-based networks, or overlay technologies. These different designs can coexist within the same Autonomous System, with different routing protocols and mechanisms serving different roles.

From outside the AS, however, the internal topology is generally abstracted. External BGP peers do not normally need visibility into the AS’s complete internal IGP structure. Instead, the AS presents its external neighbours with BGP reachability information and applies its own policies to determine which routes are accepted, preferred, and advertised.

This separation between internal reachability and external routing policy is fundamental to understanding BGP. eBGP connects an AS to neighbouring Autonomous Systems, iBGP distributes BGP information within the AS, and the IGP provides the internal reachability required to support the resulting forwarding decisions.

BGP ARCHITECTURE

Inside an Autonomous System

An autonomous system is not a single router. It is a collection of routers and links working together. IGP provides internal reachability, iBGP distributes BGP information, and eBGP connects the AS to other networks.

Inside AS 65001
Click a router or link to inspect it
AS
AS64500
External AS
R1
R1
Edge
R2
R2
Core
R3
R3
Core
R4
R4
Edge
AS
AS64510
External AS
ARCHITECTURE VIEW

One AS, multiple routing roles

An autonomous system contains multiple routers. Different routing functions operate across those routers: IGP maintains internal reachability, iBGP distributes BGP information, and eBGP connects the AS to neighbouring autonomous systems.

What to notice
The purple links represent the internal routing domain. The cyan dashed links represent iBGP sessions. Orange links mark the boundaries where this AS communicates with another AS.
IGP
Internal reachability
iBGP
BGP information
eBGP
AS boundary

How BGP Routes Move Through the Network

ROUTING · BGP PROPAGATION
How Does a BGP Route Move Through the Network?
A BGP route does not simply appear everywhere at once. It is originated by a router, carried inside BGP UPDATE messages, propagated according to policy, evaluated by receiving routers, and eventually installed into the forwarding plane.
ROUTE
LIFECYCLE
NLRI
01 · ROUTE ORIGINATION
A Prefix Is Introduced
A router originates or learns a prefix and creates BGP reachability information for that destination.
UPDATE
02 · BGP UPDATE
Reachability Is Advertised
The router sends a BGP UPDATE containing the prefix and its associated path attributes to a neighbour.
PATH
03 · PROPAGATION
The Route Travels
Other BGP speakers receive the route and may advertise it onward, subject to BGP rules and routing policy.
RIB
04 · ROUTE EVALUATION
Paths Are Compared
A router evaluates available paths using BGP attributes such as Local Preference, AS_PATH, MED and other criteria.
FIB
05 · FORWARDING
The Selected Route Is Used
Once the best path is selected and the next hop is resolved, the resulting route can be installed for forwarding.
IMPORTANT DISTINCTION
BGP carries reachability information — not the user packet. BGP UPDATE messages distribute routing information through the control plane. The forwarding plane uses the resulting routing information to determine where actual packets should go.
ROUTE LIFECYCLE
NLRI Prefix UPDATE Advertisement PATH Propagation RIB Selection FIB Forwarding
Network Insight · BGP Engineering Use Case

Tracing a BGP Route Through the Network

Follow a BGP route from the moment an UPDATE is received through NLRI processing, RIB-IN, policy and routing state. The objective is to understand how BGP processes reachability information before the forwarding plane can use it.

BGP Route Lifecycle
Control Plane
Route Destination
10.10.10.0/24
Follow the route as routing information moves through the BGP control plane.
01
UPDATE
BGP message received
02
NLRI
Prefix identified
03
RIB-IN
Candidate route stored
04
POLICY
Import policy evaluated
05
RIB / FIB
Routing state installed
BGP Route Processing
NLRI 10.10.10.0/24
NEXT HOP 192.0.2.1
AS PATH 65001 65020
Route Investigation CLI
Simulated
R1#
show bgp update received
BGP UPDATE received NLRI 10.10.10.0/24 NEXT_HOP 192.0.2.1 AS_PATH 65001 65020 ORIGIN IGP Status: UPDATE RECEIVED

What You See

The router has received a BGP UPDATE containing reachability information for 10.10.10.0/24.

What It Means

The UPDATE is control-plane information. It describes how the router can reach a destination prefix.

Engineering Principle

A BGP route is processed by the control plane before the resulting routing information can be used for forwarding.

PROPAGATION · BGP ROUTE LIFECYCLE

How a BGP Route Moves Through the Network

A BGP route is not simply “sent” from one router to another. Reachability information is advertised, received, evaluated, stored and ultimately converted into a forwarding decision.

01
NLRI

A network prefix represents a reachable destination.

02
UPDATE

BGP advertises the prefix together with path attributes.

03
RIB-IN

The receiving router stores routes learned from its BGP peers.

04
BEST PATH

Policy and BGP attributes determine which candidate wins.

05
FIB

The selected route becomes forwarding information for packets.

Example NLRI
10.10.10.0/24 Reachable destination prefix
BGP UPDATE · Path Information
AS_PATH Path through autonomous systems
NEXT_HOP Next-hop information
LOCAL_PREF Local routing preference
MED Multi-exit discriminator
Engineering Principle

BGP carries reachability information, not user traffic. The UPDATE changes the control-plane view of the network. The resulting routing decision is then reflected in the forwarding plane through the FIB.

BGP routes are exchanged between BGP speakers and propagated according to the relationships between those speakers, their routing policies, and the rules of BGP. A route may enter an Autonomous System through an eBGP session, where the receiving router evaluates the advertisement and applies local policy before making the route available to its BGP process. The route may then be advertised to other BGP speakers within the AS using iBGP.

When a route is learned from an eBGP neighbour, its BGP attributes describe characteristics of the route and its path. Some attributes are received from the neighbour, while others may be modified or assigned through local policy before the route is advertised onward. For example, LOCAL_PREF can be set to influence the preferred exit point from the AS, while AS_PATH is modified when a route is advertised across an AS boundary. NEXT_HOP identifies the address that must be resolved to reach the destination, while MED can provide a neighbouring AS with information about a preferred entry point where the comparison is applicable.

Within an AS, iBGP can distribute BGP routes between internal speakers without adding the local AS to the AS_PATH. In common eBGP-to-iBGP propagation, the NEXT_HOP is preserved, meaning that internal routers may need the IGP to provide reachability to the BGP next hop. The IGP therefore plays a supporting role: it does not select the BGP route, but it provides the underlying IP reachability required to resolve the next hop and ultimately forward traffic.

The way routes propagate through an AS is also influenced by BGP policy and topology. Filtering can determine which routes are accepted or advertised, routing policy can modify attributes, and mechanisms such as route reflection can control how routes are distributed between iBGP speakers. As a result, not every BGP speaker necessarily receives every route, and different routers can have different sets of candidate paths from which to make their own best-path decisions.

Route reflectors are commonly used to scale iBGP deployments by reducing the number of individual peering relationships required. Rather than requiring every iBGP router to form a session with every other iBGP router, route reflectors can advertise routes between clients and other BGP speakers according to the route-reflection rules. Large networks may deploy multiple route reflectors for redundancy and operational resilience, with the design taking into account path visibility, loop prevention, policy, and convergence behaviour.

Once BGP selects a best path, that path becomes a candidate for installation into the router’s main routing table, subject to factors such as next-hop reachability, administrative preference, platform behaviour, and policy. If the route is installed, the forwarding plane can then use the resulting forwarding information to send packets toward the destination.

The key distinction is simple:

BGP determines which route is preferred. The IGP provides internal reachability to the required next hop. The forwarding plane moves the actual packet.

Understanding this separation is essential when following a BGP route from the moment it is advertised to the moment traffic is forwarded.

BGP ROUTE PROPAGATION

How BGP Routes Move Through the Network

A route begins as reachability information in one network. BGP carries that information between autonomous systems, adding context such as AS_PATH and other attributes as the advertisement moves through the Internet.

ROUTE ORIGINATION
BGP CONTROL PLANE
ORIGIN AS
BGP PROPAGATION
REMOTE AS
AS64500
ORIGIN
PREFIX
AS65001
TRANSIT
BGP SPEAKER
AS65002
TRANSIT
BGP SPEAKER
AS64510
REMOTE
LEARNED
AS_PATH
ROUTE PROPAGATION
REACHABILITY
PREFIX
10.10.0.0/16
ORIGINATED HERE
BGP UPDATE
FOLLOW THE ROUTE
STEP 1 / 4
A network originates a prefix and makes that destination available to BGP.

How BGP Selects a Path

DECISION PROCESS · BGP BEST PATH
How Does BGP Select a Path?
A BGP router can receive multiple routes to the same destination. Instead of forwarding traffic randomly, BGP evaluates the available paths through a defined decision process and selects the best path for installation and use.
BEST
PATH
RIB-IN
01 · CANDIDATE ROUTES
Multiple Paths Arrive
A router may receive several valid paths to the same prefix from different BGP neighbours.
POLICY
02 · ROUTING POLICY
Attributes Matter
Attributes such as Weight, Local Preference, AS_PATH, Origin and MED influence how available paths are evaluated.
COMPARE
03 · DECISION PROCESS
Paths Are Compared
BGP works through its decision criteria, eliminating less preferred candidates as the comparison progresses.
BEST
04 · BEST PATH
One Path Wins
The surviving candidate becomes the selected BGP best path for that destination on the router.
FIB
05 · ROUTING TABLE
Forwarding Uses It
After the route is selected and the next hop is resolved, the resulting information can be installed for forwarding.
IMPORTANT IDEA
BGP does not simply choose the shortest network path. It compares routes using BGP attributes and its decision process. A path with a longer AS_PATH, for example, can still be preferred if an earlier decision criterion gives it an advantage.
BEST-PATH MODEL
RIB-IN Candidates POLICY Attributes COMPARE Decision BEST Selected Path FIB Forwarding
Network Insight · BGP Engineering Use Case

How BGP Selects a Path

Multiple BGP routes can reach the same destination. BGP compares route attributes and applies its best-path process to determine which candidate becomes the preferred route for the destination.
BGP Best-Path Decision
Control Plane
DESTINATION  10.10.10.0/24
Path A
Candidate
LOCAL_PREF100 AS_PATH65020 65030 ORIGINIGP MED20 NEXT_HOP192.0.2.1
Path B
Candidate
LOCAL_PREF200 AS_PATH65040 65050 ORIGINIGP MED80 NEXT_HOP192.0.2.5
Path C
Candidate
LOCAL_PREF150 AS_PATH65060 ORIGINIGP MED10 NEXT_HOP192.0.2.9
Compare Attributes
SELECTED PATH: —
Best-Path Investigation CLI
Simulated
What You See
Three routes advertise reachability to the same destination. Each route carries a different set of BGP attributes.
What It Means
BGP does not simply choose the route with the shortest AS path. Earlier attributes in the decision process can eliminate a candidate before later attributes are considered.
Engineering Principle
Best-path selection is policy-driven. Local Preference can influence which exit an AS prefers before attributes such as AS Path and MED become relevant.
DECISION · BGP BEST PATH

How BGP Selects a Path

A BGP router can learn multiple paths to the same destination. The router does not simply choose the shortest physical path. It evaluates policy and path attributes in a defined decision process.

Path A
Selected
10.10.10.0/24
LOCAL_PREF 200
AS_PATH 65001 65020
MED 50
ORIGIN IGP
Path B
Candidate
10.10.10.0/24
LOCAL_PREF 150
AS_PATH 65002 65020
MED 20
ORIGIN IGP
Path C
Candidate
10.10.10.0/24
LOCAL_PREF 100
AS_PATH 65003 65020
MED 10
ORIGIN IGP
01
Policy Apply local routing policy
02
Weight Prefer higher local weight
03
Local Preference Prefer higher local preference
04
AS Path Compare path length
05
MED / Tie-breakers Continue until one path wins
WEIGHT Local router preference where supported.
LOCAL_PREF Controls preferred exit from the AS.
AS_PATH Provides path information and loop prevention.
ORIGIN Ranks how the route was originated.
MED Can influence which external entry point is preferred.
Engineering Principle

BGP chooses a path according to routing policy and attributes, not simply according to distance. This is why two routers can see the same destination and legitimately select different paths.

BGP can learn multiple routes to the same destination and must evaluate those candidate paths to determine which route it prefers. The exact decision process varies by implementation and configuration, but common BGP implementations evaluate a sequence of attributes and tie-breakers. On platforms such as Cisco IOS, for example, Weight is considered first, followed by LOCAL_PREF and other criteria in the configured best-path process.

LOCAL_PREF is commonly used to express the preferred exit point from an Autonomous System, with higher values preferred. Other attributes can then influence the decision, including locally originated routes, AS_PATH length, the BGP ORIGIN attribute, and MED where the comparison is applicable. Additional criteria can include whether the route was learned through eBGP or iBGP and the IGP cost to reach the BGP NEXT_HOP. If multiple paths remain equivalent, implementation-specific tie-breakers such as router ID may be used. Some platforms also consider factors such as route age or neighbour address during the final stages of selection.

The important point is that BGP does not simply choose the route with the shortest AS_PATH. The decision process is policy-driven, and an earlier attribute can determine the preferred route before later attributes are ever considered. A route with a longer AS_PATH can therefore be preferred over a shorter path because of LOCAL_PREF, Weight, local origination, or another earlier decision criterion.

These attributes provide operators with mechanisms for influencing routing behaviour. LOCAL_PREF can be used to select preferred exits from an AS, AS_PATH manipulation can influence how routes are perceived by neighbouring networks, and MED can provide a neighbouring AS with information about a preferred entry point when the comparison applies. Communities can also be used to communicate policy information, allowing routers to apply consistent actions to groups of routes.

The result is a distributed routing system in which each BGP speaker makes its own decisions based on the routes it has learned, the policies applied to those routes, and the capabilities and configuration of the implementation. Different routers do not necessarily select the same path because they may have different candidate routes, policies, next-hop reachability, or points of attachment to the network.

When a route changes or becomes unavailable, BGP exchanges UPDATE messages to communicate new reachability information or withdrawals. Other BGP speakers then reevaluate their available paths and policies. This process allows routing decisions to adapt to topology changes while preserving the independent policy control of each Autonomous System.

The result is a routing system designed for policy, scale, and interdomain control rather than simply selecting the shortest physical or AS-level path. That distinction is central to understanding why BGP is used to connect independently operated networks across the Internet.

NETWORK INSIGHT · BGP SERIES

How BGP Chooses a Path

A BGP router can learn more than one route to the same destination. The best-path process compares route attributes in sequence until a preferred path is selected.

Destination Prefix
10.10.10.0/24
PATH A
CANDIDATE
Next Hop 192.0.2.1
Weight 0
Local Preference 100
AS Path 65002 65010
MED 50
Learned via eBGP
PATH B
CANDIDATE
Next Hop 192.0.2.5
Weight 0
Local Preference 200
AS Path 65003 65010
MED 100
Learned via eBGP
PATH C
CANDIDATE
Next Hop 192.0.2.9
Weight 0
Local Preference 150
AS Path 65004 65010
MED 20
Learned via eBGP
BGP Decision Process
INTERACTIVE
1
Weight
Higher Weight is preferred when the platform supports this attribute.
2
Local Preference
Higher Local Preference is preferred within the AS.
3
Local Origin
Locally originated routes are preferred over routes learned from elsewhere.
4
AS Path
A shorter AS Path is preferred when earlier attributes tie.
5
MED
Lower MED is preferred when the comparison applies.
6
eBGP / iBGP
If routes remain tied, additional BGP decision criteria are considered.
7
Final Tie-Breakers
Router ID and other final criteria can resolve a remaining tie.
READY

Compare the candidate routes

BGP does not simply choose the route with the shortest AS Path. It evaluates attributes in sequence.

Current Result
No route selected

Bringing the BGP Picture Together

BGP becomes much easier to understand when the individual pieces are viewed as parts of one complete routing system.

The Internet is a network of independently operated Autonomous Systems, and BGP provides the interdomain routing mechanism that allows those networks to exchange reachability information. Inside an Autonomous System, different routing functions work together: the IGP provides internal reachability, iBGP distributes BGP information between internal BGP speakers, eBGP exchanges routes between Autonomous Systems, and the forwarding plane ultimately moves the packets.

From there, a BGP route follows a lifecycle. A prefix is originated or learned, advertised through BGP UPDATE messages, propagated according to routing rules and policy, and stored as routing information on receiving routers. When multiple paths are available, BGP evaluates their attributes and applies its decision process to determine which path becomes the best path.

That distinction between route information and actual traffic is fundamental. BGP operates primarily in the control plane. It determines which reachability information should be preferred; the resulting routing information is then used by the forwarding plane to determine where packets should go.

The most important lesson is therefore not to think of BGP as simply finding the shortest path. BGP is a policy-driven path-selection system. Attributes such as Weight, Local Preference, AS_PATH, Origin and MED can influence the decision, while the surrounding topology, routing policy and internal reachability determine how those routes can actually be used.

Once these relationships are understood, BGP stops looking like a collection of individual commands and starts to become a coherent system:

Autonomous Systems → BGP Updates → Route Propagation → Path Selection → Forwarding

The interactive environments throughout this article are designed to make those relationships visible. Rather than only reading about BGP, you can observe the routing process, follow routes through the network, inspect path attributes and see how changing a routing decision affects the resulting path.

BGP QUICK REFERENCE

BGP Best-Path Cheat Sheet

The key BGP attributes to remember when comparing multiple routes to the same destination.

CONTROL PLANE REFERENCE
Simplified decision flow
Weight → Local Preference → Local Origin → AS Path → Origin → MED → eBGP / iBGP → Tie-breakers
Attribute What it controls Rule Remember
1 Weight Preference on the local router Higher wins Cisco-specific
2 Local Preference Preferred exit point from the AS Higher wins Shared inside the AS
3 Local Origin Whether the route was originated locally Preferred Local route generation
4 AS Path Number of AS hops in the path Shorter wins Inter-AS path length
5 Origin How the route entered BGP IGP preferred IGP < EGP < Incomplete
6 MED Suggested entry point into an AS Lower wins Usually compared within the same neighboring AS
7 eBGP vs iBGP External versus internal path eBGP preferred Platform-dependent sequence
8 Tie-breakers Resolve routes still tied Platform-specific Router ID and other criteria
The important idea

BGP does not simply choose the shortest network path. It evaluates route attributes in sequence. Once an earlier attribute produces a clear winner, later attributes may never be considered.

For the labs

The interactive labs below let you change these attributes and observe how the selected BGP route changes in the control plane.

PUT BGP INTO PRACTICE

You've Seen How BGP Works.
Now Explore It Yourself.

You have followed the journey from Autonomous Systems and BGP route propagation through to the best-path decision process. Now take those concepts into an interactive environment and see what happens when the routing conditions change.

01 · EXPLORE Follow the routing process Explore BGP sessions, routes, attributes and topology inside the interactive environment.
02 · EXPERIMENT Change the conditions Alter routing attributes and observe how the BGP decision process responds.
03 · UNDERSTAND See the result Connect the theory from this article with the actual routing information produced by the simulator.
BGP Core Simulator

Build, inspect and experiment with BGP routing behaviour in the interactive simulator.

🚀 LAUNCH BGP CORE SIMULATOR
CONTINUE LEARNING
01 Follow the route 02 Inspect the attributes 03 Change the decision 04 Observe the result
Opens the interactive BGP Core Simulator in a new browser tab.
☕
Enjoyed the BGP learning environment?
Your support helps Network Insight continue developing interactive networking labs, simulators and technical learning content.
Support Network Insight
Matt Conran
Latest posts by Matt Conran (see all)
Tags: No tags

Comments are closed.