CS 640: Introduction to Computer Networks Aditya Akella Lecture 11 - Inter-Domain Routing - BGP (Border Gateway Protocol)

Slides:



Advertisements
Similar presentations
CS Summer 2003 CS672: MPLS Architecture, Applications and Fault-Tolerance.
Advertisements

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.
Network Layer4-1 Hierarchical Routing scale: with 200 million destinations: r can’t store all dest’s in routing tables! r routing table exchange would.
Lecture 9 Overview. Hierarchical Routing scale – with 200 million destinations – can’t store all dests in routing tables! – routing table exchange would.
© 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.
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.
Interdomain Routing and The Border Gateway Protocol (BGP) Courtesy of Timothy G. Griffin Intel Research, Cambridge UK
Computer Networking Inter-Domain Routing BGP (Border Gateway Protocol)
The Border Gateway Protocol (BGP) Sharad Jaiswal.
Computer Networking Lecture 10: Inter-Domain Routing
15-744: Computer Networking L-5 Inter-Domain Routing.
Ion Stoica October 2, 2002 (* this presentation is based on Lakshmi Subramanian’s slides) EE 122: Inter-domain routing – Border Gateway Protocol (BGP)
15-744: Computer Networking L-6 Inter-Domain Routing.
14 – Inter/Intra-AS Routing
© 2009 Cisco Systems, Inc. All rights reserved. ROUTE v1.0—6-1 Connecting an Enterprise Network to an ISP Network Considering the Advantages of Using BGP.
Border Gateway Protocol(BGP) L.Subramanian 23 rd October, 2001.
Computer Networking Inter-Domain Routing BGP (Border Gateway Protocol)
Computer Networks Layering and Routing Dina Katabi
Inter-domain Routing Outline Border Gateway Protocol.
14 – Inter/Intra-AS Routing Network Layer Hierarchical Routing scale: with > 200 million destinations: can’t store all dest’s in routing tables!
1 Computer Communication & Networks Lecture 22 Network Layer: Delivery, Forwarding, Routing (contd.)
Introduction to BGP.
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.
Lecture 4: BGP Presentations Lab information H/W update.
Computer Networking Inter-Domain Routing BGP (Border Gateway Protocol)
Computer Networking Inter-Domain Routing BGP (Border Gateway Protocol)
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.
Computer Networking Inter-Domain Routing BGP (Border Gateway Protocol)
Xuan Zheng (modified by M. Veeraraghavan) 1 BGP overview BGP operations BGP messages BGP decision algorithm BGP states.
Advance Computer Networking L-3 BGP Acknowledgments: Lecture slides are from the graduate level Computer Networks course thought by Srinivasan Seshan at.
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.
Network Layer4-1 Intra-AS Routing r Also known as Interior Gateway Protocols (IGP) r Most common Intra-AS routing protocols: m RIP: Routing Information.
TCOM 509 – Internet Protocols (TCP/IP) Lecture 06_a Routing Protocols: RIP, OSPF, BGP Instructor: Dr. Li-Chuan Chen Date: 10/06/2003 Based in part upon.
Computer Networking Inter-Domain Routing BGP (Border Gateway Protocol) Copyright ©, Carnegie Mellon University.
CSCI-1680 Network Layer: Inter-domain Routing Based partly on lecture notes by Rob Sherwood, David Mazières, Phil Levis, Rodrigo Fonseca John Jannotti.
An internet is a combination of networks connected by routers. When a datagram goes from a source to a destination, it will probably pass through many.
Routing in the Inernet Outcomes: –What are routing protocols used for Intra-ASs Routing in the Internet? –The Working Principle of RIP and OSPF –What is.
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.
1 Border Gateway Protocol (BGP) and BGP Security Jeff Gribschaw Sai Thwin ECE 4112 Final Project April 28, 2005.
Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
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.
Border Gateway Protocol BGP-4 BGP environment How BGP works BGP information BGP administration.
Computer Networking Inter-Domain Routing BGP (Border Gateway Protocol)
Computer Networking Inter-Domain Routing BGP (Border Gateway Protocol) Copyright ©, Carnegie Mellon University.
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.
1 CS716 Advanced Computer Networks By Dr. Amir Qayyum.
CS 3700 Networks and Distributed Systems
CS 3700 Networks and Distributed Systems
Border Gateway Protocol
BGP supplement Abhigyan Sharma.
Interdomain Traffic Engineering with BGP
Department of Computer and IT Engineering University of Kurdistan
COS 561: Advanced Computer Networks
Dan LI CS Department, Tsinghua University
COS 561: Advanced Computer Networks
COMP/ELEC 429/556 Introduction to Computer Networks
BGP Instability Jennifer Rexford
Computer Networks Protocols
Presentation transcript:

CS 640: Introduction to Computer Networks Aditya Akella Lecture 11 - Inter-Domain Routing - BGP (Border Gateway Protocol)

2 Intra-domain routing The Story So Far… –Routing protocols generate the forwarding table –Two styles: distance vector, link state –Scalability issues: Distance vector protocols suffer from count-to-infinity Link state protocols must flood information through network Today’s lecture –How to make routing protocols support large networks –How to make routing protocols support business policies

3 Inter-domain Routing: Hierarchy “Flat” routing not suited for the Internet –Doesn’t scale with network size Storage  Each node cannot be expected to store routes to every destination (or destination network) Convergence times increase Communication  Total message count increases –Administrative autonomy Each internetwork may want to run its network independently –E.g hide topology information from competitors Solution: Hierarchy via autonomous systems

4 Internet’s Hierarchy What is an Autonomous System (AS)? –A set of routers under a single technical administration Use an interior gateway protocol (IGP) and common metrics to route packets within the AS Connect to other ASes using gateway routers Use an exterior gateway protocol (EGP) to route packets to other AS’s –IGP: OSPF, RIP (last class) –Today’s EGP: BGP version 4

5 An example Intra-AS routing algorithm + Inter-AS routing algorithm  Forwarding table 3b 3a 3c 1c 1a 1b 1d 2a 2c 2b AS 2 AS 3 AS 1

6 The Problem Easy when only one link leading to outside AS Much harder when two or more links to outside ASes –Which destinations reachable via a neighbor? –Propagate this information to other internal routers –Select a “good route” from multiple choices –Inter-AS routing protocol Communication between distinct ASes Must be the same protocol!

7 History Mid-80s: EGP –Reachability protocol (no shortest path) –Did not accommodate cycles (tree topology) –Evolved when all networks connected to NSF backbone Result: BGP introduced as routing protocol –Latest version = BGP 4 –BGP-4 supports CIDR –Primary objective: connectivity not performance

8 BGP Preliminaries Pairs of routers exchange routing info over TCP connections (port 179) –One TCP connection for every pair of neighboring gateway routers –Routers called “BGP peers” –BGP peers exchange routing info as messages –TCP connection + messages  BGP session Neighbor ASes exchange info on which CIDR prefixes are reachable via them

9 Choices for Routing How to propagate routing information? Link state or distance vector? –No universal metric – policy decisions –Problems with distance-vector: Very slow convergence –Problems with link state: Metric used by ISPs not the same  loops LS database too large – entire Internet BGP: Path vector

10 AS Numbers (ASNs) ASNs are 16 bit values through are “private” ASNs represent units of routing policy Currently over 15,000 in use Genuity: 1 MIT: 3 CMU: 9 UC San Diego: 7377 AT&T: 7018, 6341, 5074, … UUNET: 701, 702, 284, 12199, … Sprint: 1239, 1240, 6211, 6242, … …

11 Distance Vector with Path Each routing update carries the entire AS- level path so far –“AS_Path attribute” Loops are detected as follows: –When AS gets route, check if AS already in path If yes, reject route If no, add self and (possibly) advertise route further –Advertisement depends on metrics/cost/preference etc. Advantage: –Metrics are local - AS chooses path, protocol ensures no loops

12 Hop-by-hop Model BGP advertises to neighbors only those routes that it uses –Consistent with the hop-by-hop Internet paradigm –Consequence: hear only one route from neighbor (although neighbor may have chosen this from a large set of choices) Could impact view into availability of paths

13 Policy with BGP BGP provides capability for enforcing various policies Policies are not part of BGP: they are provided to BGP as configuration information Enforces policies by –Choosing appropriate paths from multiple alternatives –Controlling advertisement to other AS’s

14 Examples of BGP Policies A multi-homed AS refuses to act as transit –Limit path advertisement A multi-homed AS can become transit for some AS’s –Only advertise paths to some AS’s An AS can favor or disfavor certain AS’s for traffic transit from itself

15 BGP Messages Open –Announces AS ID –Determines hold timer – interval between keep_alive or update messages, zero interval implies no keep_alive Keep_alive Sent periodically (but before hold timer expires) to peers to ensure connectivity. Sent in place of an UPDATE message Notification Used for error notification TCP connection is closed immediately after notification

16 BGP UPDATE Message List of withdrawn routes Network layer reachability information –List of reachable prefixes Path attributes –Origin –Path –Local_pref –MED –Metrics All prefixes advertised in message have same path attributes

