SlideShare a Scribd company logo
5
Most read
9
Most read
12
Most read
1© 2017 ThousandEyes Inc. All Rights Reserved.
How BGP Works
Young Xu, Product Marketing Manager
2© 2017 ThousandEyes Inc. All Rights Reserved.
About ThousandEyes
Network Intelligence platform
that gives you a complete
picture from users to internal
and cloud-based applications
Routing!
User
 App
End-to-End Performance Data
App
Performance!
User
Experience!
Network
Topology!
Routing
Topology!
Enterprise, Endpoint and Cloud Agents
Network
Connectivity!
And Route Monitors!
Surface insights from
a global data set
Lightweight, flexible
data collection
Unified view of diverse
performance data
Solve issues across
shared infrastructure
See any network like
it’s your own
3© 2017 ThousandEyes Inc. All Rights Reserved.
Border Gateway Protocol
BGP-4 RFC4271
Where do I forward traffic to reach an IP
address in an external network?
How can I control the route and composition
of inbound traffic to my network?
4© 2017 ThousandEyes Inc. All Rights Reserved.
•  Autonomous System
–  Collection of IP prefixes
–  Common routing policy
to other ASes
–  Registered by an RIR
(regional Internet registry)
–  Denoted by a name and number
•  A Private AS can be used when
a single upstream exists
–  External routing policy is identical
IP Blocks and Autonomous Systems
AS 200
2.2.2.0/24
2.2.3.0/24
Autonomous
System
5© 2017 ThousandEyes Inc. All Rights Reserved.
•  Inter-Network – Used for routing
between networks (Autonomous
Systems), or within large networks
•  Reachability – BGP defines how one AS
can reach another, described as a path
vector (AS Path)
•  Policy-Based – BGP makes it possible
for an AS to apply policies (e.g. multi-
homing, failover, commercial terms)
•  Decentralized – Each AS makes policy
decisions autonomously, using BGP to
coordinate and share routes
Key BGP Concepts
6© 2017 ThousandEyes Inc. All Rights Reserved.
•  Neighboring
routers, within or
between ASes,
establish a TCP
connection on
port 179.
•  BGP messages
include:
–  Open
–  Update
–  Notification
–  Keep Alive
BGP the Protocol
AS 100
1.1.1.0/24
AS 300
3.3.3.4/22
AS 400
4.4.0.0/16
AS 200
2.2.2.0/24
Border Router
Origin
Autonomous
System
Internal
Router
BGP peers exchange
routes, within and
among ASes
7© 2017 ThousandEyes Inc. All Rights Reserved.
•  An update message may advertise
routes, withdraw routes, or both
•  Any number of routes may be
withdrawn
•  Any number of routes may be
advertised
–  They must all share the same attributes
–  These attributes include AS Path and
Origin
•  Therefore, you’ll expect at least one
Update message for each Origin AS
BGP Update Message
BGP Header
Withdrawn Routes
(n Prefix/Length tuples)
Path Attributes
7 well-known attributes:
Origin, AS Path, Next Hop, MED,
Local Pref, Atomic Aggregate, Aggregate
Optional attributes:
Community, Originator
Network Layer Reachability Info
(n Prefix/Length tuples)
8© 2017 ThousandEyes Inc. All Rights Reserved.
AS 300
3.3.3.4/22
•  Describes available
routes using a path
vector
•  Each AS will
prepend itself onto
the AS Path
•  Associated with an
origin AS and prefix
•  Avoids routing loops
by rejecting any AS
Path containing the
local AS
AS Path
AS 100
1.1.1.0/24
AS 400
4.4.0.0/16
AS 200
2.2.2.0/24
Origin
Autonomous
System
300 100
100100
200 100
9© 2017 ThousandEyes Inc. All Rights Reserved.
The Update Process
Loc-RIB
Routes with policies
applied
Adj-RIB-In
Unprocessed routes
Adj-RIB-Out
Routes to advertiseNewly
learned
routes
Newly
advertised
routes
FIB
Routes with next-hop
and interfaces
IP Routing Table
Routes aggregated
across protocols
Next-hops resolved
Interfaces calculated
Locally learned
routes added
1.  Preference calculated (PIB)
2.  Route selection
•  Ensure resolvability
•  Break ties
3.  Route
dissemination
•  Aggregation
Incorporated with IS-IS, OSPF,
etc. by Administrative Distance
10© 2017 ThousandEyes Inc. All Rights Reserved.
The routing application builds a Routing Information Base (RIB) to map
learned prefixes and routes
Example of the routing table for AS100 (show ip bgp)
* = valid; > = best
Routing Tables (RIBs)
Network
 Next Hop
 Metric (MED)
 Local Pref
 Weight
 Path
*> 1.1.1.0/24 10.1.12.2
 0
 0
 i
*>
 2.2.2.0/24
 10.1.14.4
 0
 0
 200 i
*>
 2.2.3.0/24
 10.1.14.4
 0
 0
 200 i
*>
 3.3.3.4/22 10.1.16.6
 0
 0
 300 i
*>
 4.4.0.0/16
 10.1.16.6
 0
 32768
 300 400 i
*
 4.4.0.0/16
 10.1.14.4
 0
 0
 200 400 i
11© 2017 ThousandEyes Inc. All Rights Reserved.
•  Highest weight (de facto standard)
–  Set by the local router
•  Highest local preference
–  Set by the local AS, typically based on commercial relationships
•  Shortest AS Path
–  The route that traverses the fewest ASes
•  Origin type
–  Internal-learned (IGP) routes preferred
•  Multi-Exit Discriminator (MED)
–  A preference set by the origin AS
•  Additional tiebreaking and multipath criteria…
Route Selection
12© 2017 ThousandEyes Inc. All Rights Reserved.
•  Match the most specific prefix
–  If none available, then the prefix is not reachable
•  Forward traffic to the correct interface
–  Based on information placed in the FIB, learned from BGP (and
other protocols)
•  Thus, a forwarding decision is influenced by:
–  Specificity of IP prefix
–  Internal routes
–  BGP routes, their attributes and the local routing policy
Making Forwarding Decisions
13© 2017 ThousandEyes Inc. All Rights Reserved.
•  Generally, BGP speakers within an AS must communicate with one
another in a full mesh, each updating one another
•  But this can be hard to scale in large ASes
•  Alternatives to full meshes exist, including:
Coordinating Within an AS
Route reflection (hub-spoke) Confederations (AS subdomains)
14© 2017 ThousandEyes Inc. All Rights Reserved.
•  Communities
–  Communicate to neighbors how to
advertise routes they learn from you,
and vice versa
–  ISPs publish community definitions on how advertisements will be handled
–  Often used for local preference, no-export, prepending, geographic or peering
limitations
•  MED (Multi-Exit Discriminator)
–  Communicate preferred inbound paths to a neighbor
•  Prepending
–  Inserting the local AS to the AS Path multiple times to lengthen the path and
reduce its preference by others
Coordinating Between ASes
15© 2017 ThousandEyes Inc. All Rights Reserved.© 2017 ThousandEyes Inc. All Rights Reserved.
Demo
16© 2017 ThousandEyes Inc. All Rights Reserved.
BGP Route Visualization Shows Preferred Routes
WV Fiber
Switch
Level 3
17© 2017 ThousandEyes Inc. All Rights Reserved.
Routes Are Reflected in Traffic Paths
WV Fiber
Switch
Level 3
18© 2017 ThousandEyes Inc. All Rights Reserved.© 2017 ThousandEyes Inc. All Rights Reserved.
Watch the webinar:


www.thousandeyes.com/webinars/how-bgp-works

More Related Content

PPT
PPT
BGP protocol presentation
PPT
PPTX
Border Gateway Protocol
PDF
Bgp tutorial for ISP
PDF
BGP (border gateway routing protocol)
PPTX
Bgp protocol
PPTX
Cisco Live Milan 2015 - BGP advance
BGP protocol presentation
Border Gateway Protocol
Bgp tutorial for ISP
BGP (border gateway routing protocol)
Bgp protocol
Cisco Live Milan 2015 - BGP advance

What's hot (20)

PPTX
Border Gateway Protocol (BGP)
PPTX
CCNA ppt Day 1
PPTX
Chapter 17 : static routing
PDF
PDF
Ccnp presentation [Day 1-3] Class
PPTX
Open Shortest Path First
PDF
Cisco ospf
PPTX
OSPF Basics
PDF
MPLS Traffic Engineering
PDF
Mobile Transport Evolution with Unified MPLS
PPT
CCNA Basic Switching and Switch Configuration
PDF
PDF
VXLAN BGP EVPN: Technology Building Blocks
PPTX
Virtual LAN
PPT
MPLS (Multi-Protocol Label Switching)
PPTX
Border Gatway Protocol
PPTX
EIGRP (Enhanced Interior Gateway Routing Protocol)
PPT
PPTX
Network address translation
Border Gateway Protocol (BGP)
CCNA ppt Day 1
Chapter 17 : static routing
Ccnp presentation [Day 1-3] Class
Open Shortest Path First
Cisco ospf
OSPF Basics
MPLS Traffic Engineering
Mobile Transport Evolution with Unified MPLS
CCNA Basic Switching and Switch Configuration
VXLAN BGP EVPN: Technology Building Blocks
Virtual LAN
MPLS (Multi-Protocol Label Switching)
Border Gatway Protocol
EIGRP (Enhanced Interior Gateway Routing Protocol)
Network address translation
Ad

