BGP EE 122, Fall 2013 Sylvia Ratnasamy Material thanks to Ion Stoica, Scott Shenker, Jennifer Rexford, and many other.

Slides:



Advertisements
Similar presentations
1 Interdomain Traffic Engineering with BGP By Behzad Akbari Spring 2011 These slides are based on the slides of Tim. G. Griffin (AT&T) and Shivkumar (RPI)
Advertisements

BGP.
Border Gateway Protocol Ankit Agarwal Dashang Trivedi Kirti Tiwari.
Network Layer: Internet-Wide Routing & BGP Dina Katabi & Sam Madden.
CS540/TE630 Computer Network Architecture Spring 2009 Tu/Th 10:30am-Noon Sue Moon.
Lecture 9 Overview. Hierarchical Routing scale – with 200 million destinations – can’t store all dests in routing tables! – routing table exchange would.
Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.
© J. Liebeherr, All rights reserved 1 Border Gateway Protocol This lecture is largely based on a BGP tutorial by T. Griffin from AT&T Research.
Border Gateway Protocol Autonomous Systems and Interdomain Routing (Exterior Gateway Protocol EGP)
Fundamentals of Computer Networks ECE 478/578 Lecture #18: Policy-Based Routing Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University.
INTERDOMAIN ROUTING POLICY COS 461: Computer Networks Spring 2010 (MW 3:00-4:20 in COS 105) Mike Freedman
1 Interdomain Routing Protocols. 2 Autonomous Systems An autonomous system (AS) is a region of the Internet that is administered by a single entity and.
Part II: Inter-domain Routing Policies. March 8, What is routing policy? ISP1 ISP4ISP3 Cust1Cust2 ISP2 traffic Connectivity DOES NOT imply reachability!
Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet Protocol –Datagram format.
1 Interdomain Routing EE122 Fall 2011 Scott Shenker Materials with thanks to Jennifer Rexford, Ion Stoica, Vern Paxson.
Practical and Configuration issues of BGP and Policy routing Cameron Harvey Simon Fraser University.
CS 164: Global Internet Slide Set In this set... More about subnets Classless Inter Domain Routing (CIDR) Border Gateway Protocol (BGP) Areas with.
Interdomain Routing and The Border Gateway Protocol (BGP) Courtesy of Timothy G. Griffin Intel Research, Cambridge UK
1 Policy-Based Path-Vector Routing Reading: Sections COS 461: Computer Networks Spring 2006 (MW 1:30-2:50 in Friend 109) Jennifer Rexford Teaching.
INTERDOMAIN ROUTING POLICY READING: SECTIONS PLUS OPTIONAL READING COS 461: Computer Networks Spring 2009 (MW 1:30-2:50 in COS 105) Mike Freedman.
Slide -1- February, 2006 Interdomain Routing Gordon Wilfong Distinguished Member of Technical Staff Algorithms Research Department Mathematical and Algorithmic.
Computer Networking Lecture 10: Inter-Domain Routing
More on BGP Check out the links on politics: ICANN and net neutrality To read for next time Path selection big example Scaling of BGP.
Interdomain Routing Establish routes between autonomous systems (ASes). Currently done with the Border Gateway Protocol (BGP). AT&T Qwest Comcast Verizon.
Internet Routing (COS 598A) Today: Interdomain Traffic Engineering Jennifer Rexford Tuesdays/Thursdays.
Inherently Safe Backup Routing with BGP Lixin Gao (U. Mass Amherst) Timothy Griffin (AT&T Research) Jennifer Rexford (AT&T Research)
Ion Stoica October 2, 2002 (* this presentation is based on Lakshmi Subramanian’s slides) EE 122: Inter-domain routing – Border Gateway Protocol (BGP)
14 – Inter/Intra-AS Routing
1 Interdomain Routing Policy Reading: Sections plus optional reading COS 461: Computer Networks Spring 2008 (MW 1:30-2:50 in COS 105) Jennifer Rexford.
Backbone Networks Jennifer Rexford COS 461: Computer Networks Lectures: MW 10-10:50am in Architecture N101
Interdomain Routing Policy COS 461: Computer Networks Spring 2011 Mike Freedman 1.
Interdomain Routing and the Border Gateway Protocol (BGP) Reading: Section COS 461: Computer Networks Spring 2011 Mike Freedman
ROUTING PROTOCOLS PART IV ET4187/ET5187 Advanced Telecommunication Network.
Border Gateway Protocol(BGP) L.Subramanian 23 rd October, 2001.
BGP CS168, Fall 2014 Sylvia Ratnasamy
Computer Networks Layering and Routing Dina Katabi
Inter-domain Routing Outline Border Gateway Protocol.
1 Interdomain Routing (BGP) By Behzad Akbari Fall 2008 These slides are based on the slides of Ion Stoica (UCB) and Shivkumar (RPI)
CS 3700 Networks and Distributed Systems Inter Domain Routing (It’s all about the Money) Revised 8/20/15.
CS 3830 Day 29 Introduction 1-1. Announcements r Quiz 4 this Friday r Signup to demo prog4 (all group members must be present) r Written homework on chapter.
Jennifer Rexford Fall 2014 (TTh 3:00-4:20 in CS 105) COS 561: Advanced Computer Networks BGP.
Border Gateway Protocol
Network Layer r Introduction r Datagram networks r IP: Internet Protocol m Datagram format m IPv4 addressing m ICMP r What’s inside a router r Routing.
Xuan Zheng (modified by M. Veeraraghavan) 1 BGP overview BGP operations BGP messages BGP decision algorithm BGP states.
Border Gateway Protocol (BGP) W.lilakiatsakun. BGP Basics (1) BGP is the protocol which is used to make core routing decisions on the Internet It involves.
More on Internet Routing A large portion of this lecture material comes from BGP tutorial given by Philip Smith from Cisco (ftp://ftp- eng.cisco.com/pfs/seminars/APRICOT2004.
T. S. Eugene Ngeugeneng at cs.rice.edu Rice University1 COMP/ELEC 429/556 Introduction to Computer Networks Inter-domain routing Some slides used with.
Interdomain Routing EE 122: Intro to Communication Networks Fall 2010 (MW 4-5:30 in 101 Barker) Scott Shenker TAs: Sameer Agarwal, Sara Alspaugh, Igor.
CS 640: Introduction to Computer Networks Aditya Akella Lecture 11 - Inter-Domain Routing - BGP (Border Gateway Protocol)
1 Agenda for Today’s Lecture The rationale for BGP’s design –What is interdomain routing and why do we need it? –Why does BGP look the way it does? How.
Text BGP Basics. Document Name CONFIDENTIAL Border Gateway Protocol (BGP) Introduction to BGP BGP Neighbor Establishment Process BGP Message Types BGP.
Michael Schapira, Princeton University Fall 2010 (TTh 1:30-2:50 in COS 302) COS 561: Advanced Computer Networks
Inter-domain Routing Outline Border Gateway Protocol.
CS 640: Introduction to Computer Networks Aditya Akella Lecture 11 - Inter-Domain Routing - BGP (Border Gateway Protocol)
ROUTING ON THE INTERNET COSC Jun-16. Routing Protocols  routers receive and forward packets  make decisions based on knowledge of topology.
1 Internet Routing 11/11/2009. Admin. r Assignment 3 2.
CS 3700 Networks and Distributed Systems
Border Gateway Protocol
BGP 1. BGP Overview 2. Multihoming 3. Configuring BGP.
CS 3700 Networks and Distributed Systems
Border Gateway Protocol
COS 561: Advanced Computer Networks
BGP supplement Abhigyan Sharma.
Lixin Gao ECE Dept. UMASS, Amherst
BGP Overview BGP concepts and operation.
COS 561: Advanced Computer Networks
COS 561: Advanced Computer Networks
BGP Instability Jennifer Rexford
Computer Networks Protocols
Network Layer: Internet Inter-Domain Routing
Presentation transcript:

BGP EE 122, Fall 2013 Sylvia Ratnasamy Material thanks to Ion Stoica, Scott Shenker, Jennifer Rexford, and many other colleagues

BGP: The story so far Destinations are IP prefixes ( /8) Nodes are Autonomous Systems (ASes) Links represent both physical connections and business relationships customer-provider or peer-to-peer BGP path-vector protocol policy-driven route selection

BGP: Today BGP policy typical policies, how they’re implemented BGP protocol details Issues with BGP

Policy imposed in how routes are selected and exported Selection: Which path to use? controls whether/how traffic leaves the network Export: Which path to advertise? controls whether/how traffic enters the network Can reach 128.3/16 blah Route selection Customer Competitor Route export

Typical Selection Policy In decreasing order of priority make/save money (send to customer > peer > provider) maximize performance (smallest AS path length) minimize use of my network bandwidth (“hot potato”) … …

Typical Export Policy We’ll refer to these as the “Gao-Rexford” rules (capture common -- but not required! -- practice!)

Gao-Rexford peers providers customers With Gao-Rexford, the customer-provider graph is a DAG (directed acyclic graph) and routes are “valley free”

BGP: Today BGP policy typical policies, how they’re implemented BGP protocol details stay awake as long as you can… BGP issues

Who speaks BGP? Border router Internal router Border routers at an Autonomous System

What does “speak BGP” mean? Implement the standardized BGP protocol read more here: Specifies what messages to exchange with other BGP “speakers” message types: e.g., route advertisements message syntax: e.g., first X bytes for dest prefix; next Y for AS path, etc. And how to process these messages e.g., “when you receive a message of type X, apply this selection rule, then…” as per BGP state machine in the protocol spec + policy decisions, etc.

BGP “sessions” A border router speaks BGP with border routers in other ASes “eBGP session”

BGP “sessions” A border router speaks BGP with other (interior and border) routers in its own AS “iBGP session”

eBGP, iBGP, IGP eBGP: BGP sessions between border routers in different ASes Learn routes to external destinations iBGP: BGP sessions between border routers and other routers within the same AS distribute externally learned routes internally assume a full all-to-all mesh of iBGP sessions IGP: “Interior Gateway Protocol” = Intradomain routing protocol provide internal reachability e.g., OSPF, RIP

Some Border Routers Don’t Need BGP Customer that connects to a single upstream ISP The ISP can advertise prefixes into BGP on behalf of customer … and the customer can simply default-route to the ISP Provider Customer Install default routes /0 pointing to Provider Install routes /16 pointing to Customer /16

Putting the pieces together 1.Provide internal reachability (IGP) 2.Learn routes to external destinations (eBGP) 3.Distribute externally learned routes internally (iBGP) 4.Travel shortest path to egress (IGP)

Basic Messages in BGP Open Establishes BGP session BGP uses TCP [will make sense in 1-2weeks] Notification Report unusual conditions Update Inform neighbor of new routes Inform neighbor of old routes that become inactive Keepalive Inform neighbor that connection is still viable

BGP Operations Open session on TCP port 179 Exchange all active routes Exchange incremental Updates AS1 AS2 While connection is ALIVE exchange route UPDATE messages BGP session

Route Updates Format attributes describe properties of the route Two kinds of updates announcements: new routes or changes to existing routes withdrawal: remove routes that no longer exist

Route Attributes Routes are described using attributes Used in route selection/export decisions Some attributes are local i.e., private within an AS, not included in announcements e.g., LOCAL PREF, ORIGIN Some attributes are propagated with eBGP route announcements e.g., NEXT HOP, AS PATH, MED, etc. There are many standardized attributes in BGP We will discuss a few

Attributes (1): ASPATH Carried in route announcements Vector that lists all the ASes a route announcement has traversed (in reverse order) e.g., “ ” AS 7018 AT&T AS /16 AS path = AS 88 Princeton, /16 IP prefix = /16 AS path = 88

21 Example: ASPATH AS /16 AS Path = 88 AS 1239 Sprint AS 1755 Ebone AT&T AS 3549 Global Crossing /16 AS Path = /16 AS Path = AS /16 Princeton Prefix Originated AS RIPE NCC RIS project AS 1129 Global Access /16 AS Path = /16 AS Path = /16 AS Path = /16 AS Path =

Attributes (2): NEXT HOP Carried in a route update message IP address of next hop router on path to destination Updated as the announcement leaves AS AS 88 Princeton, /16 IP prefix = /16 AS path = 88 Next Hop = AS 7018 AT&T AS /16 AS path = Next Hop =

Attributes (3): LOCAL PREF “Local Preference” Used to choose between different AS paths The higher the value the more preferred Local to an AS; carried only in iBGP messages Ensures consistent route selection across an AS AS4 AS2 AS3 AS /24 BGP table at AS4:

Example: iBGP and LOCAL PREF Both routers prefer the path through AS 100 on the left I-BGP AS 4 AS 3 Local Pref = 100 Local Pref = 90 AS 2 AS1

Attributes (4): ORIGIN Records who originated the announcement Local to an AS Options: “e” : from eBGP “i” : from iBGP “?” : Incomplete; often used for static routes Typically: e > i > ?

Attributes (5) : MED “Multi-Exit Discriminator” Used when ASes are interconnected via 2 or more links to specify how close a prefix is to the link it is announced on Lower is better AS announcing prefix sets MED (AS2 in picture) AS receiving prefix (optionally!) uses MED to select link (AS1 in pic.) Link B Link A MED=10 MED=50 AS1 AS2 AS3 destination prefix

27 Attributes (6): IGP cost Used for hot-potato routing Each router selects the closest egress point based on the path cost in intra-domain protocol hot potato A B C D G E F A B dst

IGP may conflict with MED D sf A B NEXTHOP=SF MED=100 NEXTHOP=BOS MED=500

Using Attributes Rules for route selection in priority order

BGP UPDATE Processing Best Route Selection Apply Import Policies Best Route Table Apply Export Policies Install forwarding Entries for best Routes. Receive BGP Updates Best Routes Transmit BGP Updates Filter routes & tweak attributes Based on Attribute Values IP Forwarding Table Apply Policy = filter routes & tweak attributes Open ended programming. Constrained only by vendor configuration language

BGP: Today BGP policy typical policies, how they’re implemented BGP protocol details BGP issues

Issues with BGP Reachability Security Convergence Performance

Reachability In normal routing, if graph is connected then reachability is assured With policy routing, this does not always hold AS 2 AS 3AS 1 Provider Customer

Security An AS can claim to serve a prefix that they actually don’t have a route to (blackholing traffic) Problem not specific to policy or path vector Important because of AS autonomy Fixable: make ASes “prove” they have a path Note: AS can also have incentive to forward packets along a route different from what is advertised Tell customers about fictitious short path… Much harder to fix!

Convergence Result: If all AS policies follow “Gao-Rexford” rules, BGP is guaranteed to converge (safety) For arbitrary policies, BGP may fail to converge!

36 Example of Policy Oscillation “1” prefers “1 3 0” over “1 0” to reach “0”

37 Step-by-Step of Policy Oscillation Initially: nodes 1, 2, 3 know only shortest path to

38 1 advertises its path 1 0 to advertise: 1 0 Step-by-Step of Policy Oscillation

Step-by-Step of Policy Oscillation

advertise: advertises its path 3 0 to 1 Step-by-Step of Policy Oscillation

Step-by-Step of Policy Oscillation

withdraw: withdraws its path 1 0 from 2 Step-by-Step of Policy Oscillation

Step-by-Step of Policy Oscillation

advertise: advertises its path 2 0 to 3 Step-by-Step of Policy Oscillation

Step-by-Step of Policy Oscillation

withdraw: withdraws its path 3 0 from 1 Step-by-Step of Policy Oscillation

Step-by-Step of Policy Oscillation

advertises its path 1 0 to 2 Step-by-Step of Policy Oscillation advertise: 1 0

Step-by-Step of Policy Oscillation

withdraw: withdraws its path 2 0 from 3 Step-by-Step of Policy Oscillation

We are back to where we started! Step-by-Step of Policy Oscillation

Convergence Result: If all AS policies follow “Gao-Rexford” rules, BGP is guaranteed to converge (safety) For arbitrary policies, BGP may fail to converge! Should this trouble us?

Performance Nonissues Internal routing (non) Domains typically use “hot potato” routing Not always optimal, but economically expedient Policy not about performance (non) So policy-chosen paths aren’t shortest Choosing among policy-compliant paths (non) Fewest AS hops has little to do with actual delay 20% of paths inflated by at least 5 router hops

Performance (example) AS path length can be misleading An AS may have many router-level hops AS 4 AS 3 AS 2 AS 1 BGP says that path 4 1 is better than path 3 2 1

Real Performance Issue: Slow convergence BGP outages are biggest source of Internet problems Labovitz et al. SIGCOMM’97 10% of routes available less than 95% of time Less than 35% of routes available 99.99% of the time Labovitz et al. SIGCOMM % of path outages take 30+ minutes to repair But most popular paths are very stable

BGP Misconfigurations BGP protocol is both bloated and underspecified lots of leeway in how to set and interpret attribute values, route selection rules, etc. necessary to allow autonomy, diverse policies but also gives operators plenty of rope Much of this configuration is manual and ad hoc And the core abstraction is fundamentally flawed per-router configuration to effect AS-wide policy now strong industry interest in changing this! [later: SDN]

BGP: How did we get here? BGP was designed for a different time before commercial ISPs and their needs before address aggregation before multi-homing We don’t get a second chance: `clean slate’ designs virtually impossible to deploy Thought experiment: how would you design a policy-driven interdomain routing solution? How would you deploy it? 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)

Next Time. Wrap up the network layer! the IPv4 header IP routers