68
Professor Yashar Ganjali Department of Computer Science University of Toronto [email protected] http://www.cs.toronto.edu/~yganjali

Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto [email protected]

  • Upload
    vothu

  • View
    226

  • Download
    6

Embed Size (px)

Citation preview

Page 1: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

ProfessorYasharGanjaliDepartmentofComputerScienceUniversityofToronto

[email protected]://www.cs.toronto.edu/~yganjali

Page 2: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

Announcements� Don’tforgettheprogrammingassignment

� Due:FridayOct.21st at5pm(sharp)� SubmitelectronicallyonMarkUs.

� Thisweek’stutorial� Programmingassignment1Q&A

� Readingforthisweek:Chapter5

CSC458/CSC2209– ComputerNetworks 2UniversityofToronto– Fall2016

Page 3: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

Announcements– Cont’d� Midtermexam

� SectionL0101:Thu.Oct.27th,1-3PM� SectionL5101:Tue.Oct.25th,6-8PM� SectionL0201:Tue.Oct.25th,1-3PM� Sameroomandtimeasthelecture� Forundergraduateandgraduatestudents

CSC458/CSC2209– ComputerNetworks 3UniversityofToronto– Fall2016

Page 4: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

CSC458/CSC2209– ComputerNetworks 4UniversityofToronto– Fall2016

Outline� Internet’sTopology

� Internet’stwo-tieredtopology� AS-leveltopology� Router-leveltopology

� RoutingintheInternet� HierarchyandAutonomousSystems� InteriorRoutingProtocols:RIP,OSPF� ExteriorRoutingProtocol:BGP

Page 5: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

InternetRoutingArchitecture� DividedintoAutonomousSystems

� Distinctregionsofadministrativecontrol� Routers/linksmanagedbyasingle“institution”� Serviceprovider,company,university,…

� HierarchyofAutonomousSystems� Large,tier-1providerwithanationwidebackbone� Medium-sizedregionalproviderwithsmallerbackbone� Smallnetworkrunbyasinglecompanyoruniversity

� InteractionbetweenAutonomousSystems� InternaltopologyisnotsharedbetweenAS’s� …but,neighboringAS’sinteracttocoordinaterouting

CSC458/CSC2209– ComputerNetworks 5UniversityofToronto– Fall2016

Page 6: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

ASTopology� Node:AutonomousSystem� Edge:TwoAS’sthatconnecttoeachother

CSC458/CSC2209– ComputerNetworks 6UniversityofToronto– Fall2016

1

2

34

5

67

Page 7: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

WhatisanEdge,Really?� EdgeintheASgraph

� AtleastoneconnectionbetweentwoAS’s� SomedestinationsreachedfromoneASviatheother

CSC458/CSC2209– ComputerNetworks 7UniversityofToronto– Fall2016

AS1

AS2

ExchangePoint

AS1

AS2 AS3

Page 8: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

IdentifyingAutonomousSystems

CSC458/CSC2209– ComputerNetworks 8UniversityofToronto– Fall2016

ASNumbersare32bitvalues(usedtobe16)

• Level3:1• MIT:3• Harvard:11• Yale:29• UofT:239• AT&T:7018,6341,5074,…• UUNET:701,702,284,12199,…• Sprint:1239,1240,6211,6242,…• …

Currentlyjustover54,000inuse.

Page 9: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

CSC458/CSC2209– ComputerNetworks 9UniversityofToronto– Fall2016

InterdomainPaths

1

2

3

4

5

67

Client Webserver

Path:6,5,4,3,2,1

Page 10: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

BusinessRelationships� NeighboringAS’shavebusinesscontracts

� Howmuchtraffictocarry� Whichdestinationstoreach� Howmuchmoneytopay

� Commonbusinessrelationships� Customer-provider

� E.g.,PrincetonisacustomerofAT&T� E.g.,MITisacustomerofLevel3

� Peer-peer� E.g.,PrincetonisapeerofPatriotMedia� E.g.,AT&TisapeerofSprint

CSC458/CSC2209– ComputerNetworks 10UniversityofToronto– Fall2016

Page 11: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

Customer-ProviderRelationship� Customerneedstobereachablefromeveryone

� Providertellsallneighborshowtoreachthecustomer� Customerdoesnotwanttoprovidetransitservice

� Customerdoesnotletitsprovidersroutethroughit

CSC458/CSC2209– ComputerNetworks 11UniversityofToronto– Fall2016

d

d

provider

customer

customer

provider

Trafficto thecustomer Trafficfromthecustomer

advertisements

traffic

Page 12: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

Peer-PeerRelationship� Peersexchangetrafficbetweencustomers

� ASexportsonlycustomerroutestoapeer� ASexportsapeer’sroutesonlytoitscustomers� Oftentherelationshipissettlement-free(i.e.,no$$$)

CSC458/CSC2209– ComputerNetworks 12UniversityofToronto– Fall2016

peerpeer

Trafficto/fromthepeeranditscustomers

d

advertisements

traffic

Page 13: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

PrincetonExample� Internet:customerofAT&TandUSLEC� Researchuniversities/labs:customerofInternet2� Localresidences:peerwithPatriotMedia� Localnon-profits:providerforseveralnon-profits

CSC458/CSC2209– ComputerNetworks 13UniversityofToronto– Fall2016

AT&T USLEC Internet2

Patriotpeer

Page 14: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

ASStructure:Tier-1Providers� Tier-1provider

� Hasnoupstreamproviderofitsown� Typicallyhasanationalorinternationalbackbone� UUNET,Sprint,AT&T,Level3,…

� TopoftheInternethierarchyof12-20AS’s� Fullpeer-peerconnectionsbetweentier-1providers

CSC458/CSC2209– ComputerNetworks 14UniversityofToronto– Fall2016

Page 15: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

ASStructure:OtherAS’s� Tier-2providers

� Providetransitservicetodownstreamcustomers� …but,needatleastoneprovideroftheirown� Typicallyhavenationalorregionalscope� E.g.,MinnesotaRegionalNetwork� IncludesafewthousandoftheAS’s

� StubAS’s� Donotprovidetransitservicetoothers� Connecttooneormoreupstreamproviders� Includesvastmajority(e.g.,85-90%)oftheAS’s

CSC458/CSC2209– ComputerNetworks 15UniversityofToronto– Fall2016

Page 16: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

CharacteristicsoftheASGraph� ASgraphstructure

� Highvariabilityinnodedegree(“powerlaw”)� Afewveryhighly-connectedAS’s� ManyAS’shaveonlyafewconnections

CSC458/CSC2209– ComputerNetworks 16UniversityofToronto– Fall2016

1 10 100 1000

CCDF

1

0.1

0.01

0.001

ASdegree

AllAS’shave1ormoreneighbors

Veryfewhavedegree>=100

Page 17: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

CharacteristicsofASPaths� ASpathmaybelongerthanshortestASpath� Routerpathmaybelongerthanshortestpath

CSC458/CSC2209– ComputerNetworks 17UniversityofToronto– Fall2016

s d

3AShops,7routerhops

2AShops,8routerhops

Page 18: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

� Backbonenetworks� MultiplePoints-of-Presence(PoPs)

� LotsofcommunicationbetweenPoPs

� Accommodatetrafficdemandsandlimitdelay

BackboneNetworks

CSC458/CSC2209– ComputerNetworks 18UniversityofToronto– Fall2016

Page 19: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

CSC458/CSC2209– ComputerNetworks 19UniversityofToronto– Fall2016

Example:AbileneInternet2Backbone

Page 20: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

Points-of-Presence(PoPs)� Inter-PoP links

� Longdistances� Highbandwidth

� Intra-PoP links� Shortcablesbetweenracksorfloors

� Aggregatedbandwidth� Linkstoothernetworks

� Widerangeofmediaandbandwidth

CSC458/CSC2209– ComputerNetworks 20UniversityofToronto– Fall2016

Intra-PoP

Othernetworks

Inter-PoP