Viewers also liked (17)

PPTX
An Overview of Border Gateway Protocol (BGP)
PPTX
bgp protocol
PPT
BGP Overview
PDF
BGP Advance Technique by Steven & James
PPTX
Ppt of routing protocols
PPT
DOC
Study Notes BGP Exam
PPTX
BGP Traffic Engineering / Routing Optimisation
PPT
PPTX
DOCX
CCNP Route 642 902 BGP
PDF
Ios interior routing_protocols
PPT
Bgp For Presentation
PPT
Bgp training
PDF
Aag c45 697761
PDF
Reverse, Multi-Process and Non-Stop Debugging come to the CDT
An Overview of Border Gateway Protocol (BGP)
bgp protocol
BGP Overview
BGP Advance Technique by Steven & James
Ppt of routing protocols
Study Notes BGP Exam
BGP Traffic Engineering / Routing Optimisation
CCNP Route 642 902 BGP
Ios interior routing_protocols
Bgp For Presentation
Bgp training
Aag c45 697761
Reverse, Multi-Process and Non-Stop Debugging come to the CDT
Ad

Similar to How BGP Works (20)

PPTX
15 coms 525 tcpip - border gateway protocols
PPT
bgp1 cryptogrphy and network security.ppt
PDF
Apnic_bgp_training_cisco_ciscosaicoc.pdf
PPTX
border gateway protocol network layer computer networks
PDF
SANOG23-BGP-Techniques.pdf
PPT
PDF
BGP Techniques for Network Operators
PDF
Policies
PDF
Computer network (14)
PPT
Bigbgp (1)
PPT
16 bgp
 
PDF
PDF
BGP.pdf
PDF
bgp_attributes_202uyuyuyuyuyuyuyu00124.pdf
PPTX
DOCX
BGP Protocol Makes the Internet Work
PPTX
BGP Advanced topics
PDF
NANOG50.Talk33.NANOG50-BGP-Techniques.pdf
PDF
BGP security tuning: pull-up route
15 coms 525 tcpip - border gateway protocols
bgp1 cryptogrphy and network security.ppt
Apnic_bgp_training_cisco_ciscosaicoc.pdf
border gateway protocol network layer computer networks
SANOG23-BGP-Techniques.pdf
BGP Techniques for Network Operators
Policies
Computer network (14)
Bigbgp (1)
16 bgp
 
BGP.pdf
bgp_attributes_202uyuyuyuyuyuyuyu00124.pdf
BGP Protocol Makes the Internet Work
BGP Advanced topics
NANOG50.Talk33.NANOG50-BGP-Techniques.pdf
BGP security tuning: pull-up route

More from ThousandEyes (20)

PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
PDF
2025-07-15 EMEA Volledig Inzicht Dutch Webinar
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
PPTX
End-to-end Assurance for SD-WAN & SASE with ThousandEyes
PPTX
Assurance Best Practices: Unlocking Proactive Network Operations
PPTX
ThousandEyes Partner Innovation Updates for May 2025
PPTX
How to Optimize Your AWS Environment for Improved Cloud Performance
PPTX
Assuring Your SD-WAN to Deliver Unparalleled Digital Experiences
PPTX
Assuring Your SD-WAN to Deliver Unparalleled Digital Experiences
PPTX
How to Optimize Your AWS Environment for Improved Cloud Performance
PPTX
How to Optimize Your AWS Environment for Improved Cloud Performance
PPTX
Introduction to ThousandEyes platform March 2025
PPTX
What's New? ThousandEyes Product Features and Highlights for February 2025
PPTX
AMER Introduction to ThousandEyes Webinar
PPTX
What's New? ThousandEyes Product Features and Highlights
PPTX
Top Outages of 2024, Explained: Lessons in Digital Resilience
PPTX
Top Outages of 2024, Explained: Lessons in Digital Resilience
PPTX
Top Outages of 2024, Explained: Lessons in Digital Resilience
New ThousandEyes Product Innovations: Cisco Live June 2025
IT Runs Better with ThousandEyes AI-driven Assurance
2025-07-15 EMEA Volledig Inzicht Dutch Webinar
New ThousandEyes Product Innovations: Cisco Live June 2025
New ThousandEyes Product Innovations: Cisco Live June 2025
End-to-end Assurance for SD-WAN & SASE with ThousandEyes
Assurance Best Practices: Unlocking Proactive Network Operations
ThousandEyes Partner Innovation Updates for May 2025
How to Optimize Your AWS Environment for Improved Cloud Performance
Assuring Your SD-WAN to Deliver Unparalleled Digital Experiences
Assuring Your SD-WAN to Deliver Unparalleled Digital Experiences
How to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud Performance
Introduction to ThousandEyes platform March 2025
What's New? ThousandEyes Product Features and Highlights for February 2025
AMER Introduction to ThousandEyes Webinar
What's New? ThousandEyes Product Features and Highlights
Top Outages of 2024, Explained: Lessons in Digital Resilience
Top Outages of 2024, Explained: Lessons in Digital Resilience
Top Outages of 2024, Explained: Lessons in Digital Resilience

