Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor...
Transcript of Professor Yashar Ganjali Department of Computer …yganjali/resources/Course-Handouts/...Professor...
ProfessorYasharGanjaliDepartmentofComputerScienceUniversityofToronto
[email protected]://www.cs.toronto.edu/~yganjali
Announcements� Don’tforgettheprogrammingassignment
� Due:FridayOct.21st at5pm(sharp)� SubmitelectronicallyonMarkUs.
� Thisweek’stutorial� Programmingassignment1Q&A
� Readingforthisweek:Chapter5
CSC458/CSC2209– ComputerNetworks 2UniversityofToronto– Fall2016
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
CSC458/CSC2209– ComputerNetworks 4UniversityofToronto– Fall2016
Outline� Internet’sTopology
� Internet’stwo-tieredtopology� AS-leveltopology� Router-leveltopology
� RoutingintheInternet� HierarchyandAutonomousSystems� InteriorRoutingProtocols:RIP,OSPF� ExteriorRoutingProtocol:BGP
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
ASTopology� Node:AutonomousSystem� Edge:TwoAS’sthatconnecttoeachother
CSC458/CSC2209– ComputerNetworks 6UniversityofToronto– Fall2016
1
2
34
5
67
WhatisanEdge,Really?� EdgeintheASgraph
� AtleastoneconnectionbetweentwoAS’s� SomedestinationsreachedfromoneASviatheother
CSC458/CSC2209– ComputerNetworks 7UniversityofToronto– Fall2016
AS1
AS2
ExchangePoint
AS1
AS2 AS3
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.
CSC458/CSC2209– ComputerNetworks 9UniversityofToronto– Fall2016
InterdomainPaths
1
2
3
4
5
67
Client Webserver
Path:6,5,4,3,2,1
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
Customer-ProviderRelationship� Customerneedstobereachablefromeveryone
� Providertellsallneighborshowtoreachthecustomer� Customerdoesnotwanttoprovidetransitservice
� Customerdoesnotletitsprovidersroutethroughit
CSC458/CSC2209– ComputerNetworks 11UniversityofToronto– Fall2016
d
d
provider
customer
customer
provider
Trafficto thecustomer Trafficfromthecustomer
advertisements
traffic
Peer-PeerRelationship� Peersexchangetrafficbetweencustomers
� ASexportsonlycustomerroutestoapeer� ASexportsapeer’sroutesonlytoitscustomers� Oftentherelationshipissettlement-free(i.e.,no$$$)
CSC458/CSC2209– ComputerNetworks 12UniversityofToronto– Fall2016
peerpeer
Trafficto/fromthepeeranditscustomers
d
advertisements
traffic
PrincetonExample� Internet:customerofAT&TandUSLEC� Researchuniversities/labs:customerofInternet2� Localresidences:peerwithPatriotMedia� Localnon-profits:providerforseveralnon-profits
CSC458/CSC2209– ComputerNetworks 13UniversityofToronto– Fall2016
AT&T USLEC Internet2
Patriotpeer
ASStructure:Tier-1Providers� Tier-1provider
� Hasnoupstreamproviderofitsown� Typicallyhasanationalorinternationalbackbone� UUNET,Sprint,AT&T,Level3,…
� TopoftheInternethierarchyof12-20AS’s� Fullpeer-peerconnectionsbetweentier-1providers
CSC458/CSC2209– ComputerNetworks 14UniversityofToronto– Fall2016
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
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
CharacteristicsofASPaths� ASpathmaybelongerthanshortestASpath� Routerpathmaybelongerthanshortestpath
CSC458/CSC2209– ComputerNetworks 17UniversityofToronto– Fall2016
s d
3AShops,7routerhops
2AShops,8routerhops
� Backbonenetworks� MultiplePoints-of-Presence(PoPs)
� LotsofcommunicationbetweenPoPs
� Accommodatetrafficdemandsandlimitdelay
BackboneNetworks
CSC458/CSC2209– ComputerNetworks 18UniversityofToronto– Fall2016
CSC458/CSC2209– ComputerNetworks 19UniversityofToronto– Fall2016
Example:AbileneInternet2Backbone
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
WheretoLocateNodesandLinks� PlacingPoints-of-Presence(PoPs)
� Largepopulationofpotentialcustomers� Otherprovidersorexchangepoints� Costandavailabilityofreal-estate� Mostlyinmajormetropolitanareas
� PlacinglinksbetweenPoPs� Alreadyfiberintheground� Neededtolimitpropagationdelay� Neededtohandlethetrafficload
CSC458/CSC2209– ComputerNetworks 21UniversityofToronto– Fall2016
CustomerConnectingtoaProvider
CSC458/CSC2209– ComputerNetworks 22UniversityofToronto– Fall2016
Provider Provider
1accesslink 2accesslinks
Provider
2accessrouters
Provider
2accessPoPs
Multi-Homing:TwoorMoreProviders� Motivationsformulti-homing
� Extrareliability,survivesingleISPfailure� Financialleveragethroughcompetition� Gamingthe95th-percentilebillingmodel� Betterperformancebyselectingbetterpath
CSC458/CSC2209– ComputerNetworks 23UniversityofToronto– Fall2016
Provider1 Provider2
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
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
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???
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
PathsYouShouldNeverSee(“Invalid”)
CSC458/CSC2209– ComputerNetworks 28UniversityofToronto– Fall2016
Customer-provider
Peer-peer
twopeeredges
transitthroughacustomer
ChallengesofRelationshipInference� Incompletemeasurementdata
� HardtogetacompleteviewoftheASgraph� Especiallyhardtoseepeer-peeredgeslowinhierarchy
� Realrelationshipsaresometimemorecomplex� Peerinonepartoftheworld,customerinanother� Otherkindsofrelationships(e.g.,backup)� Specialrelationshipsforcertaindestinationprefixes
� Still,inferenceworkhasprovenveryuseful� QualitativeviewofInternettopologyandrelationships
CSC458/CSC2209– ComputerNetworks 29UniversityofToronto– Fall2016
CSC458/CSC2209– ComputerNetworks 30UniversityofToronto– Fall2016
Outline� Internet’sTopology
� Internet’stwo-tieredtopology� AS-leveltopology� Router-leveltopology
� RoutingintheInternet� HierarchyandAutonomousSystems� InteriorRoutingProtocols:RIP,OSPF� ExteriorRoutingProtocol:BGP
RoutingStorySoFar…� Techniques
� Flooding� DistributedBellmanFordAlgorithm� Dijkstra’sShortestPathFirstAlgorithm
� Question1.CanweapplythesetotheInternetasawhole?
� Question2.Ifnot,whatcanwedo?
CSC458/CSC2209– ComputerNetworks 31UniversityofToronto– Fall2016
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
RoutingintheInternet
CSC458/CSC2209– ComputerNetworks 33UniversityofToronto– Fall2016StubAS TransitASe.g.backboneserviceprovider StubAS
AS‘A’ AS‘B’ AS‘C’
InteriorGatewayProtocol
InteriorGatewayProtocol
InteriorGatewayProtocol
BGP BGP
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
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
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
Link-StateRoutingisProblematic� Topologyinformationisflooded
� Highbandwidthandstorageoverhead� Forcesnodestodivulgesensitiveinformation
� Entirepathcomputedlocallypernode� Highprocessingoverheadinalargenetwork
� Minimizessomenotionoftotaldistance� Worksonlyifpolicyissharedanduniform
� TypicallyusedonlyinsideanAS� E.g.,OSPFandIS-IS
CSC458/CSC2209– ComputerNetworks 37UniversityofToronto– Fall2016
DistanceVectorisontheRightTrack� Advantages
� Hidesdetailsofthenetworktopology� Nodesdetermineonly“nexthop”towardthedest
� Disadvantages� Minimizessomenotionoftotaldistance,whichisdifficultinaninterdomainsetting
� Slowconvergenceduetothecounting-to-infinityproblem(“badnewstravelsslowly”)
� Idea:extendthenotionofadistancevector
CSC458/CSC2209– ComputerNetworks 38UniversityofToronto– Fall2016
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
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)”
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
BGPOperations
CSC458/CSC2209– ComputerNetworks 42UniversityofToronto– Fall2016
EstablishsessiononTCPport179
Exchangeallactiveroutes
Exchangeincrementalupdates
AS1
AS2
WhileconnectionisALIVEexchangerouteUPDATEmessages
BGPsession
IncrementalProtocol� Anodelearnsmultiplepathstodestination
� Storesalloftheroutesinaroutingtable� Appliespolicytoselectasingleactiveroute� …andmayadvertisetheroutetoitsneighbors
� Incrementalupdates� Announcement
� Uponselectinganewactiveroute,addnodeidtopath� …and(optionally)advertisetoeachneighbor
� Withdrawal� Iftheactiverouteisnolongeravailable� …sendawithdrawalmessagetotheneighbors
CSC458/CSC2209– ComputerNetworks 43UniversityofToronto– Fall2016
BGPMessages� Open:EstablishaBGPsession.� KeepAlive:Handshakeatregularintervals.� Notification:Shutsdownapeeringsession.� Update:Announcingnewroutesorwithdrawingpreviouslyannouncedroutes.
� Attributesinclude:Nexthop,ASPath,localpreference,Multi-exitdiscriminator,…� Usedtoselectamongmultipleoptionsforpaths
CSC458/CSC2209– ComputerNetworks 44UniversityofToronto– Fall2016
BGPannouncement=prefix+pathattributes
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
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
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
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
SoManyChoices…
CSC458/CSC2209– ComputerNetworks 49UniversityofToronto– Fall2016
WhichrouteshouldFrankpickto13.13.0.0./16?
AS1
AS2
AS4
AS3
13.13.0.0/16
Frank’sInternetBarn
peer peercustomerprovider
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
BGPRouteSelectionSummary
CSC458/CSC2209– ComputerNetworks 51UniversityofToronto– Fall2016
HighestLocalPreference
ShortestASPATH
LowestMED
i-BGP<e-BGP
LowestIGPcosttoBGPegress
LowestrouterID
trafficengineering
EnforcerelationshipsE.g.prefercustomerroutesoverpeerroutes
Throwuphandsandbreakties
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
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
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
ImportPolicy:Filtering� Discardsomerouteannouncements
� Detectconfigurationmistakesandattacks� Examplesonsessiontoacustomer
� Discardrouteifprefixnotownedbythecustomer� DiscardroutethatcontainsotherlargeISPinASpath
CSC458/CSC2209– ComputerNetworks 55UniversityofToronto– Fall2016
AT&T
Princeton
USLEC
128.112.0.0/16
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
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
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
ASisNotaSingleNode� MultipleroutersinanAS
� NeedtodistributeBGPinformationwithintheAS� InternalBGP(iBGP)sessionsbetweenrouters
CSC458/CSC2209– ComputerNetworks 59UniversityofToronto– Fall2016
AS1
AS2
eBGP
iBGP
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
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
CausesofBGPRoutingChanges� Topologychanges
� Equipmentgoingupordown� Deploymentofnewroutersorsessions
� BGPsessionfailures� Duetoequipmentfailures,maintenance,etc.� Or,duetocongestiononthephysicalpath
� Changesinroutingpolicy� Reconfigurationofpreferences� Reconfigurationofroutefilters
� Persistentprotocoloscillation� ConflictsbetweenpoliciesindifferentAS’s
CSC458/CSC2209– ComputerNetworks 62UniversityofToronto– Fall2016
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)
� 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)
� 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)
� BGPrunsoverTCP� BGPonlysendsupdateswhenchangesoccur
� TCPdoesn’tdetectlostconnectivityonitsown
� Detectingafailure� Keep-alive:60seconds� Holdtimer:180seconds
� Reactingtoafailure� Discardallrouteslearnedfromtheneighbor
� Sendnewupdatesforanyroutesthatchange
BGPSessionFailure
CSC458/CSC2209– ComputerNetworks 66UniversityofToronto– Fall2016
AS1
AS2
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
Conclusions� BGPissolvingahardproblem
� Routingprotocoloperatingataglobalscale� Withtensofthousandsofindependentnetworks� Thateachhavetheirownpolicygoals� Andallwantfastconvergence
� KeyfeaturesofBGP� Prefix-basedpath-vectorprotocol� Incrementalupdates(announcementsandwithdrawals)
� Policiesappliedatimportandexportofroutes� InternalBGPtodistributeinformationwithinanAS� InteractionwiththeIGPtocomputeforwardingtables
CSC458/CSC2209– ComputerNetworks 68UniversityofToronto– Fall2016