Page 21: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

WheretoLocateNodesandLinks� PlacingPoints-of-Presence(PoPs)

� Largepopulationofpotentialcustomers� Otherprovidersorexchangepoints� Costandavailabilityofreal-estate� Mostlyinmajormetropolitanareas

� PlacinglinksbetweenPoPs� Alreadyfiberintheground� Neededtolimitpropagationdelay� Neededtohandlethetrafficload

CSC458/CSC2209– ComputerNetworks 21UniversityofToronto– Fall2016

Page 22: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

CustomerConnectingtoaProvider

CSC458/CSC2209– ComputerNetworks 22UniversityofToronto– Fall2016

Provider Provider

1accesslink 2accesslinks

Provider

2accessrouters

Provider

2accessPoPs

Page 23: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

Multi-Homing:TwoorMoreProviders� Motivationsformulti-homing

� Extrareliability,survivesingleISPfailure� Financialleveragethroughcompetition� Gamingthe95th-percentilebillingmodel� Betterperformancebyselectingbetterpath

CSC458/CSC2209– ComputerNetworks 23UniversityofToronto– Fall2016

Provider1 Provider2

Page 24: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

InferringtheAS-LevelTopology� CollectASpathsfrommanyvantagepoints

� LearnalargenumberofASpaths� Extractthenodesandtheedgesfromthepath

� Example:ASpath“1701888”implies� Nodes:1,7018,and88� Edges:(1,7018)and(7018,88)

� WaystocollectASpathsfrommanyplaces� MappingtraceroutedatatotheASlevel

� Mapusingwhois� Example:trywhois–hwhois.arin.net“MCIWorldcom”

� Measurementsoftheinterdomainroutingprotocol

CSC458/CSC2209– ComputerNetworks 24UniversityofToronto– Fall2016

Page 25: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

MapTracerouteHopstoAS’s

CSC458/CSC2209– ComputerNetworks 25UniversityofToronto– Fall2016

1169.229.62.1

2169.229.59.225

3128.32.255.169

4128.32.0.249

5128.32.0.66

6209.247.159.109

7*

864.159.1.46

9209.247.9.170

1066.185.138.33

11*

1266.185.136.17

1364.236.16.52

Tracerouteoutput:(hopnumber,IP)

AS25

AS25

AS25

AS25

AS11423

AS3356

AS3356

AS3356

AS3356

AS1668

AS1668

AS1668

AS5662

Berkeley

CNN

Calren

Level3

AOL

Page 26: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

ChallengesofInter-ASMapping� Mappingtraceroute hopstoAS’sishard

� NeedanaccurateregistryofIPaddressownership� Whois dataarenotoriouslyoutofdate

� Collectingdiverseinterdomain dataishard� PublicrepositorieslikeRouteViews andRIPE-RIS� Covershundredstothousandsofvantagepoints� Especiallyhardtoseepeer-peeredges

CSC458/CSC2209– ComputerNetworks 26UniversityofToronto– Fall2016

AT&T Sprint

HarvardHarvardB-schoold1

d2???

Page 27: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

InferringASRelationships� Keyidea

� Thebusinessrelationshipsdeterminetheroutingpolicies� Theroutingpoliciesdeterminethepathsthatarechosen� So,lookatthechosenpathsandinferthepolicies

� Example:ASpath“1701888”implies� AS7018allowsAS1toreachAS88� AT&TallowsLevel3toreachPrinceton� Each“triple”tellssomethingabouttransitservice

� CollectandanalyzeASpathdata� IdentifywhichAS’scantransitthroughtheother� …andwhichotherAS’stheyareabletoreachthisway

CSC458/CSC2209– ComputerNetworks 27UniversityofToronto– Fall2016

Page 28: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

PathsYouShouldNeverSee(“Invalid”)

CSC458/CSC2209– ComputerNetworks 28UniversityofToronto– Fall2016

Customer-provider

Peer-peer

twopeeredges

transitthroughacustomer

Page 29: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

ChallengesofRelationshipInference� Incompletemeasurementdata

� HardtogetacompleteviewoftheASgraph� Especiallyhardtoseepeer-peeredgeslowinhierarchy

� Realrelationshipsaresometimemorecomplex� Peerinonepartoftheworld,customerinanother� Otherkindsofrelationships(e.g.,backup)� Specialrelationshipsforcertaindestinationprefixes

� Still,inferenceworkhasprovenveryuseful� QualitativeviewofInternettopologyandrelationships

CSC458/CSC2209– ComputerNetworks 29UniversityofToronto– Fall2016

Page 30: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

CSC458/CSC2209– ComputerNetworks 30UniversityofToronto– Fall2016

Outline� Internet’sTopology

� Internet’stwo-tieredtopology� AS-leveltopology� Router-leveltopology

� RoutingintheInternet� HierarchyandAutonomousSystems� InteriorRoutingProtocols:RIP,OSPF� ExteriorRoutingProtocol:BGP

Page 31: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

RoutingStorySoFar…� Techniques

� Flooding� DistributedBellmanFordAlgorithm� Dijkstra’sShortestPathFirstAlgorithm

� Question1.CanweapplythesetotheInternetasawhole?

� Question2.Ifnot,whatcanwedo?

CSC458/CSC2209– ComputerNetworks 31UniversityofToronto– Fall2016

Page 32: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

