routing on the internetweb.eecs.umich.edu/~sugih/courses/eecs489/lectures/17-bgp.pdf · internet...

8
Computer Networks Lecture 17: Inter-domain Routing and BGP Routing on the Internet In the beginning there was the ARPANET: route using GGP (Gateway-to-Gateway Protocol), a distance vector routing protocol Problems: needed “flag-hour” to update routing protocol incompatibility across vendors Routing on the Internet Solution: hierarchical routing administrative autonomy: each network admin can control routing within its own network internet: network of networks allows the Internet to scale: with 200 million hosts, each router can’t store all destinations in its routing table route updates alone will swamp the links Aggregate routers into regions of “autonomous systems” (ASs) 1.1 2.1 3.1 2.2 4.1 4.4 4.3 4.2 3.4 3.3 3.2 border routers AS1 AS2 AS3 AS4 Hierarchical Routing Gateway/border router neighboring ASs interact to coordinate routing direct link to router in other AS(s) keeps in its routing table: next hop to other ASs all hosts within its AS hosts within an AS only keep a default route to the border router 3.1 dest next 1.* 1.1 2.* 2.1 4.* 2.1 3.2 3.2 3.3 3.3 3.4 3.4 1.1 2.1 3.1 2.2 4.1 4.4 4.3 4.2 3.4 3.3 3.2 border routers AS1 AS2 AS3 AS4

Upload: others

Post on 19-Aug-2020

11 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Routing on the Internetweb.eecs.umich.edu/~sugih/courses/eecs489/lectures/17-BGP.pdf · Internet inter-AS Routing: BGP BGP (Border Gateway Protocol) is the de facto standard for inter-AS

Computer Networks

Lecture17:Inter-domainRoutingandBGP

RoutingontheInternetInthebeginningtherewastheARPANET:• routeusingGGP(Gateway-to-GatewayProtocol),adistancevectorroutingprotocol

Problems:• needed“flag-hour”toupdateroutingprotocol• incompatibilityacrossvendors

RoutingontheInternetSolution:hierarchicalrouting• administrativeautonomy:• eachnetworkadmincancontrolroutingwithinitsownnetwork

• internet:networkofnetworks• allowstheInternettoscale:• with200millionhosts,eachroutercan’tstorealldestinationsinitsroutingtable•  routeupdatesalonewillswampthelinks

Aggregateroutersintoregionsof“autonomoussystems”(ASs)

1.1

2.1

3.1

2.2

4.1

4.4

4.3

4.2

3.4

3.3

3.2

border routers

AS1

AS2

AS3

AS4

HierarchicalRouting

Gateway/borderrouter•  neighboringASsinteracttocoordinaterouting

• directlinktorouterinotherAS(s)

•  keepsinitsroutingtable:

•  nexthoptootherASs

•  allhostswithinitsAS

• hostswithinanASonlykeepadefaultroutetotheborderrouter

3.1dest next1.* 1.12.* 2.14.* 2.13.2 3.23.3 3.33.4 3.4

1.1

2.1

3.1

2.2

4.1

4.4

4.3

4.2

3.4

3.3

3.2

border routers

AS1

AS2

AS3

AS4

Page 2: Routing on the Internetweb.eecs.umich.edu/~sugih/courses/eecs489/lectures/17-BGP.pdf · Internet inter-AS Routing: BGP BGP (Border Gateway Protocol) is the de facto standard for inter-AS

HierarchicalRoutingRoutersinthesameASrunsameroutingprotocol• “intra-AS”routingprotocol

• eachASusesitsownlinkmetric

• routersindifferentASscanrundifferentintra-ASroutingprotocol

•  internaltopologyisnotsharedbetweenASs

1.1

2.1

3.1

2.2

4.1

4.4

4.3

4.2

3.4

3.3

3.2

border routers

AS1

AS2

AS3

AS4

TheNSFNet1989 NSFNetbackbone

Regionalnetworks

Customernetworks

Users

pointofpresence(pop)

Areahierarchy:• backbone/core:NSFNet•  regionalnetworks:MichNet,BARRNET,LosNettos,Cerfnet,JVCNet,NEARNet,etc.• campusnetworks

[Walrand]

[Halabi] [MeritNetworks]

Commercialization(1994)Roughlyhierarchical

Atcenter:“Tier-1”ISPs•  Tier-1ASs:topoftheInternethierarchyof~10Ass:AOL,AT&T,GlobalCrossing,Level3,Verizon/UUNET,NTT,Qwest,SAVVIS(formerlyCable&Wireless),Sprint,etc.•  full(N2)peeringrelationshipsbetweenTier-1providers

• hasnoupstreamprovider

• national/internationalcoverage

Tier-1providersalsointerconnectatpublicnetworkaccesspoints(NAPs)

[Halabi]

[Walrand]

Tier-1providersinterconnect(peer)privately

AT&T

Sprint

Verizon

ASStructure:OtherASsLowertierproviders• providetransitservicetodownstreamcustomers• but,needatleastoneprovideroftheirown•  typicallyhavenationalorregionalscope•  includesseveralthousandASs

StubASs•  donotprovidetransitservicetoothers•  connecttooneormoreupstreamproviders•  includesthevastmajority(e.g.,85-90%)oftheASs

[Rexford]

Page 3: Routing on the Internetweb.eecs.umich.edu/~sugih/courses/eecs489/lectures/17-BGP.pdf · Internet inter-AS Routing: BGP BGP (Border Gateway Protocol) is the de facto standard for inter-AS

“Tier-2”ISPs:Smaller(OftenRegional)ISPsConnecttooneormoretier-1ISPs,possiblyothertier-2ISPs

Tier1ISP

Tier-1ISP

Tier-1ISP

NAP

Tier-2ISPTier-2ISP

Tier-2ISP Tier-2ISP

Tier-2ISP

Tier-2ISPpaystier-1ISPforconnectivitytorestofInternet•  tier-2ISPiscustomeroftier-1provider

Tier-2ISPsalsopeerprivatelywitheachother,andinterconnectatNAPs

Tier-1ISP

“Tier-3”ISPsandLocalISPsLasthop(“access”)network(closesttoendsystems)

Tier-1ISP

Tier-1ISP

Tier-1ISP

NAP

Tier-2ISPTier-2ISP

Tier-2ISP Tier-2ISP

Tier-2ISP

localISP

Tier-3ISPLocalandtier-3ISPsarecustomersofhighertierISPsconnectingthemtorestofInternet

localISP

localISPlocalISP

localISP

localISPlocalISPlocalISP

APacketPassesThroughManyNetworks

Tier-1ISP

Tier-1ISP

Tier-1ISP

NAP

Tier-2ISPTier-2ISP

Tier-2ISP Tier-2ISP

Tier-2ISP

localISP

Tier-3ISP

localISP

ASNumberTriviaASnumberisa16-bitquantity•  65,536uniqueASnumbers

Somearereservednumbers(e.g.,forprivateASs)•  only64,510areavailableforpublicuse

ManagedbyInternetAssignedNumbersAuthority(IANA)•  givesblocksof1,024toRegionalInternetRegistries•  RIRsassignASnumberstoinstitutions•  49,649ASnumbersinvisibleuse(Feb’15)

In2007startedassigning32-bitAS#s

[Rexford]

Page 4: Routing on the Internetweb.eecs.umich.edu/~sugih/courses/eecs489/lectures/17-BGP.pdf · Internet inter-AS Routing: BGP BGP (Border Gateway Protocol) is the de facto standard for inter-AS

GrowthofASnumbers

TolearnmoreaboutInternetASstatesee:• GeoffHuston’sCIDRReporthttp://www.cidr-report.org/as2.0/

• CAIDAskittermaps:http://www.caida.org/research/topology/as_core_network/AS_Network.xml

InterdomainRoutingAS-leveltopology•  destinationsareCIDRaddressprefixes(APs,e.g.,12.0.0.0/8)•  nodesareAutonomousSystems(ASs)•  edgesarebusinessrelationships

