Interdomain Routing and The Border Gateway Protocol (BGP)

Slides:



Advertisements
Similar presentations
Rensselaer Polytechnic Institute 1 Today’s Big Picture Large ISP Dial-Up ISP Access Network Small ISP Stub Large number of diverse networks.
Advertisements

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)
BGP.
Border Gateway Protocol Ankit Agarwal Dashang Trivedi Kirti Tiwari.
CS540/TE630 Computer Network Architecture Spring 2009 Tu/Th 10:30am-Noon Sue Moon.
© 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
Interdomain Routing and The Border Gateway Protocol (BGP) CL Oct 27, 2004 Timothy G. Griffin Intel Research, Cambridge UK
1 Border Gateway Protocol (BGP). 2 Contents  Internet connectivity and BGP  connectivity services, AS relationships  BGP Basics  BGP sessions, BGP.
An open problem in Internet Routing --- Policy Language Design for BGP Nov 3, 2003 Timothy G. Griffin Intel Research, Cambridge UK
1 Network Architecture and Design Routing: Exterior Gateway Protocols and Autonomous Systems Border Gateway Protocol (BGP) Reference D. E. Comer, Internetworking.
Practical and Configuration issues of BGP and Policy routing Cameron Harvey Simon Fraser University.
Interdomain Routing and The Border Gateway Protocol (BGP) Courtesy of Timothy G. Griffin Intel Research, Cambridge UK
The Border Gateway Protocol (BGP) Sharad Jaiswal.
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.
Computer Networking Lecture 10: Inter-Domain Routing
Internet Routing (COS 598A) Today: Interdomain Traffic Engineering Jennifer Rexford Tuesdays/Thursdays.
Announcement Paper summary due at 11:59PM before the class Sometimes there are two papers which are closely related. In your summary –Share the problem.
Ion Stoica October 2, 2002 (* this presentation is based on Lakshmi Subramanian’s slides) EE 122: Inter-domain routing – Border Gateway Protocol (BGP)
CSEE W4140 Networking Laboratory Lecture 5: IP Routing (OSPF and BGP) Jong Yul Kim
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.
© 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.
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.
Inter-domain Routing Outline Border Gateway Protocol.
Introduction to BGP 1. Border Gateway Protocol A Routing Protocol used to exchange routing information between different networks – Exterior gateway protocol.
Inter-domain Routing: Today and Tomorrow Dr. Jia Wang AT&T Labs Research Florham Park, NJ 07932, USA
© 2009 Cisco Systems, Inc. All rights reserved. ROUTE v1.0—6-1 Connecting an Enterprise Network to an ISP Network BGP Attributes and Path Selection Process.
Introduction to BGP.
IP is a Network Layer Protocol Physical 1 Network DataLink 1 Transport Application Session Presentation Network Physical 1 DataLink 1 Physical 2 DataLink.
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.
Understanding and Limiting BGP Instabilities Zhi-Li Zhang Jaideep Chandrashekar Kuai Xu
Lecture 4: BGP Presentations Lab information H/W update.
Jennifer Rexford Fall 2014 (TTh 3:00-4:20 in CS 105) COS 561: Advanced Computer Networks BGP.
Chapter 9. Implementing Scalability Features in Your Internetwork.
Border Gateway Protocol
Xuan Zheng (modified by M. Veeraraghavan) 1 BGP overview BGP operations BGP messages BGP decision algorithm BGP states.
BGP4 - Border Gateway Protocol. Autonomous Systems Routers under a single administrative control are grouped into autonomous systems Identified by a 16.
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.
Slides Selected from SIGCOMM 2001 BGP Tutorial by Tim Griffin.
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 1 ECSE-6600: Internet Protocols Informal Quiz #08: SOLUTIONS Shivkumar Kalyanaraman: GOOGLE: “Shiv.
Interdomain Routing and BGP Routing NJIT May 3, 2003 Timothy G. Griffin AT&T Research
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.
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
CS 640: Introduction to Computer Networks Aditya Akella Lecture 11 - Inter-Domain Routing - BGP (Border Gateway Protocol)
Border Gateway Protocol BGP-4 BGP environment How BGP works BGP information BGP administration.
1 Internet Routing 11/11/2009. Admin. r Assignment 3 2.
CS 3700 Networks and Distributed Systems
Boarder Gateway Protocol (BGP)
Border Gateway Protocol
CS 3700 Networks and Distributed Systems
Border Gateway Protocol
BGP supplement Abhigyan Sharma.
Interdomain Traffic Engineering with BGP
Cours BGP-MPLS-IPV6-QOS
COS 561: Advanced Computer Networks
COS 561: Advanced Computer Networks
BGP Instability Jennifer Rexford
Presentation transcript:

Interdomain Routing and The Border Gateway Protocol (BGP)

Today’s Big Picture Large ISP GPRS Access Network Small ISP Stub Large number of diverse networks

Internet AS Map: caida.org

Autonomous System(AS) Internet is not a single network –Collection of networks controlled by different administrations An autonomous system is a network under a single administrative control IANA –An AS owns unique IP prefixes –Every AS has a unique AS number ASes need to inter-network themselves to form a single virtual global network –Need a common protocol for communication

Who speaks Inter-AS routing? R border routerinternal router BGP R2R1R3 AS1 AS2  Two types of routers  Border router (Edge)  Internal router (Core)  Two border routers of different ASes will have a BGP session

Autonomous Systems (ASes)  An autonomous system is an autonomous routing domain that has been assigned an Autonomous System Number (ASN).  All parts within an AS remain connected. RFC 1930: Guidelines for creation, selection, and registration of an Autonomous System … the administration of an AS appears to other ASes to have a single coherent interior routing plan and presents a consistent picture of what networks are reachable through it.

IP Address Allocation and Assignment: Internet Registries IANA RFC Internet Registry IP Allocation Guidelines RFC Address Allocation for Private Internets RFC An Architecture for IP Address Allocation with CIDR ARIN APNIC RIPE Allocate to National and local registries and ISPs Addresses assigned to customers by ISPs

Whois servers (AS, IP) –AS bin/whois.plhttp://ws.arin.net/cgi- bin/whois.pl –AS701 bin/whois.plhttp:// bin/whois.pl –AS4808

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

Partial View of ( ) Neighborhood AS 786 ja.net AS 1239 Sprint AS 4373 Online Computer Library Center Originates > 180 prefixes, Including /16 AS 3356 Level 3 AS 6461 AboveNet AS 1213 HEAnet (Irish academic and research) AS 7 UK Defense Research Agency AS 4637 REACH AS Hanse AS 3257 Tiscali AS 5089 NTL Group AS Versatel AS 5459 LINX AS 702 UUNET AS GEANT

How Many ASNs are there today? Thanks to Geoff Huston. on October 26, ,217 12,940 origin only (no transit)

IP network assignment process IANA RIR Allocation RIR ISP Allocation ISP BGP Announcement IETF IANA Delegation

RIR Allocations - Current Allocated

BGP Routing Table - Current

How many prefixes today? Thanks to Geoff Huston. on October 26, ,903 Note: numbers actually depends point of view…

The Gang of Four Link StateVectoring EGP IGP BGP RIPOSPF EIGRP

17 BGP-4 BGP = Border Gateway Protocol Is a Policy-Based routing protocol Is the de facto EGP of today’s global Internet Relatively simple protocol, but configuration is complex and the entire world can see, and be impacted by, your mistakes : 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)

The Border Gateway Protocol (BGP) BGP = RFC “optional” extensions RFC 1997 (communities) RFC 2439 (damping) RFC 2796 (reflection) RFC3065 (confederation) … + routing policy configuration languages (vendor-specific) + Current Best Practices in management of Interdomain Routing BGP was not DESIGNED. It EVOLVED.