RoutingintheInternet� TheInternetuseshierarchicalrouting.� WithinanAS,theadministratorchoosesanInteriorGatewayProtocol(IGP)� ExamplesofIGPs:RIP(rfc 1058),OSPF(rfc 1247,ISIS(rfc 1142).

� BetweenAS’s,theInternetusesanExteriorGatewayProtocol� AS’stodayusetheBorderGatewayProtocol,BGP-4(rfc1771)

CSC458/CSC2209– ComputerNetworks 32UniversityofToronto– Fall2016

Page 33: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

RoutingintheInternet

CSC458/CSC2209– ComputerNetworks 33UniversityofToronto– Fall2016StubAS TransitASe.g.backboneserviceprovider StubAS

AS‘A’ AS‘B’ AS‘C’

InteriorGatewayProtocol

InteriorGatewayProtocol

InteriorGatewayProtocol

BGP BGP

Page 34: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

InteriorRoutingProtocols� RIP

� Usesdistancevector(distributedBellman-Fordalgorithm).� Updatessentevery30seconds.� Noauthentication.� OriginallyinBSDUNIX.� Widelyusedformanyyears;notusedmuchanymore.

� OSPF� Link-stateupdatessent(usingflooding)asandwhenrequired.

� EveryrouterrunsDijkstra’salgorithm.� Authenticatedupdates.� Autonomoussystemmaybepartitionedinto“areas”.� Widelyused.

CSC458/CSC2209– ComputerNetworks 34UniversityofToronto– Fall2016

Page 35: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

InterdomainRouting� AS-leveltopology

� DestinationsareIPprefixes(e.g.,12.0.0.0/8)� NodesareAutonomousSystems(AS’s)� Linksareconnections&businessrelationships

CSC458/CSC2209– ComputerNetworks 35UniversityofToronto– Fall2016

1

2

34

5

67

Client Webserver

Page 36: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

ChallengesforInterdomainRouting� Scale

� Prefixes:150,000-500,000,andgrowing� AS’s:54,000visibleones,andgrowing� ASpathsandrouters:atleastinthemillions…

� Privacy� AS’sdon’twanttodivulgeinternaltopologies� …ortheirbusinessrelationshipswithneighbors

� Policy� NoInternet-widenotionofalinkcostmetric� Needcontroloverwhereyousendtraffic� …andwhocansendtrafficthroughyou

CSC458/CSC2209– ComputerNetworks 36UniversityofToronto– Fall2016

Page 37: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

Link-StateRoutingisProblematic� Topologyinformationisflooded

� Highbandwidthandstorageoverhead� Forcesnodestodivulgesensitiveinformation

� Entirepathcomputedlocallypernode� Highprocessingoverheadinalargenetwork

� Minimizessomenotionoftotaldistance� Worksonlyifpolicyissharedanduniform

� TypicallyusedonlyinsideanAS� E.g.,OSPFandIS-IS

CSC458/CSC2209– ComputerNetworks 37UniversityofToronto– Fall2016

Page 38: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

DistanceVectorisontheRightTrack� Advantages

� Hidesdetailsofthenetworktopology� Nodesdetermineonly“nexthop”towardthedest

� Disadvantages� Minimizessomenotionoftotaldistance,whichisdifficultinaninterdomainsetting

� Slowconvergenceduetothecounting-to-infinityproblem(“badnewstravelsslowly”)

� Idea:extendthenotionofadistancevector

CSC458/CSC2209– ComputerNetworks 38UniversityofToronto– Fall2016

Page 39: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

Path-VectorRouting� Extensionofdistance-vectorrouting

� Supportflexibleroutingpolicies� Avoidcount-to-infinityproblem

� Keyidea:advertisetheentirepath� Distancevector:senddistancemetricperdestd� Pathvector:sendtheentirepathforeachdestd

CSC458/CSC2209– ComputerNetworks 39UniversityofToronto– Fall2016

3 2 1

d

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

datatraffic datatraffic

Page 40: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

FasterLoopDetection� Nodecaneasilydetectaloop

� Lookforitsownnodeidentifierinthepath� E.g.,node1seesitselfinthepath“3,2,1”

� Nodecansimplydiscardpathswithloops� E.g.,node1simplydiscardstheadvertisement

CSC458/CSC2209– ComputerNetworks 40UniversityofToronto– Fall2016

3 2 1

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

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

Page 41: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

BorderGatewayProtocol(BGP-4)� BGPisapath-vectorroutingprotocol.� BGPadvertisescompletepaths(alistofAS’s).

� AlsocalledAS_PATH(thisisthepathvector)� Exampleofpathadvertisement:“Thenetwork171.64/16canbereachedviathepath{AS1,AS5,AS13}”.

� Pathswithloopsaredetectedlocallyandignored.� Localpoliciespickthepreferredpathamongoptions.� Whenalink/routerfails,thepathis“withdrawn”.

CSC458/CSC2209– ComputerNetworks 41UniversityofToronto– Fall2016

Page 42: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

BGPOperations

CSC458/CSC2209– ComputerNetworks 42UniversityofToronto– Fall2016

EstablishsessiononTCPport179

Exchangeallactiveroutes

Exchangeincrementalupdates

AS1

AS2

WhileconnectionisALIVEexchangerouteUPDATEmessages

BGPsession

Page 43: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

IncrementalProtocol� Anodelearnsmultiplepathstodestination

� Storesalloftheroutesinaroutingtable� Appliespolicytoselectasingleactiveroute� …andmayadvertisetheroutetoitsneighbors

� Incrementalupdates� Announcement

� Uponselectinganewactiveroute,addnodeidtopath� …and(optionally)advertisetoeachneighbor

� Withdrawal� Iftheactiverouteisnolongeravailable� …sendawithdrawalmessagetotheneighbors

CSC458/CSC2209– ComputerNetworks 43UniversityofToronto– Fall2016

Page 44: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

BGPMessages� Open:EstablishaBGPsession.� KeepAlive:Handshakeatregularintervals.� Notification:Shutsdownapeeringsession.� Update:Announcingnewroutesorwithdrawingpreviouslyannouncedroutes.

� Attributesinclude:Nexthop,ASPath,localpreference,Multi-exitdiscriminator,…� Usedtoselectamongmultipleoptionsforpaths

CSC458/CSC2209– ComputerNetworks 44UniversityofToronto– Fall2016

BGPannouncement=prefix+pathattributes

Page 45: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

BGPRoute� Destinationprefix(e.g,.128.112.0.0/16)� Routeattributes,including

� ASpath(e.g.,“701888”)� Next-hopIPaddress(e.g.,12.127.0.121)

CSC458/CSC2209– ComputerNetworks 45UniversityofToronto– Fall2016

AS88Princeton

128.112.0.0/16ASpath=88NextHop=192.0.2.1

AS7018AT&T

AS12654RIPENCCRISproject

192.0.2.1

128.112.0.0/16ASpath=701888NextHop=12.127.0.121

12.127.0.121

Page 46: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

BGPPathSelection� Simplestcase

� ShortestASpath� Arbitrarytiebreak

� Example� Three-hopASpathpreferredoverafour-hopASpath

� AS12654preferspaththroughGlobalCrossing

� But,BGPisnotlimitedtoshortest-pathrouting� Policy-basedrouting

CSC458/CSC2209– ComputerNetworks 46UniversityofToronto– Fall2016

AS3549GlobalCrossing

AS12654RIPENCCRISproject

AS1129GlobalAccess

135.207.0.0/16ASPath=11291755123970186341

135.207.0.0/16ASPath=354970186341

Page 47: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

AS_PATHAttribute

CSC458/CSC2209– ComputerNetworks 47UniversityofToronto– Fall2016

AS7018135.207.0.0/16ASPath=6341

AS1239Sprint

AS1755Ebone

AT&T

AS3549GlobalCrossing

135.207.0.0/16ASPath=70186341

135.207.0.0/16ASPath=354970186341

AS6341

135.207.0.0/16AT&TResearch

PrefixOriginated

AS12654RIPENCCRISproject

AS1129GlobalAccess

135.207.0.0/16ASPath=70186341

135.207.0.0/16ASPath=123970186341

135.207.0.0/16ASPath=1755123970186341

135.207.0.0/16ASPath=11291755123970186341

PickshorterASpath

Page 48: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

FlexiblePolicies� Eachnodecanapplylocalpolicies

� Pathselection:Whichpathtouse?

� Pathexport:Whichpathstoadvertise?

� Examples� Node2maypreferthepath“2,3,1”over“2,1”

� Node1maynotletnode3hearthepath“1,2”

CSC458/CSC2209– ComputerNetworks 48UniversityofToronto– Fall2016

2 3

1

Page 49: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

SoManyChoices…

CSC458/CSC2209– ComputerNetworks 49UniversityofToronto– Fall2016

WhichrouteshouldFrankpickto13.13.0.0./16?

AS1

AS2

AS4

AS3

13.13.0.0/16

Frank’sInternetBarn

peer peercustomerprovider

Page 50: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

Frank’sChoices…

CSC458/CSC2209– ComputerNetworks 50UniversityofToronto– Fall2016

AS1AS2

AS4

AS3

13.13.0.0/16

localpref=80

localpref=100

localpref=90

Setappropriate“localpref”toreflectpreferences:HigherLocalpreferencevaluesarepreferred

peer peer

customerprovider

Routelearnedfromcustomerpreferredoverroutelearnedfrompeer,preferredoverroutelearnedfromprovider

Page 51: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

BGPRouteSelectionSummary

CSC458/CSC2209– ComputerNetworks 51UniversityofToronto– Fall2016

HighestLocalPreference

ShortestASPATH

LowestMED

i-BGP<e-BGP

LowestIGPcosttoBGPegress

LowestrouterID

trafficengineering

EnforcerelationshipsE.g.prefercustomerroutesoverpeerroutes

Throwuphandsandbreakties

Page 52: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

BGPPolicy:ApplyingPolicytoRoutes� Importpolicy

� Filterunwantedroutesfromneighbor� E.g.prefixthatyourcustomerdoesn’town

� Manipulateattributestoinfluencepathselection� E.g.,assignlocalpreferencetofavoredroutes

� Exportpolicy� Filterroutesyoudon’twanttotellyourneighbor

� E.g.,don’ttellapeeraroutelearnedfromotherpeer� Manipulateattributestocontrolwhattheysee

� E.g.,makeapathlookartificiallylongerthanitis

CSC458/CSC2209– ComputerNetworks 52UniversityofToronto– Fall2016

Page 53: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

BGPPolicy:InfluencingDecisions

CSC458/CSC2209– ComputerNetworks 53UniversityofToronto– Fall2016

BestRouteSelection

ApplyImportPolicies

BestRouteTable

ApplyExportPolicies

InstallforwardingEntriesforbestRoutes.

ReceiveBGPUpdates

BestRoutes

TransmitBGPUpdates

ApplyPolicy=filterroutes&tweakattributes

BasedonAttributeValues

IPForwardingTable

ApplyPolicy=filterroutes&tweakattributes

Openendedprogramming.Constrainedonlybyvendorconfigurationlanguage

Page 54: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

ImportPolicy:LocalPreference� Favoronepathoveranother

� OverridetheinfluenceofASpathlength� Applylocalpoliciestopreferapath

� Example:prefercustomeroverpeer

CSC458/CSC2209– ComputerNetworks 54UniversityofToronto– Fall2016

AT&T Sprint

Yale

Tier-2

Tier-3

Local-pref=100

Local-pref=90

Page 55: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

ImportPolicy:Filtering� Discardsomerouteannouncements

� Detectconfigurationmistakesandattacks� Examplesonsessiontoacustomer

� Discardrouteifprefixnotownedbythecustomer� DiscardroutethatcontainsotherlargeISPinASpath

CSC458/CSC2209– ComputerNetworks 55UniversityofToronto– Fall2016

AT&T

Princeton

USLEC

128.112.0.0/16

Page 56: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

ExportPolicy:Filtering� Discardsomerouteannouncements

� Limitpropagationofroutinginformation� Examples

� Don’tannounceroutesfromonepeertoanother� Don’tannounceroutesfornetwork-managementhosts

CSC458/CSC2209– ComputerNetworks 56UniversityofToronto– Fall2016

AT&T

Princeton

Sprint

128.112.0.0/16

UUNET

networkoperator

Page 57: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

ExportPolicy:AttributeManipulation� Modifyattributesoftheactiveroute

� ToinfluencethewayotherAS’sbehave� Example:ASprepending

� ArtificiallyinflatetheASpathlengthseenbyothers� ToconvincesomeAS’stosendtrafficanotherway

CSC458/CSC2209– ComputerNetworks 57UniversityofToronto– Fall2016

AT&T

Princeton

USLEC

128.112.0.0/16

Sprint

8888 88

Page 58: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

BGPPolicyConfiguration� Routingpolicylanguagesarevendor-specific

� NotpartoftheBGPprotocolspecification� DifferentlanguagesforCisco,Juniper,etc.

� Still,alllanguageshavesomekeyfeatures� Policyasalistofclauses� Eachclausematchesonrouteattributes� …andeitherdiscardsormodifiesthematchingroutes

� Configurationdonebyhumanoperators� ImplementingthepoliciesoftheirAS� Businessrelationships,trafficengineering,security,…� http://www.cs.princeton.edu/~jrex/papers/policies.pdf

CSC458/CSC2209– ComputerNetworks 58UniversityofToronto– Fall2016

Page 59: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

ASisNotaSingleNode� MultipleroutersinanAS

� NeedtodistributeBGPinformationwithintheAS� InternalBGP(iBGP)sessionsbetweenrouters

CSC458/CSC2209– ComputerNetworks 59UniversityofToronto– Fall2016

AS1

AS2

eBGP

iBGP

Page 60: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

JoiningBGPandIGPInformation� BorderGatewayProtocol(BGP)

� Announcesreachabilitytoexternaldestinations� Mapsadestinationprefixtoanegresspoint

� 128.112.0.0/16reachedvia192.0.2.1

� InteriorGatewayProtocol(IGP)� UsedtocomputepathswithintheAS� Mapsanegresspointtoanoutgoinglink

� 192.0.2.1reachedvia10.10.10.10

CSC458/CSC2209– ComputerNetworks 60UniversityofToronto– Fall2016192.0.2.1

10.10.10.10

Page 61: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

JoiningBGPwithIGPInformation

CSC458/CSC2209– ComputerNetworks 61UniversityofToronto– Fall2016

ForwardingTable

ForwardingTable

AS7018 AS88192.0.2.1

128.112.0.0/16

10.10.10.10

BGP

192.0.2.1128.112.0.0/16

destination nexthop

10.10.10.10192.0.2.0/30

destination nexthop

128.112.0.0/16NextHop=192.0.2.1

128.112.0.0/16

destination nexthop

10.10.10.10

+

192.0.2.0/30 10.10.10.10

Page 62: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

CausesofBGPRoutingChanges� Topologychanges

� Equipmentgoingupordown� Deploymentofnewroutersorsessions

� BGPsessionfailures� Duetoequipmentfailures,maintenance,etc.� Or,duetocongestiononthephysicalpath

� Changesinroutingpolicy� Reconfigurationofpreferences� Reconfigurationofroutefilters

� Persistentprotocoloscillation� ConflictsbetweenpoliciesindifferentAS’s

CSC458/CSC2209– ComputerNetworks 62UniversityofToronto– Fall2016

Page 63: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

RoutingChange:BeforeandAfter

CSC458/CSC2209– ComputerNetworks 63UniversityofToronto– Fall2016

0

1 2

3

0

1 2

3

(1,0) (2,0)

(3,1,0)

(2,0)

(1,2,0)

(3,2,0)

Page 64: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

� 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

RoutingChange:PathExploration

CSC458/CSC2209– ComputerNetworks 64UniversityofToronto– Fall2016

0

1 2

3

(2,0)

(1,2,0)

(3,2,0)

Page 65: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

� Initialsituation� Destination0isalive� AllAS’susedirectpath

� Whendestinationdies� AllAS’slosedirectpath� Allswitchtolongerpaths� Eventuallywithdrawn

� E.g.,AS2� (2,0)à (2,1,0)� (2,1,0)à (2,3,0)� (2,3,0)à (2,1,3,0)� (2,1,3,0)à null

RoutingChange:PathExploration

CSC458/CSC2209– ComputerNetworks 65UniversityofToronto– Fall2016

1 2

3

0

(1,0)(1,2,0)(1,3,0)

(2,0)(2,1,0)(2,3,0)(2,1,3,0)

(3,0)(3,1,0)(3,2,0)

Page 66: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

� BGPrunsoverTCP� BGPonlysendsupdateswhenchangesoccur

� TCPdoesn’tdetectlostconnectivityonitsown

� Detectingafailure� Keep-alive:60seconds� Holdtimer:180seconds

� Reactingtoafailure� Discardallrouteslearnedfromtheneighbor

� Sendnewupdatesforanyroutesthatchange

BGPSessionFailure

CSC458/CSC2209– ComputerNetworks 66UniversityofToronto– Fall2016

AS1

AS2

Page 67: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

BGPConvergesSlowly,ifatAll� Pathvectoravoidscount-to-infinity

� But,AS’sstillmustexploremanyalternatepaths� …tofindthehighest-rankedpaththatisstillavailable

� Fortunately,inpractice� MostpopulardestinationshaveverystableBGProutes� Andmostinstabilityliesinafewunpopulardestinations

� Still,lowerBGPconvergencedelayisagoal� Canbetensofsecondstotensofminutes� Highforimportantinteractiveapplications� …orevenconventionalapplication,likeWebbrowsing

CSC458/CSC2209– ComputerNetworks 67UniversityofToronto– Fall2016

Page 68: Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu

Conclusions� BGPissolvingahardproblem

� Routingprotocoloperatingataglobalscale� Withtensofthousandsofindependentnetworks� Thateachhavetheirownpolicygoals� Andallwantfastconvergence

� KeyfeaturesofBGP� Prefix-basedpath-vectorprotocol� Incrementalupdates(announcementsandwithdrawals)

� Policiesappliedatimportandexportofroutes� InternalBGPtodistributeinformationwithinanAS� InteractionwiththeIGPtocomputeforwardingtables

CSC458/CSC2209– ComputerNetworks 68UniversityofToronto– Fall2016