Recently uploaded (20)

PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
cuic standard and advanced reporting.pdf
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPT
Teaching material agriculture food technology
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Encapsulation theory and applications.pdf
PDF
KodekX | Application Modernization Development
PDF
Empathic Computing: Creating Shared Understanding
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
20250228 LYD VKU AI Blended-Learning.pptx
NewMind AI Monthly Chronicles - July 2025
cuic standard and advanced reporting.pdf
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Dropbox Q2 2025 Financial Results & Investor Presentation
Teaching material agriculture food technology
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
The AUB Centre for AI in Media Proposal.docx
Encapsulation theory and applications.pdf
KodekX | Application Modernization Development
Empathic Computing: Creating Shared Understanding
Spectral efficient network and resource selection model in 5G networks
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Chapter 3 Spatial Domain Image Processing.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Big Data Technologies - Introduction.pptx
Encapsulation_ Review paper, used for researhc scholars
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Per capita expenditure prediction using model stacking based on satellite ima...

How BGP Works

  • 1. 1© 2017 ThousandEyes Inc. All Rights Reserved. How BGP Works Young Xu, Product Marketing Manager
  • 2. 2© 2017 ThousandEyes Inc. All Rights Reserved. About ThousandEyes Network Intelligence platform that gives you a complete picture from users to internal and cloud-based applications Routing! User App End-to-End Performance Data App Performance! User Experience! Network Topology! Routing Topology! Enterprise, Endpoint and Cloud Agents Network Connectivity! And Route Monitors! Surface insights from a global data set Lightweight, flexible data collection Unified view of diverse performance data Solve issues across shared infrastructure See any network like it’s your own
  • 3. 3© 2017 ThousandEyes Inc. All Rights Reserved. Border Gateway Protocol BGP-4 RFC4271 Where do I forward traffic to reach an IP address in an external network? How can I control the route and composition of inbound traffic to my network?
  • 4. 4© 2017 ThousandEyes Inc. All Rights Reserved. •  Autonomous System –  Collection of IP prefixes –  Common routing policy to other ASes –  Registered by an RIR (regional Internet registry) –  Denoted by a name and number •  A Private AS can be used when a single upstream exists –  External routing policy is identical IP Blocks and Autonomous Systems AS 200 2.2.2.0/24 2.2.3.0/24 Autonomous System
  • 5. 5© 2017 ThousandEyes Inc. All Rights Reserved. •  Inter-Network – Used for routing between networks (Autonomous Systems), or within large networks •  Reachability – BGP defines how one AS can reach another, described as a path vector (AS Path) •  Policy-Based – BGP makes it possible for an AS to apply policies (e.g. multi- homing, failover, commercial terms) •  Decentralized – Each AS makes policy decisions autonomously, using BGP to coordinate and share routes Key BGP Concepts
  • 6. 6© 2017 ThousandEyes Inc. All Rights Reserved. •  Neighboring routers, within or between ASes, establish a TCP connection on port 179. •  BGP messages include: –  Open –  Update –  Notification –  Keep Alive BGP the Protocol AS 100 1.1.1.0/24 AS 300 3.3.3.4/22 AS 400 4.4.0.0/16 AS 200 2.2.2.0/24 Border Router Origin Autonomous System Internal Router BGP peers exchange routes, within and among ASes
  • 7. 7© 2017 ThousandEyes Inc. All Rights Reserved. •  An update message may advertise routes, withdraw routes, or both •  Any number of routes may be withdrawn •  Any number of routes may be advertised –  They must all share the same attributes –  These attributes include AS Path and Origin •  Therefore, you’ll expect at least one Update message for each Origin AS BGP Update Message BGP Header Withdrawn Routes (n Prefix/Length tuples) Path Attributes 7 well-known attributes: Origin, AS Path, Next Hop, MED, Local Pref, Atomic Aggregate, Aggregate Optional attributes: Community, Originator Network Layer Reachability Info (n Prefix/Length tuples)
  • 8. 8© 2017 ThousandEyes Inc. All Rights Reserved. AS 300 3.3.3.4/22 •  Describes available routes using a path vector •  Each AS will prepend itself onto the AS Path •  Associated with an origin AS and prefix •  Avoids routing loops by rejecting any AS Path containing the local AS AS Path AS 100 1.1.1.0/24 AS 400 4.4.0.0/16 AS 200 2.2.2.0/24 Origin Autonomous System 300 100 100100 200 100
  • 9. 9© 2017 ThousandEyes Inc. All Rights Reserved. The Update Process Loc-RIB Routes with policies applied Adj-RIB-In Unprocessed routes Adj-RIB-Out Routes to advertiseNewly learned routes Newly advertised routes FIB Routes with next-hop and interfaces IP Routing Table Routes aggregated across protocols Next-hops resolved Interfaces calculated Locally learned routes added 1.  Preference calculated (PIB) 2.  Route selection •  Ensure resolvability •  Break ties 3.  Route dissemination •  Aggregation Incorporated with IS-IS, OSPF, etc. by Administrative Distance
  • 10. 10© 2017 ThousandEyes Inc. All Rights Reserved. The routing application builds a Routing Information Base (RIB) to map learned prefixes and routes Example of the routing table for AS100 (show ip bgp) * = valid; > = best Routing Tables (RIBs) Network Next Hop Metric (MED) Local Pref Weight Path *> 1.1.1.0/24 10.1.12.2 0 0 i *> 2.2.2.0/24 10.1.14.4 0 0 200 i *> 2.2.3.0/24 10.1.14.4 0 0 200 i *> 3.3.3.4/22 10.1.16.6 0 0 300 i *> 4.4.0.0/16 10.1.16.6 0 32768 300 400 i * 4.4.0.0/16 10.1.14.4 0 0 200 400 i
  • 11. 11© 2017 ThousandEyes Inc. All Rights Reserved. •  Highest weight (de facto standard) –  Set by the local router •  Highest local preference –  Set by the local AS, typically based on commercial relationships •  Shortest AS Path –  The route that traverses the fewest ASes •  Origin type –  Internal-learned (IGP) routes preferred •  Multi-Exit Discriminator (MED) –  A preference set by the origin AS •  Additional tiebreaking and multipath criteria… Route Selection
  • 12. 12© 2017 ThousandEyes Inc. All Rights Reserved. •  Match the most specific prefix –  If none available, then the prefix is not reachable •  Forward traffic to the correct interface –  Based on information placed in the FIB, learned from BGP (and other protocols) •  Thus, a forwarding decision is influenced by: –  Specificity of IP prefix –  Internal routes –  BGP routes, their attributes and the local routing policy Making Forwarding Decisions
  • 13. 13© 2017 ThousandEyes Inc. All Rights Reserved. •  Generally, BGP speakers within an AS must communicate with one another in a full mesh, each updating one another •  But this can be hard to scale in large ASes •  Alternatives to full meshes exist, including: Coordinating Within an AS Route reflection (hub-spoke) Confederations (AS subdomains)
  • 14. 14© 2017 ThousandEyes Inc. All Rights Reserved. •  Communities –  Communicate to neighbors how to advertise routes they learn from you, and vice versa –  ISPs publish community definitions on how advertisements will be handled –  Often used for local preference, no-export, prepending, geographic or peering limitations •  MED (Multi-Exit Discriminator) –  Communicate preferred inbound paths to a neighbor •  Prepending –  Inserting the local AS to the AS Path multiple times to lengthen the path and reduce its preference by others Coordinating Between ASes
  • 15. 15© 2017 ThousandEyes Inc. All Rights Reserved.© 2017 ThousandEyes Inc. All Rights Reserved. Demo
  • 16. 16© 2017 ThousandEyes Inc. All Rights Reserved. BGP Route Visualization Shows Preferred Routes WV Fiber Switch Level 3
  • 17. 17© 2017 ThousandEyes Inc. All Rights Reserved. Routes Are Reflected in Traffic Paths WV Fiber Switch Level 3
  • 18. 18© 2017 ThousandEyes Inc. All Rights Reserved.© 2017 ThousandEyes Inc. All Rights Reserved. Watch the webinar:
 www.thousandeyes.com/webinars/how-bgp-works