19 BGP Operations (Simplified) Establish session on TCP port 179 Exchange all active routes Exchange incremental updates AS1 AS2 While connection is ALIVE exchange route UPDATE messages BGP session

20 Four Types of BGP Messages Open : Establish a peering session. Keep Alive : Handshake at regular intervals. Notification : Shuts down a peering session. Update : Announcing new routes or withdrawing previously announced routes. announcement = prefix + attributes values

BGP Attributes Value Code Reference ORIGIN [RFC1771] 2 AS_PATH [RFC1771] 3 NEXT_HOP [RFC1771] 4 MULTI_EXIT_DISC [RFC1771] 5 LOCAL_PREF [RFC1771] 6 ATOMIC_AGGREGATE [RFC1771] 7 AGGREGATOR [RFC1771] 8 COMMUNITY [RFC1997] 9 ORIGINATOR_ID [RFC2796] 10 CLUSTER_LIST [RFC2796] 11 DPA [Chen] 12 ADVERTISER [RFC1863] 13 RCID_PATH / CLUSTER_ID [RFC1863] 14 MP_REACH_NLRI [RFC2283] 15 MP_UNREACH_NLRI [RFC2283] 16 EXTENDED COMMUNITIES [Rosen] reserved for development From IANA: Most important attributes Not all attributes need to be present in every announcement

Attributes are Used to Select Best Routes /24 pick me! /24 pick me! /24 pick me! /24 pick me! Given multiple routes to the same prefix, a BGP speaker must pick at most one best route (Note: it could reject them all!)

23 BGP Route 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 Apply Policy = 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

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 Throw up hands and break ties

BGP Routing Tables Use “whois” queries to associate an ASN with “owner” (for example, = AT&T Worldnet, 701 =Uunet, 3561 = Cable & Wireless, … show ip bgp BGP table version is , local router ID is Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path... *>i i *>i i *>i i *>i i *>i i *>i i *>i i *>i i *>i i *>i / i... Thanks to Geoff Huston. on July 6, 2001

AS Graphs Can Be Fun

27 Policy : Transit vs. Nontransit AS 701 AS144 AS 701 A nontransit AS allows only traffic originating from AS or traffic with destination within AS IP traffic UUnet Bell Labs AT&T CBB A transit AS allows traffic with neither source nor destination within AS to flow across the network

Customers and Providers Customer pays provider for access to the Internet provider customer IP traffic provider customer

The “Peering” Relationship peer customerprovider Peers provide transit between their respective customers Peers do not provide transit between peers Peers (often) do not exchange $$$ traffic allowed traffic NOT allowed

Peering Provides Shortcuts Peering also allows connectivity between the customers of “Tier 1” providers. peer customerprovider

Peering Wars Reduces upstream transit costs Can increase end-to- end performance May be the only way to connect your customers to some part of the Internet (“Tier 1”) You would rather have customers Peers are usually your competition Peering relationships may require periodic renegotiation Peering struggles are by far the most contentious issues in the ISP world! Peering agreements are often confidential. PeerDon’t Peer

32 Policy-Based vs. Distance-Based Routing? ISP1 ISP2 ISP3 Cust1 Cust2 Cust3 Host 1 Host 2 Minimizing “hop count” can violate commercial relationships that constrain inter- domain routing. YES NO

What is Routing Policy Policy refers to arbitrary preference among a menu of available routes (based upon routes’ attributes) –Public description of the relationship between external BGP peers –Can also describe internal BGP peer relationship Eg: Who are my BGP peers What routes are –Originated by a peer –Imported from each peer –Exported to each peer –Preferred when multiple routes exist What to do if no route exists?

Routing Policy Example AS1 originates prefix “d” AS1 exports “d” to AS2, AS2 imports AS2 exports “d” to AS3, AS3 imports AS3 exports “d” to AS5, AS5 imports

Routing Policy Example (cont) AS5 also imports “d” from AS4 Which route does it prefer? –Does it matter? –Consider case where AS3 = Commercial Internet AS4 = Internet2

Import and Export Policies Inbound filtering controls outbound traffic –filters route updates received from other peers –filtering based on IP prefixes, AS_PATH, community Outbound Filtering controls inbound traffic –forwarding a route means others may choose to reach the prefix through you –not forwarding a route means others must use another router to reach the prefix Attribute Manipulation –Import: LOCAL_PREF (manipulate trust) –Export: AS_PATH and MEDs

37 ASPATH Attribute AS /16 AS Path = 6341 AS 1239 Sprint AS 1755 Ebone AT&T AS 3549 Global Crossing /16 AS Path = /16 AS Path = AS /16 AT&T Research Prefix Originated AS RIPE NCC RIS project AS 1129 Global Access /16 AS Path = /16 AS Path = /16 AS Path = /16 AS Path =

In fairness: could you do this “right” and still scale? Exporting internal state would dramatically increase global instability and amount of routing state Shorter Doesn’t Always Mean Shorter AS 4 AS 3 AS 2 AS 1 Mr. BGP says that path 4 1 is better than path Duh!

Routing Example 1

Routing Example 2

Tweak Tweak Tweak (TE) For inbound traffic –Filter outbound routes –Tweak attributes on outbound routes in the hope of influencing your neighbor’s best route selection For outbound traffic –Filter inbound routes –Tweak attributes on inbound routes to influence best route selection outbound routes inbound routes inbound traffic outbound traffic In general, an AS has more control over outbound traffic

42 LOCAL PREFERENCE AS 1 AS 2 AS 4 AS /16 local pref = 80 local pref = 100 local pref = 90 Higher Local preference values are more preferred Local preference used ONLY in iBGP

43 Implementing Backup Links with Local Preference (Outbound Traffic) Forces outbound traffic to take primary link, unless link is down. AS 1 primary link backup link Set Local Pref = 100 for all routes from AS 1 AS Set Local Pref = 50 for all routes from AS 1 We’ll talk about inbound traffic soon …

44 Multihomed Backups (Outbound Traffic) Forces outbound traffic to take primary link, unless link is down. AS 1 primary link backup link Set Local Pref = 100 for all routes from AS 1 AS 2 Set Local Pref = 50 for all routes from AS 3 AS 3 provider

45 ASpath prepending AS /24 ASPATH = customer AS 2 provider /24 ASPATH = 2 AS 3 provider Padding in this way is often used as a form of load balancing backupprimary

46 COMMUNITY Attribute to the Rescue! AS 1 customer AS 2 provider /24 ASPATH = 2 AS 3 provider backupprimary /24 ASPATH = 2 COMMUNITY = 3:70 Customer import policy at AS 3: If 3:90 in COMMUNITY then set local preference to 90 If 3:80 in COMMUNITY then set local preference to 80 If 3:70 in COMMUNITY then set local preference to 70 AS 3: normal customer local pref is 100, peer local pref is 90

BGP Summary BGP4 is the protocol used on the Internet to exchange routing information between providers, and to propagate external routing information through networks. Each autonomous network is called an Autonomous System. ASs which inject routing information on their own behalf have ASNs.

BGP Peering BGP-speaking routers peer with each other over TCP sessions, and exchange routes through the peering sessions. Providers typically try to peer at multiple places. Either by peering with the same AS multiple times, or because some ASs are multi-homed, a typical network will have many candidate paths to a given prefix.

The BGP Route The BGP route is, conceptually, a “promise” to carry data to a section of IP space. The route is a “bag” of attributes. The section of IP space is called the “prefix” attribute of the route. As a BGP route travels from AS to AS, the ASN of each AS is stamped on it when it leaves that AS. Called the AS_PATH attribute, or “as-path” in Cisco-speak.

BGP Route Attributes In addition to the prefix, the as-path, and the next-hop, the BGP route has other attributes, affectionately known as “knobs and twiddles” - –weight, rarely used - “sledgehammer” –local-pref, sometimes used - “hammer” –origin code, rarely used –MED (“metric”) - a gentle nudge