Se ha denunciado esta presentación.
In this webinar, we cover how Border Gateway Protocol works. Starting from key concepts, you'll learn about Autonomous Systems, the BGP protocol, AS Path, learning and advertising routes, RIBs and route selection. See the webinar recording at https://www.thousandeyes.com/webinars/how-bgp-works
1© 2017 ThousandEyes Inc. All Rights Reserved.
How BGP Works
Young Xu, Product Marketing Manager
2© 2017 ThousandEyes Inc. All Rights Reserved.
Network Intelligence platform
that gives you a complete
picture from users to internal
and cloud-based applications
End-to-End Performance Data
Enterprise, Endpoint and Cloud Agents
And Route Monitors!
Surface insights from
a global data set
Uniﬁed view of diverse
Solve issues across
See any network like
it’s your own
3© 2017 ThousandEyes Inc. All Rights Reserved.
Border Gateway Protocol
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
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.
routers, within or
establish a TCP
• BGP messages
– Keep Alive
BGP the Protocol
BGP peers exchange
routes, within and
7© 2017 ThousandEyes Inc. All Rights Reserved.
• An update message may advertise
routes, withdraw routes, or both
• Any number of routes may be
• Any number of routes may be
– They must all share the same attributes
– These attributes include AS Path and
• Therefore, you’ll expect at least one
Update message for each Origin AS
BGP Update Message
(n Prefix/Length tuples)
7 well-known attributes:
Origin, AS Path, Next Hop, MED,
Local Pref, Atomic Aggregate, Aggregate
Network Layer Reachability Info
(n Prefix/Length tuples)
8© 2017 ThousandEyes Inc. All Rights Reserved.
• Describes available
routes using a path
• 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
9© 2017 ThousandEyes Inc. All Rights Reserved.
The Update Process
Routes with policies
Routes to advertiseNewly
Routes with next-hop
IP Routing Table
1. Preference calculated (PIB)
2. Route selection
• Ensure resolvability
• Break ties
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)
*> 184.108.40.206/24 10.1.12.2
300 400 i
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…
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
• 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.
– 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
• MED (Multi-Exit Discriminator)
– Communicate preferred inbound paths to a neighbor
– 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.
16© 2017 ThousandEyes Inc. All Rights Reserved.
BGP Route Visualization Shows Preferred Routes
17© 2017 ThousandEyes Inc. All Rights Reserved.
Routes Are Reﬂected in Traﬃc Paths
18© 2017 ThousandEyes Inc. All Rights Reserved.© 2017 ThousandEyes Inc. All Rights Reserved.
Watch the webinar: