bgp convergence jennifer rexford. outline border gateway protocol (bgp) –prefix-based routing at...
TRANSCRIPT
![Page 1: BGP Convergence Jennifer Rexford. Outline Border Gateway Protocol (BGP) –Prefix-based routing at the AS level –Policy-based path-vector protocol –Incremental](https://reader036.vdocuments.us/reader036/viewer/2022081516/56649cc45503460f9498dbb4/html5/thumbnails/1.jpg)
BGP Convergence
Jennifer Rexford
![Page 2: BGP Convergence Jennifer Rexford. Outline Border Gateway Protocol (BGP) –Prefix-based routing at the AS level –Policy-based path-vector protocol –Incremental](https://reader036.vdocuments.us/reader036/viewer/2022081516/56649cc45503460f9498dbb4/html5/thumbnails/2.jpg)
Outline
• Border Gateway Protocol (BGP)– Prefix-based routing at the AS level– Policy-based path-vector protocol– Incremental protocol with update messages
• BGP convergence– Causes of BGP routing changes– Path exploration during convergence– Minimum route advertisement timer
• BGP does not necessarily converge– Bistable routing configurations– Protocol oscillation
![Page 3: BGP Convergence Jennifer Rexford. Outline Border Gateway Protocol (BGP) –Prefix-based routing at the AS level –Policy-based path-vector protocol –Incremental](https://reader036.vdocuments.us/reader036/viewer/2022081516/56649cc45503460f9498dbb4/html5/thumbnails/3.jpg)
Interdomain Routing
• AS-level topology– Destinations are IP prefixes (e.g., 12.0.0.0/8)– Nodes are Autonomous Systems (ASes)– Links are connections and business
relationships
1
2
34
5
67
Client Web server
![Page 4: BGP Convergence Jennifer Rexford. Outline Border Gateway Protocol (BGP) –Prefix-based routing at the AS level –Policy-based path-vector protocol –Incremental](https://reader036.vdocuments.us/reader036/viewer/2022081516/56649cc45503460f9498dbb4/html5/thumbnails/4.jpg)
Challenges for Interdomain Routing
• Scale– Prefixes: 150,000-200,000, and growing– ASes: 20,000 visible ones, and growing– AS paths and routers: at least in the
millions…• Privacy
– ASes don’t want to divulge internal topologies– … or their business relationships with
neighbors• Policy
– No Internet-wide notion of a link cost metric– Need control over where you send traffic– … and who can send traffic through you
![Page 5: BGP Convergence Jennifer Rexford. Outline Border Gateway Protocol (BGP) –Prefix-based routing at the AS level –Policy-based path-vector protocol –Incremental](https://reader036.vdocuments.us/reader036/viewer/2022081516/56649cc45503460f9498dbb4/html5/thumbnails/5.jpg)
Shortest-Path Routing is Restrictive
• All traffic must travel on shortest paths• All nodes need common notion of link
costs• Incompatible with commercial
relationships
Regional ISP1
Regional ISP2
Regional ISP3
Cust1Cust3 Cust2
National ISP1
National ISP2
YES
NO
![Page 6: BGP Convergence Jennifer Rexford. Outline Border Gateway Protocol (BGP) –Prefix-based routing at the AS level –Policy-based path-vector protocol –Incremental](https://reader036.vdocuments.us/reader036/viewer/2022081516/56649cc45503460f9498dbb4/html5/thumbnails/6.jpg)
Link-State Routing is Problematic
• Topology information is flooded – High bandwidth and storage overhead– Forces nodes to divulge sensitive
information
• Entire path computed locally per node– High processing overhead in a large network
• Minimizes some notion of total distance– Works only if policy is shared and uniform
• Typically used only inside an AS– E.g., OSPF and IS-IS
![Page 7: BGP Convergence Jennifer Rexford. Outline Border Gateway Protocol (BGP) –Prefix-based routing at the AS level –Policy-based path-vector protocol –Incremental](https://reader036.vdocuments.us/reader036/viewer/2022081516/56649cc45503460f9498dbb4/html5/thumbnails/7.jpg)
Distance Vector is on the Right Track
• Advantages– Hides details of the network topology– Nodes determine only “next hop” toward
the dest
• Disadvantages– Minimizes some notion of total distance,
which is difficult in an interdomain setting– Slow convergence due to the counting-to-
infinity problem (“bad news travels slowly”)
• Idea: extend the notion of a distance vector
![Page 8: BGP Convergence Jennifer Rexford. Outline Border Gateway Protocol (BGP) –Prefix-based routing at the AS level –Policy-based path-vector protocol –Incremental](https://reader036.vdocuments.us/reader036/viewer/2022081516/56649cc45503460f9498dbb4/html5/thumbnails/8.jpg)
Path-Vector Routing
• Extension of distance-vector routing– Support flexible routing policies– Avoid count-to-infinity problem
• Key idea: advertise the entire path– Distance vector: send distance metric per dest
d– Path vector: send the entire path for each dest
d
32 1
d
“d: path (2,1)” “d: path (1)”
data traffic data traffic
![Page 9: BGP Convergence Jennifer Rexford. Outline Border Gateway Protocol (BGP) –Prefix-based routing at the AS level –Policy-based path-vector protocol –Incremental](https://reader036.vdocuments.us/reader036/viewer/2022081516/56649cc45503460f9498dbb4/html5/thumbnails/9.jpg)
Faster Loop Detection
• Node can easily detect a loop– Look for its own node identifier in the path– E.g., node 1 sees itself in the path “3, 2, 1”
• Node can simply discard paths with loops– E.g., node 1 simply discards advertisement
32 1
“d: path (2,1)” “d: path (1)”
“d: path (3,2,1)”
![Page 10: BGP Convergence Jennifer Rexford. Outline Border Gateway Protocol (BGP) –Prefix-based routing at the AS level –Policy-based path-vector protocol –Incremental](https://reader036.vdocuments.us/reader036/viewer/2022081516/56649cc45503460f9498dbb4/html5/thumbnails/10.jpg)
Flexible Policies
• Each node can apply local policies– Path selection: Which path to use?– Path export: Which paths to advertise?
• Examples– Node 2 may prefer the path “2, 3, 1” over
“2, 1”– Node 1 may not let node 3 hear the path “1,
2” 2 3
1
![Page 11: BGP Convergence Jennifer Rexford. Outline Border Gateway Protocol (BGP) –Prefix-based routing at the AS level –Policy-based path-vector protocol –Incremental](https://reader036.vdocuments.us/reader036/viewer/2022081516/56649cc45503460f9498dbb4/html5/thumbnails/11.jpg)
04/18/23
Border Gateway Protocol
• Interdomain routing protocol for the Internet – Prefix-based path-vector protocol– Policy-based routing based on AS Paths– Evolved during the past 15 years
• 1989 : BGP-1 [RFC 1105]– Replacement for EGP (1984, RFC 904)
• 1990 : BGP-2 [RFC 1163]
• 1991 : BGP-3 [RFC 1267]
• 1995 : BGP-4 [RFC 1771] – Support for Classless Interdomain Routing (CIDR)
![Page 12: BGP Convergence Jennifer Rexford. Outline Border Gateway Protocol (BGP) –Prefix-based routing at the AS level –Policy-based path-vector protocol –Incremental](https://reader036.vdocuments.us/reader036/viewer/2022081516/56649cc45503460f9498dbb4/html5/thumbnails/12.jpg)
04/18/23
BGP Operations
Establish session on TCP port 179
Exchange all active routes
Exchange incremental updates
AS1
AS2
While connection is ALIVE exchangeroute UPDATE messages
BGP session
![Page 13: BGP Convergence Jennifer Rexford. Outline Border Gateway Protocol (BGP) –Prefix-based routing at the AS level –Policy-based path-vector protocol –Incremental](https://reader036.vdocuments.us/reader036/viewer/2022081516/56649cc45503460f9498dbb4/html5/thumbnails/13.jpg)
Incremental Protocol
• A node learns multiple paths to destination– Stores all of the routes in a routing table– Applies policy to select a single active route– … and may advertise the route to its
neighbors
• Incremental updates– Announcement
• Upon selecting a new active route, add node id to path
• … and (optionally) advertise to each neighbor
– Withdrawal• If the active route is no longer available• … send a withdrawal message to the neighbors
![Page 14: BGP Convergence Jennifer Rexford. Outline Border Gateway Protocol (BGP) –Prefix-based routing at the AS level –Policy-based path-vector protocol –Incremental](https://reader036.vdocuments.us/reader036/viewer/2022081516/56649cc45503460f9498dbb4/html5/thumbnails/14.jpg)
BGP Route
• Destination prefix (e.g,. 128.112.0.0/16)• Route attributes, including
– AS path (e.g., “7018 88”)– Next-hop IP address (e.g., 12.127.0.121)
AS 88Princeton
128.112.0.0/16AS path = 88Next Hop = 192.0.2.1
AS 7018AT&T
AS 12654RIPE NCCRIS project
192.0.2.1
128.112.0.0/16AS path = 7018 88Next Hop = 12.127.0.121
12.127.0.121
![Page 15: BGP Convergence Jennifer Rexford. Outline Border Gateway Protocol (BGP) –Prefix-based routing at the AS level –Policy-based path-vector protocol –Incremental](https://reader036.vdocuments.us/reader036/viewer/2022081516/56649cc45503460f9498dbb4/html5/thumbnails/15.jpg)
04/18/23
ASPATH Attribute
128.112.0.0/16AS Path = 88
AS 1239Sprint
AS 1755Ebone
AS 3549Global Crossing
128.112.0.0/16AS Path = 7018 88
128.112.0.0/16AS Path = 3549 7018 88
AS 88
128.112.0.0/16
Princeton
Prefix Originated
AS 12654RIPE NCCRIS project
AS 1129Global Access
128.112.0.0/16AS Path = 7018 88
128.112.0.0/16AS Path = 1239 7018 88
128.112.0.0/16AS Path = 1129 1755 1239 7018 88
AS7018
AT&T
128.112.0.0/16AS Path = 1755 1239 7018 88
![Page 16: BGP Convergence Jennifer Rexford. Outline Border Gateway Protocol (BGP) –Prefix-based routing at the AS level –Policy-based path-vector protocol –Incremental](https://reader036.vdocuments.us/reader036/viewer/2022081516/56649cc45503460f9498dbb4/html5/thumbnails/16.jpg)
BGP Path Selection
• Simplest case– Shortest AS path– Arbitrary tie break
• BGP not limited to shortest-path routing– Policy-based routing
• Example– Five-hop AS path
preferred over a three-hop AS path
– AS 12654 prefers path through Global Access
AS 3549Global Crossing
128.112.0.0/16AS Path = 3549 7018 88
AS 12654RIPE NCCRIS project
AS 1129Global Access
128.112.0.0/16AS Path = 1129 1755 1239 7018 88
![Page 17: BGP Convergence Jennifer Rexford. Outline Border Gateway Protocol (BGP) –Prefix-based routing at the AS level –Policy-based path-vector protocol –Incremental](https://reader036.vdocuments.us/reader036/viewer/2022081516/56649cc45503460f9498dbb4/html5/thumbnails/17.jpg)
Causes of BGP Routing Changes
• Topology changes– Equipment going up or down– Deployment of new routers or sessions
• BGP session failures– Due to equipment failures, maintenance, etc.– Or, due to congestion on the physical path
• Changes in routing policy– Reconfiguration of preferences– Reconfiguration of route filters
• Persistent protocol oscillation– Conflicts between policies in different ASes
![Page 18: BGP Convergence Jennifer Rexford. Outline Border Gateway Protocol (BGP) –Prefix-based routing at the AS level –Policy-based path-vector protocol –Incremental](https://reader036.vdocuments.us/reader036/viewer/2022081516/56649cc45503460f9498dbb4/html5/thumbnails/18.jpg)
BGP Session Failure
• BGP runs over TCP– BGP only sends updates
when changes occur– TCP doesn’t detect lost
connectivity on its own• Detecting a failure
– Keep-alive: 60 seconds– Hold timer: 180 seconds
• Reacting to a failure– Discard all routes
learned from the neighbor
– Send new updates for any routes that change
AS1
AS2
![Page 19: BGP Convergence Jennifer Rexford. Outline Border Gateway Protocol (BGP) –Prefix-based routing at the AS level –Policy-based path-vector protocol –Incremental](https://reader036.vdocuments.us/reader036/viewer/2022081516/56649cc45503460f9498dbb4/html5/thumbnails/19.jpg)
Routing Change: Before and After
0
1 2
3
0
1 2
3
(1,0) (2,0)
(3,1,0)
(2,0)
(1,2,0)
(3,2,0)
![Page 20: BGP Convergence Jennifer Rexford. Outline Border Gateway Protocol (BGP) –Prefix-based routing at the AS level –Policy-based path-vector protocol –Incremental](https://reader036.vdocuments.us/reader036/viewer/2022081516/56649cc45503460f9498dbb4/html5/thumbnails/20.jpg)
Routing Change: Path Exploration
• AS 1– Delete the route (1,0)– Switch to next route
(1,2,0)– Send route (1,2,0) to
AS 3
• AS 3– Sees (1,2,0) replace
(1,0)– Compares to route
(2,0)– Switches to using AS 2
0
1 2
3
(2,0)
(1,2,0)
(3,2,0)
![Page 21: BGP Convergence Jennifer Rexford. Outline Border Gateway Protocol (BGP) –Prefix-based routing at the AS level –Policy-based path-vector protocol –Incremental](https://reader036.vdocuments.us/reader036/viewer/2022081516/56649cc45503460f9498dbb4/html5/thumbnails/21.jpg)
Routing Change: Path Exploration
• Initial situation– Destination 0 is alive– All ASes use direct path
• When destination dies– All ASes lose direct path– All switch to longer
paths– Eventually withdrawn
• E.g., AS 2– (2,0) (2,1,0) – (2,1,0) (2,3,0) – (2,3,0) (2,1,3,0)– (2,1,3,0) null
1 2
3
0
(1,0)(1,2,0)(1,3,0)
(2,0)(2,1,0)(2,3,0)
(3,0)(3,1,0)(3,2,0)
![Page 22: BGP Convergence Jennifer Rexford. Outline Border Gateway Protocol (BGP) –Prefix-based routing at the AS level –Policy-based path-vector protocol –Incremental](https://reader036.vdocuments.us/reader036/viewer/2022081516/56649cc45503460f9498dbb4/html5/thumbnails/22.jpg)
Time Between Steps in Path Exploration
• Minimum route advertisement interval (MRAI)– Minimum spacing between announcements– For a particular (prefix, peer) pair
• Advantages– Provides a rate limit on BGP updates– Allows grouping of updates within the
interval
• Disadvantages– Adds delay to the convergence process– E.g., 30 seconds for each step
![Page 23: BGP Convergence Jennifer Rexford. Outline Border Gateway Protocol (BGP) –Prefix-based routing at the AS level –Policy-based path-vector protocol –Incremental](https://reader036.vdocuments.us/reader036/viewer/2022081516/56649cc45503460f9498dbb4/html5/thumbnails/23.jpg)
BGP Converges Slowly, if at All
• Path vector avoids count-to-infinity– But, ASes still must explore many alternate paths
– … to find the highest-ranked path that is still available
• Fortunately, in practice– Most popular destinations have very stable BGP routes
– And most instability lies in a few unpopular destinations
• Still, lower BGP convergence delay is a goal– Can be tens of seconds to tens of minutes
– High for important interactive applications
– … or even conventional application, like Web browsing
![Page 24: BGP Convergence Jennifer Rexford. Outline Border Gateway Protocol (BGP) –Prefix-based routing at the AS level –Policy-based path-vector protocol –Incremental](https://reader036.vdocuments.us/reader036/viewer/2022081516/56649cc45503460f9498dbb4/html5/thumbnails/24.jpg)
Interaction with Route Flap Damping
• Motivation for route-flap damping– Flaky equipment goes up and down repeatedly– Leading to excessive BGP update messages– Eventually, want to suppress those updates
• Route Flap Damping– Accumulate a penalty with each routing change– … for each (prefix, peer) pair– Add a fixed penalty for each update message– … and decay the penalty exponentially with time– Apply thresholds to suppress or reuse the route
![Page 25: BGP Convergence Jennifer Rexford. Outline Border Gateway Protocol (BGP) –Prefix-based routing at the AS level –Policy-based path-vector protocol –Incremental](https://reader036.vdocuments.us/reader036/viewer/2022081516/56649cc45503460f9498dbb4/html5/thumbnails/25.jpg)
Operation of Route Flap Damping
Reuse limit
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
0
1000
2000
3000
4000
Time
Penalty
Suppress limit
NetworkAnnounced
NetworkRe-announced
NetworkNot Announced
![Page 26: BGP Convergence Jennifer Rexford. Outline Border Gateway Protocol (BGP) –Prefix-based routing at the AS level –Policy-based path-vector protocol –Incremental](https://reader036.vdocuments.us/reader036/viewer/2022081516/56649cc45503460f9498dbb4/html5/thumbnails/26.jpg)
Interaction with Route Flap Damping
• What are the right thresholds?• Set too high
– Route flaps consume a lot of resources– Users experience more transient disruptions
• Set too low– Regular path exploration triggers suppression– Users experience loss of connectivity
• Not easy to set the parameters “correctly”…– Route-flap damping disabled in many ASes
![Page 27: BGP Convergence Jennifer Rexford. Outline Border Gateway Protocol (BGP) –Prefix-based routing at the AS level –Policy-based path-vector protocol –Incremental](https://reader036.vdocuments.us/reader036/viewer/2022081516/56649cc45503460f9498dbb4/html5/thumbnails/27.jpg)
Research Questions
• How fast does BGP converge?– The n! upper bound is not all that meaningful– What is the tight upper bound?– How does delay depend on the topology?– How does delay depend on the routing policies?
• How to make BGP converge faster?– Any way to skip parts of path exploration process?– Any way to precompute the failover paths?– Any benefits if BGP were a multipath protocol?
• Any way to safely dampen unstable routes?
![Page 28: BGP Convergence Jennifer Rexford. Outline Border Gateway Protocol (BGP) –Prefix-based routing at the AS level –Policy-based path-vector protocol –Incremental](https://reader036.vdocuments.us/reader036/viewer/2022081516/56649cc45503460f9498dbb4/html5/thumbnails/28.jpg)
BGP Modeling: What Problem Does BGP Solve?
• Most do shortest-path routing– Shortest hop count
• Distance vector routing (e.g., RIP)
– Shortest path as sum of link weights• Link-state routing (e.g., OSPF and IS-IS)
• Policy makes BGP is more complicated– An AS might not tell a neighbor about a path
• E.g., Sprint can’t reach UUNET through AT&T
– An AS might prefer one path over a shorter one• E.g., ISP prefers to send traffic through a
customerWhat is a good model for BGP?
![Page 29: BGP Convergence Jennifer Rexford. Outline Border Gateway Protocol (BGP) –Prefix-based routing at the AS level –Policy-based path-vector protocol –Incremental](https://reader036.vdocuments.us/reader036/viewer/2022081516/56649cc45503460f9498dbb4/html5/thumbnails/29.jpg)
Could Use A Simulation Model
• Simulate the message passing– Advertisements and withdrawals– Message format– Timers
• Simulate the routing policy on each session– Filter certain route advertisements– Manipulate the attributes of others
• Simulate the decision process– Each router applying all the steps per prefix
Feasible, but tedious and ill-suited for formal arguments
![Page 30: BGP Convergence Jennifer Rexford. Outline Border Gateway Protocol (BGP) –Prefix-based routing at the AS level –Policy-based path-vector protocol –Incremental](https://reader036.vdocuments.us/reader036/viewer/2022081516/56649cc45503460f9498dbb4/html5/thumbnails/30.jpg)
1
Stable Paths Problem (SPP) Instance
• Node– BGP-speaking router– Node 0 is destination
• Edge– BGP adjacency
• Permitted paths– Set of routes to 0 at
each node – Ranking of the paths
2 5 5 2 1 0
0
2 1 02 0
1 3 01 0
3 0
4 2 04 3 0
3
4
2
1
most preferred…least preferred
![Page 31: BGP Convergence Jennifer Rexford. Outline Border Gateway Protocol (BGP) –Prefix-based routing at the AS level –Policy-based path-vector protocol –Incremental](https://reader036.vdocuments.us/reader036/viewer/2022081516/56649cc45503460f9498dbb4/html5/thumbnails/31.jpg)
5 5 2 1 0
1
A Solution to a Stable Paths Problem
• Solution– Path assignment per
node– Can be the “null” path
• If node u has path uwP– {u,w} is an edge in the
graph– Node w is assigned path
wP
• Each node is assigned – The highest ranked path
consistent with the assignment of its neighbors
2
0
2 1 02 0
1 3 01 0
3 0
4 2 04 3 0
3
4
2
1
A solution need not represent a shortest path tree, or a spanning tree.
![Page 32: BGP Convergence Jennifer Rexford. Outline Border Gateway Protocol (BGP) –Prefix-based routing at the AS level –Policy-based path-vector protocol –Incremental](https://reader036.vdocuments.us/reader036/viewer/2022081516/56649cc45503460f9498dbb4/html5/thumbnails/32.jpg)
An SPP May Have Multiple Solutions
1
0
2
1 2 01 0
2 1 02 0
First solution
1
0
2
1 2 01 0
2 1 02 0
1
0
2
1 2 01 0
2 1 02 0
Second solution
![Page 33: BGP Convergence Jennifer Rexford. Outline Border Gateway Protocol (BGP) –Prefix-based routing at the AS level –Policy-based path-vector protocol –Incremental](https://reader036.vdocuments.us/reader036/viewer/2022081516/56649cc45503460f9498dbb4/html5/thumbnails/33.jpg)
An SPP May Have No Solution
2
0
31
2 1 02 0
1 3 01 0
3 2 03 0
4
3
![Page 34: BGP Convergence Jennifer Rexford. Outline Border Gateway Protocol (BGP) –Prefix-based routing at the AS level –Policy-based path-vector protocol –Incremental](https://reader036.vdocuments.us/reader036/viewer/2022081516/56649cc45503460f9498dbb4/html5/thumbnails/34.jpg)
Ensuring Convergence is Difficult
• Create a global Internet routing registry– Difficult to keep up to date
• Require each AS to publish its routing policies– Difficult to get them to participate
• Check for conflicting policies, and resolve conflicts– Checking is NP-complete– Re-checking for each failure scenario
![Page 35: BGP Convergence Jennifer Rexford. Outline Border Gateway Protocol (BGP) –Prefix-based routing at the AS level –Policy-based path-vector protocol –Incremental](https://reader036.vdocuments.us/reader036/viewer/2022081516/56649cc45503460f9498dbb4/html5/thumbnails/35.jpg)
Research Problems
• Sufficient conditions for global convergence– Restrictions on the topology and routing policies– E.g., based on common types of biz relationships
• Still, an incomplete understanding– Some known combinations of sufficient conditions– Parts of the space are still unexplored
• How do policies affect convergence speed?– Models for the speed of convergence?– Upper bounds on convergence time?
• More on routing policies on Tuesday!