1

2

3 4

5

6 7

ClientWebserver

[Rexford]

ChallengesforInterdomainRoutingScale•  addressprefixes(APs):200,000andgrowing•  ASs:~50,000visibleones,and60Kallocated•  routers:atleastinthemillionsProprietaryinformation:•  ASsdon’twanttodivulgeinternaltopologies•  northeirbusinessrelationshipswithneighborsPolicy•  noInternet-widenotionofalinkcostmetric•  needcontroloverwhereyousendtraffic•  andwhocansendtrafficthroughyou

[Rexford]

WhySPFisnotSuitableTopologyinformationisflooded• highbandwidthandstorageoverhead• nodesmustdivulgesensitivecommercialinformation

Entirepathcomputedlocallypernode• highprocessingoverheadinalargenetwork

Routecomputationminimizessomenotionoftotaldistance•  alltrafficmusttravelonshortestpaths

[Rexford]

Page 5: Routing on the Internetweb.eecs.umich.edu/~sugih/courses/eecs489/lectures/17-BGP.pdf · Internet inter-AS Routing: BGP BGP (Border Gateway Protocol) is the de facto standard for inter-AS

WhySPFisnotSuitableAllnodesneedcommonnotionoflinkcosts• worksonlyifpolicyissharedanduniform

Incompatiblewithcommercialrelationships

RegionalISP1

RegionalISP2

RegionalISP3

Cust1Cust3 Cust2

NationalISP1

NationalISP2

YES

NO

[Rexford]

WhyNotDistanceVector?

Advantages• hidesdetailsofthenetworktopology• nodesdetermineonly“nexthop”towardthedestination

Disadvantages•  routecomputationstillentailsminimizationofsomenotionoftotaldistance,whichisdifficultinaninter-domainsetting•  slowconvergenceduetorelianceoncounting-to-infinitytodetectroutingloop

Insteadusepathvector•  easierloopdetection

[afterRexford]

Path-VectorRoutingAvoidcounting-to-infinitybyadvertisingentirepath• distancevector:senddistancemetricperdestination• pathvector:sendtheentirepathforeachdestination

Loopdetection:•  eachnodelooksforitsownnodeidentifierinadvertisedpath•  anddiscardspathswithloops•  e.g.,node1seesitselfinthepath(3, 2, 1)anddiscardsthepath

3 2 1

d

“d: path (2,1)” “d: path (1)”

datatraffic datatraffic

[Rexford]

“d: path (3,2,1)”

OtherAdvantage:FlexiblePoliciesEachnodecanapplylocalpolicies• pathselection:whichpathtouse?• pathexport:whichpathstoadvertise?

Examples• node2maypreferthepath“2, 3, 1”over“2, 1”• node1maynotwantnode3tohearofthepath“1, 2”

2 3

1

2 3

1

[Rexford]

Page 6: Routing on the Internetweb.eecs.umich.edu/~sugih/courses/eecs489/lectures/17-BGP.pdf · Internet inter-AS Routing: BGP BGP (Border Gateway Protocol) is the de facto standard for inter-AS

Internetinter-ASRouting:BGP

BGP(BorderGatewayProtocol)isthedefactostandardforinter-ASrouting•  06/89 v.1•  06/90 v.2EGP(ExteriorGatewayProtocol)toBGPtransition•  10/91 v.3BGPinstalled•  07/94 v.4defactostandard

Internetinter-ASRouting:BGPBGPprovideseachASameansto:• useprefix-basedpath-vectorprotocol• propagatesAPreachabilitytoallroutersinsidetheAS• obtainsAPreachabilityfromneighboringASs• determines“good”routestoAPsbasedonreachabilityinformationandpolicy•  Inter-ASroutingispolicydriven,notload-sensitive,generallynotQoS-based

WhenanASadvertisesanAPtoanotherAS,itispromisingtoforwardanypacketstheotherASsendstotheAP•  anAScanaggregateCIDRAPsinitsadvertisement