17 Path Selection Criteria Attributes + external (policy) information Examples: –Policy considerations Preference for AS Presence or absence of certain AS –Hop count –Path origin

18 LOCAL PREF Local (within an AS) mechanism to provide relative priority among BGP exit points Prefer routers announced by one AS over another or general preference over routes R1R2 R3R4 I-BGP AS 256 AS 300 Local Pref = 500Local Pref =800 AS 100 R5 AS 200

19 AS_PATH List of traversed AS’s AS 500 AS 300 AS 200AS / / / /16

20 Multi-Exit Discriminator (MED) Hint to external neighbors about the preferred path into an AS –Different AS choose different scales Used when two AS’s connect to each other in more than one place –More useful in a customer provider setting –Not honored in other settings Will see later why

21 MED Hint to R1 to use R3 over R4 link Cannot compare AS40’s values to AS30’s R1R2 R3R4 AS 30 AS MED = MED = 200 AS MED = 50

22 MED MED is typically used in provider/subscriber scenarios It can lead to unfairness if used between ISP because it may force one ISP to carry more traffic: SF NY ISP1 ignores MED from ISP2 ISP2 obeys MED from ISP1 ISP2 ends up carrying traffic most of the way ISP1 ISP2

23 Decision Process (First cut) Rough processing order of attributes: –Select route with highest LOCAL-PREF –Select route with shortest AS-PATH –Apply MED (to routes learned from same neighbor) How to set the attributes? –Especially local_pref? –Policies in action

24 A Logical View of the Internet Tier 1 Tier 2 Tier 3 Tier 1 ISP –“Default-free” with global reachability info Tier 2 ISP –Regional or country-wide –Typically route through tier-1 Customer Tier 3/4 ISPs –Local –Route through higher tiers Stub AS –End network such as IBM or UW-Madison Stub

25 Inter-ISP Relationships: Transit vs. Peering ISP X ISP Y ISP Z ISP P Transit ($) Transit ($$$) Transit ($$ 1/2) Transit ($$) Peering (0) Transit ($$$) Transit ($) Transit ($$) Transit ($$$) These relationships have the greatest impact on BGP policies

26 Which route should Frank pick to /16? AS 1 AS 2 AS 4 AS /16 Frank’s Internet Barn peer customerprovider Illustrating BGP Policies

27 AS 1 AS 2 AS 4 AS /16 local pref = 80 local pref = 100 local pref = 90 Set appropriate “local pref” to reflect preferences: Higher Local preference values are preferred Policy I: Prefer Customer routing peer customerprovider Route learned from customer preferred over route learned from peer, preferred over route learned from provider

28 Policy II: Import Routes From peer From peer From provider From provider From customer From customer provider routecustomer routepeer routeISP route

29 Policy II: Export Routes To peer To peer To customer To customer To provider From provider provider routecustomer routepeer routeISP route filters block

30 Policy II: Valley-Free Routes “Valley-free” routing –Number links as (+1, 0, -1) for provider, peer and customer –In any valid path should only see sequence of +1, followed by at most one 0, followed by sequence of -1 –Why? Consider the economics of the situation How to make these choices? –Prefer-customer routing: LOCAL_PREF –Valley-free routes: control route advertisements (see previous slide)

31 BGP Route Selection Summary Highest Local Preference Shortest ASPATH Lowest MED i-BGP < e-BGP Lowest IGP cost to BGP egress Lowest router ID traffic engineering Enforce relationships E.g. prefer customer routes over peer routes Throw up hands and break ties

32 Internal vs. External BGP R3R4 R1 R2 E-BGP BGP can be used by R3 and R4 to learn routes How do R1 and R2 learn best routes? Use I-BGP Create a full mesh TCP connections Use this to exchanged BGP route information AS1 AS2

33 Link Failures Two types of link failures: –Failure on an E-BGP link –Failure on an I-BGP Link These failures are treated completely different in BGP Why?

34 Failure on an E-BGP Link AS1 R1 AS2 R2 Physical link E-BGP session / /30 If the link R1-R2 goes down The TCP connection breaks BGP routes are removed This is the desired behavior

35 Failure on an I-BGP Link R1 R2 R3 Physical link I-BGP connection / /30 If link R1-R2 goes down, R1 and R2 should still be able to exchange traffic The indirect path through R3 must be used Thus, E-BGP and I-BGP must use different conventions with respect to TCP endpoints

36 Next Class Multicast –Service model –IGMP –IP Multicast routing protocols –Overlay-based multicast