BGPrunsoverTCPPairsofBGProuters(BGPpeers)establishsemi-permanentTCPconnections:BGPsessions•  advantageofusingTCP:reliabletransmissionallowsforincrementalupdates:updatesonlywhenchangesoccur• disadvantage:TCPcongestioncontrolmechanismslowsdownrouteupdatesthatcoulddecongestlink!

Failuredetection:• TCPdoesn’tdetectlostconnectivityonitsown•  instead,BGPmustdetectfailure•  sendsKEEPALIVEpacketsevery60seconds•  holdtimer:180seconds

BGPsessionsdonotcorrespondtophysicallinks,butratherbusinessrelationship

BGPMessages

BGPmessages:• OPEN:opensTCPconnectiontopeerandauthenticatessender• UPDATE:advertisesanewactivepath(orwithdrawsonenolongeravailable)• KEEPALIVE:keepsconnectionaliveintheabsenceofUPDATEs;alsoacknowledgesOPENrequest• NOTIFICATION:reportserrorsinpreviousmessage;alsousedtocloseconnection

[afterRexford]

Page 7: Routing on the Internetweb.eecs.umich.edu/~sugih/courses/eecs489/lectures/17-BGP.pdf · Internet inter-AS Routing: BGP BGP (Border Gateway Protocol) is the de facto standard for inter-AS

BGPOperations

EstablishsessiononTCPport179

Exchangeallactiveroutes

Exchangeincrementalupdates

AS1

AS2

WhileconnectionisALIVE,exchangerouteUPDATEmessages

BGPsession

[Rexford]

PathAttributes&BGPRoutes

WhenadvertisinganAP,advertisementincludesBGPattributes

Twoimportantattributes:•  AS-PATH:thepathvectorofASsthroughwhichtheadvertisementforanAPpassedthrough•  NEXT-HOP:thespecificinternal-ASroutertonext-hopAS(theremaybemultipleexitsfromcurrentAStonext-hop-AS)

PathAttributes&BGPRoutesSampleBGPentry:destination NEXT-HOP AS-PATH 198.32.163.0/24 202.232.1.8 2497 2914 3582 4600

• addressrange198.32.163.0/24isinAS4600 •  togetthere,sendtonexthoprouterataddress202.232.1.8 •  thepaththeregoesthroughASs2497,2914,3582,inorder

ASpathchosenmaynotbetheshortestASpath

RouterpathmaybelongerthanASpath

2AShops,11routerhops

s d

3AShops,7routerhops

[afterRexford]

CausesofBGPRoutingChangesTopologychanges•  equipmentsgoingupordown•  deploymentofnewroutersorsessions

BGPsessionfailures•  duetoequipmentfailures,maintenance,etc.•  or,duetocongestiononthephysicalpath

Changesinroutingpolicy•  changesinpreferencesintheroutes•  changesinwhethertherouteisexported

Persistentprotocoloscillation•  conflictsbetweenpoliciesofdifferentASs

[Rexford]

Page 8: Routing on the Internetweb.eecs.umich.edu/~sugih/courses/eecs489/lectures/17-BGP.pdf · Internet inter-AS Routing: BGP BGP (Border Gateway Protocol) is the de facto standard for inter-AS

BGPSessionFailure

AS1

AS2

Reactingtoafailure• discardallrouteslearnedfromtheneighbor

• sendnewupdatesforanyroutesthatchange

• overheadincreaseswith#ofroutes•  reasonwhymanyTier-1ASsfilteroutprefixeslongerthan/24

[Rexford]

RoutingChange:BeforeandAfter

0

1 2

3

(1, 0) (2, 0)

(3, 1, 0)

(1, 2, 0)

(3, 2, 0)

[Rexford]

AS1•  deletetheroute(1, 0)•  switchtonextroute(1, 2, 0)•  sendroute(1, 2, 0)toAS3

AS3•  sees(1, 2, 0)replace(1,0)•  comparestoroute(2, 0)•  switchestousingAS2

1