path vector routing and the border gateway protocol
TRANSCRIPT
![Page 1: PATH VECTOR ROUTING AND THE BORDER GATEWAY PROTOCOL](https://reader031.vdocuments.us/reader031/viewer/2022020704/61fb4d9c2e268c58cd5c9239/html5/thumbnails/1.jpg)
PATHVECTORROUTINGANDTHEBORDERGATEWAYPROTOCOL
READING:SECTIONS4.3.3PLUSOPTIONALREADING
COS461:ComputerNetworksSpring2010(MW3:00‐4:20inCOS105)
MikeFreedmanhDp://www.cs.princeton.edu/courses/archive/spring10/cos461/
1
![Page 2: PATH VECTOR ROUTING AND THE BORDER GATEWAY PROTOCOL](https://reader031.vdocuments.us/reader031/viewer/2022020704/61fb4d9c2e268c58cd5c9239/html5/thumbnails/2.jpg)
GoalsofToday’sLecture
• Path‐vectorrouQng– Fasterconvergencethandistancevector– MoreflexibilityinselecQngpaths
• InterdomainrouQng– AutonomousSystems(AS)– BorderGatewayProtocol(BGP)
• BGPconvergence– CausesofBGProuQngchanges– PathexploraQonduringconvergence
2
![Page 3: PATH VECTOR ROUTING AND THE BORDER GATEWAY PROTOCOL](https://reader031.vdocuments.us/reader031/viewer/2022020704/61fb4d9c2e268c58cd5c9239/html5/thumbnails/3.jpg)
InterdomainRouQngandAutonomousSystems(ASes)
3
![Page 4: PATH VECTOR ROUTING AND THE BORDER GATEWAY PROTOCOL](https://reader031.vdocuments.us/reader031/viewer/2022020704/61fb4d9c2e268c58cd5c9239/html5/thumbnails/4.jpg)
InterdomainRouQng• InternetisdividedintoAutonomousSystems– DisQnctregionsofadministraQvecontrol– Routers/linksmanagedbyasingle“insQtuQon”– Serviceprovider,company,university,…
• HierarchyofAutonomousSystems– Large,Qer‐1providerwithanaQonwidebackbone– Medium‐sizedregionalproviderwithsmallerbackbone– Smallnetworkrunbyasinglecompanyoruniversity
• InteracQonbetweenAutonomousSystems– InternaltopologyisnotsharedbetweenASes– …but,neighboringASesinteracttocoordinaterouQng
4
![Page 5: PATH VECTOR ROUTING AND THE BORDER GATEWAY PROTOCOL](https://reader031.vdocuments.us/reader031/viewer/2022020704/61fb4d9c2e268c58cd5c9239/html5/thumbnails/5.jpg)
AutonomousSystemNumbers
5
AS Numbers are 16 bit values.
• Level 3: 1 • MIT: 3 • Harvard: 11 • Yale: 29 • Princeton: 88 • AT&T: 7018, 6341, 5074, … • UUNET: 701, 702, 284, 12199, … • Sprint: 1239, 1240, 6211, 6242, … • …
Currently over 50,000 in use.
![Page 6: PATH VECTOR ROUTING AND THE BORDER GATEWAY PROTOCOL](https://reader031.vdocuments.us/reader031/viewer/2022020704/61fb4d9c2e268c58cd5c9239/html5/thumbnails/6.jpg)
whois–hwhois.arin.netas88
6
OrgName: Princeton University OrgID: PRNU Address: Office of Information Technology Address: 87 Prospect Avenue City: Princeton StateProv: NJ PostalCode: 08540 Country: US
ASNumber: 88 ASName: PRINCETON-AS ASHandle: AS88 Comment: RegDate: Updated: 2008-03-07
RTechHandle: PAO3-ARIN RTechName: Olenick, Peter RTechPhone: +1-609-258-6024 RTechEmail: [email protected] …
![Page 7: PATH VECTOR ROUTING AND THE BORDER GATEWAY PROTOCOL](https://reader031.vdocuments.us/reader031/viewer/2022020704/61fb4d9c2e268c58cd5c9239/html5/thumbnails/7.jpg)
ASNumberTrivia
• ASnumberisa16‐bitquanQty– So,65,536uniqueASnumbers
• Somearereserved(e.g.,forprivateASnumbers)– So,only64,510areavailableforpublicuse
• ManagedbyInternetAssignedNumbersAuthority– Givesblocksof1024toRegionalInternetRegistries– IANAhasallocated39,934ASnumberstoRIRs(Jan’06)
• RIRsassignASnumberstoinsQtuQons– RIRshaveassigned34,827(Jan’06)– Only21,191arevisibleininterdomainrouQng(Jan’06)
• Recentlystartedassigning32‐bitAS#s(2007)7
![Page 8: PATH VECTOR ROUTING AND THE BORDER GATEWAY PROTOCOL](https://reader031.vdocuments.us/reader031/viewer/2022020704/61fb4d9c2e268c58cd5c9239/html5/thumbnails/8.jpg)
GrowthofASnumbers
8
![Page 9: PATH VECTOR ROUTING AND THE BORDER GATEWAY PROTOCOL](https://reader031.vdocuments.us/reader031/viewer/2022020704/61fb4d9c2e268c58cd5c9239/html5/thumbnails/9.jpg)
InterdomainRouQng
• AS‐leveltopology– DesQnaQonsareIPprefixes(e.g.,12.0.0.0/8)– NodesareAutonomousSystems(ASes)– EdgesarelinksandbusinessrelaQonships
9
1
2
3 4
5
6 7
Client Web server
![Page 10: PATH VECTOR ROUTING AND THE BORDER GATEWAY PROTOCOL](https://reader031.vdocuments.us/reader031/viewer/2022020704/61fb4d9c2e268c58cd5c9239/html5/thumbnails/10.jpg)
ChallengesforInterdomainRouQng
• Scale– Prefixes:200,000,andgrowing– ASes:20,000+visibleones,and60Kallocated– Routers:atleastinthemillions…
• Privacy– ASesdon’twanttodivulgeinternaltopologies– …ortheirbusinessrelaQonshipswithneighbors
• Policy– NoInternet‐widenoQonofalinkcostmetric– Needcontroloverwhereyousendtraffic– …andwhocansendtrafficthroughyou
10
![Page 11: PATH VECTOR ROUTING AND THE BORDER GATEWAY PROTOCOL](https://reader031.vdocuments.us/reader031/viewer/2022020704/61fb4d9c2e268c58cd5c9239/html5/thumbnails/11.jpg)
Path‐VectorRouQng
11
![Page 12: PATH VECTOR ROUTING AND THE BORDER GATEWAY PROTOCOL](https://reader031.vdocuments.us/reader031/viewer/2022020704/61fb4d9c2e268c58cd5c9239/html5/thumbnails/12.jpg)
Shortest‐PathRouQngisRestricQve• Alltrafficmusttravelonshortestpaths
• AllnodesneedcommonnoQonoflinkcosts
• IncompaQblewithcommercialrelaQonships
12
Regional ISP1
Regional ISP2
Regional ISP3
Cust1 Cust3 Cust2
National ISP1
National ISP2
YES
NO
![Page 13: PATH VECTOR ROUTING AND THE BORDER GATEWAY PROTOCOL](https://reader031.vdocuments.us/reader031/viewer/2022020704/61fb4d9c2e268c58cd5c9239/html5/thumbnails/13.jpg)
Link‐StateRouQngisProblemaQc
• TopologyinformaQonisflooded– Highbandwidthandstorageoverhead– ForcesnodestodivulgesensiQveinformaQon
• EnQrepathcomputedlocallypernode– Highprocessingoverheadinalargenetwork
• MinimizessomenoQonoftotaldistance– Worksonlyifpolicyissharedanduniform
• TypicallyusedonlyinsideanAS– E.g.,OSPFandIS‐IS
13
![Page 14: PATH VECTOR ROUTING AND THE BORDER GATEWAY PROTOCOL](https://reader031.vdocuments.us/reader031/viewer/2022020704/61fb4d9c2e268c58cd5c9239/html5/thumbnails/14.jpg)
DistanceVectorisontheRightTrack
• Advantages– Hidesdetailsofthenetworktopology– Nodesdetermineonly“nexthop”towardthedest
• Disadvantages– MinimizessomenoQonoftotaldistance,whichisdifficultinaninterdomainsemng
– SlowconvergenceduetothecounQng‐to‐infinityproblem(“badnewstravelsslowly”)
• Idea:extendthenoQonofadistancevector– Tomakeiteasiertodetectloops
14
![Page 15: PATH VECTOR ROUTING AND THE BORDER GATEWAY PROTOCOL](https://reader031.vdocuments.us/reader031/viewer/2022020704/61fb4d9c2e268c58cd5c9239/html5/thumbnails/15.jpg)
Path‐VectorRouQng
• Extensionofdistance‐vectorrouQng– SupportflexiblerouQngpolicies– Avoidcount‐to‐infinityproblem
• Keyidea:adverQsetheenQrepath– Distancevector:senddistancemetricperdestd– Pathvector:sendtheen,repathforeachdestd
15
3 2 1
d
“d: path (2,1)” “d: path (1)”
data traffic data traffic
![Page 16: PATH VECTOR ROUTING AND THE BORDER GATEWAY PROTOCOL](https://reader031.vdocuments.us/reader031/viewer/2022020704/61fb4d9c2e268c58cd5c9239/html5/thumbnails/16.jpg)
FasterLoopDetecQon
• Nodecaneasilydetectaloop– LookforitsownnodeidenQfierinthepath– E.g.,node1seesitselfinthepath“3,2,1”
• Nodecansimplydiscardpathswithloops– E.g.,node1simplydiscardstheadverQsement
16
3 2 1
“d: path (2,1)” “d: path (1)”
“d: path (3,2,1)”
![Page 17: PATH VECTOR ROUTING AND THE BORDER GATEWAY PROTOCOL](https://reader031.vdocuments.us/reader031/viewer/2022020704/61fb4d9c2e268c58cd5c9239/html5/thumbnails/17.jpg)
FlexiblePolicies
• Eachnodecanapplylocalpolicies– PathselecQon:Whichpathtouse?
– Pathexport:WhichpathstoadverQse?
• Examples– Node2maypreferthepath“2,3,1”over“2,1”
– Node1maynotletnode3hearthepath“1,2”
17
2 3
1
2 3
1
![Page 18: PATH VECTOR ROUTING AND THE BORDER GATEWAY PROTOCOL](https://reader031.vdocuments.us/reader031/viewer/2022020704/61fb4d9c2e268c58cd5c9239/html5/thumbnails/18.jpg)
BorderGatewayProtocol(BGP)
18
![Page 19: PATH VECTOR ROUTING AND THE BORDER GATEWAY PROTOCOL](https://reader031.vdocuments.us/reader031/viewer/2022020704/61fb4d9c2e268c58cd5c9239/html5/thumbnails/19.jpg)
BorderGatewayProtocol
• InterdomainrouQngprotocolfortheInternet
– Prefix‐basedpath‐vectorprotocol– Policy‐basedrouQngbasedonASPaths– Evolvedduringthepast18years
19
• 1989 : BGP-1 [RFC 1105], replacement for EGP
• 1990 : BGP-2 [RFC 1163] • 1991 : BGP-3 [RFC 1267] • 1995 : BGP-4 [RFC 1771], support for CIDR • 2006 : BGP-4 [RFC 4271], update
![Page 20: PATH VECTOR ROUTING AND THE BORDER GATEWAY PROTOCOL](https://reader031.vdocuments.us/reader031/viewer/2022020704/61fb4d9c2e268c58cd5c9239/html5/thumbnails/20.jpg)
BGPOperaQons
20
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
![Page 21: PATH VECTOR ROUTING AND THE BORDER GATEWAY PROTOCOL](https://reader031.vdocuments.us/reader031/viewer/2022020704/61fb4d9c2e268c58cd5c9239/html5/thumbnails/21.jpg)
IncrementalProtocol
• AnodelearnsmulQplepathstodesQnaQon– StoresalloftheroutesinarouQngtable– AppliespolicytoselectasingleacQveroute– …andmayadverQsetheroutetoitsneighbors
• Incrementalupdates– Announcement
• UponselecQnganewacQveroute,addnodeidtopath• …and(opQonally)adverQsetoeachneighbor
– Withdrawal• IftheacQverouteisnolongeravailable• …sendawithdrawalmessagetotheneighbors
21
![Page 22: PATH VECTOR ROUTING AND THE BORDER GATEWAY PROTOCOL](https://reader031.vdocuments.us/reader031/viewer/2022020704/61fb4d9c2e268c58cd5c9239/html5/thumbnails/22.jpg)
IncrementalProtocol
• AnodelearnsmulQplepathstodesQnaQon– StoresalloftheroutesinarouQngtable– AppliespolicytoselectasingleacQveroute– …andmayadverQsetheroutetoitsneighbors
• Incrementalupdates– Announcement
• UponselecQnganewacQveroute,addnodeidtopath• …and(opQonally)adverQsetoeachneighbor
– Withdrawal• IftheacQverouteisnolongeravailable• …sendawithdrawalmessagetotheneighbors
22
![Page 23: PATH VECTOR ROUTING AND THE BORDER GATEWAY PROTOCOL](https://reader031.vdocuments.us/reader031/viewer/2022020704/61fb4d9c2e268c58cd5c9239/html5/thumbnails/23.jpg)
ExportacQveroutes
• InconvenQonalpathvectorrouQng,anodehasonerankingfuncQon,whichreflectsitsrouQngpolicy
23
![Page 24: PATH VECTOR ROUTING AND THE BORDER GATEWAY PROTOCOL](https://reader031.vdocuments.us/reader031/viewer/2022020704/61fb4d9c2e268c58cd5c9239/html5/thumbnails/24.jpg)
BGPRoute• DesQnaQonprefix(e.g.,128.112.0.0/16)• RouteaDributes,including
– ASpath(e.g.,“701888”)– Next‐hopIPaddress(e.g.,12.127.0.121)
24
AS 88 Princeton
128.112.0.0/16 AS path = 88 Next Hop = 192.0.2.1
AS 7018 AT&T
AS 11 Yale
192.0.2.1
128.112.0.0/16 AS path = 7018 88 Next Hop = 12.127.0.121
12.127.0.121
![Page 25: PATH VECTOR ROUTING AND THE BORDER GATEWAY PROTOCOL](https://reader031.vdocuments.us/reader031/viewer/2022020704/61fb4d9c2e268c58cd5c9239/html5/thumbnails/25.jpg)
ASPATHADribute
25
AS7018 128.112.0.0/16 AS Path = 88
AS 1239 Sprint
AS 1755 Ebone
AT&T
AS 3549 Global Crossing
128.112.0.0/16 AS Path = 7018 88
128.112.0.0/16 AS Path = 3549 7018 88
AS 88
128.112.0.0/16 Princeton
Prefix Originated
AS 12654 RIPE NCC RIS project
AS 1129 Global Access
128.112.0.0/16 AS Path = 7018 88
128.112.0.0/16 AS Path = 1239 7018 88
128.112.0.0/16 AS Path = 1129 1755 1239 7018 88
128.112.0.0/16 AS Path = 1755 1239 7018 88
![Page 26: PATH VECTOR ROUTING AND THE BORDER GATEWAY PROTOCOL](https://reader031.vdocuments.us/reader031/viewer/2022020704/61fb4d9c2e268c58cd5c9239/html5/thumbnails/26.jpg)
BGPPathSelecQon
• Simplestcase– ShortestASpath– ArbitraryQebreak
• Example– Three‐hopASpathpreferredoverafive‐hopASpath
– AS12654preferspaththroughGlobalCrossing
• But,BGPisnotlimitedtoshortest‐pathrouQng– Policy‐basedrouQng
26
128.112.0.0/16 AS Path = 3549 7018 88
AS 1129
128.112.0.0/16 AS Path = 1129 1755 1239 7018 88
AS 3549 Global Crossing
AS 12654 RIPE NCC RIS project
Global Access
![Page 27: PATH VECTOR ROUTING AND THE BORDER GATEWAY PROTOCOL](https://reader031.vdocuments.us/reader031/viewer/2022020704/61fb4d9c2e268c58cd5c9239/html5/thumbnails/27.jpg)
ASPathLength!=RouterHops
• ASpathmaybelongerthanshortestASpath
• Routerpathmaybelongerthanshortestpath
27
2 AS hops, 8 router hops
s d
3 AS hops, 7 router hops
![Page 28: PATH VECTOR ROUTING AND THE BORDER GATEWAY PROTOCOL](https://reader031.vdocuments.us/reader031/viewer/2022020704/61fb4d9c2e268c58cd5c9239/html5/thumbnails/28.jpg)
BGPConvergence
28
![Page 29: PATH VECTOR ROUTING AND THE BORDER GATEWAY PROTOCOL](https://reader031.vdocuments.us/reader031/viewer/2022020704/61fb4d9c2e268c58cd5c9239/html5/thumbnails/29.jpg)
CausesofBGPRouQngChanges
• Topologychanges– Equipmentgoingupordown– Deploymentofnewroutersorsessions
• BGPsessionfailures– Duetoequipmentfailures,maintenance,etc.– Or,duetocongesQononthephysicalpath
• ChangesinrouQngpolicy– Changesinpreferencesintheroutes– Changesinwhethertherouteisexported
• PersistentprotocoloscillaQon– ConflictsbetweenpoliciesindifferentASes
29
![Page 30: PATH VECTOR ROUTING AND THE BORDER GATEWAY PROTOCOL](https://reader031.vdocuments.us/reader031/viewer/2022020704/61fb4d9c2e268c58cd5c9239/html5/thumbnails/30.jpg)
BGPSessionFailure• BGPrunsoverTCP
– BGPonlysendsupdateswhenchangesoccur
– TCPdoesn’tdetectlostconnecQvityonitsown
• DetecQngafailure– Keep‐alive:60seconds– HoldQmer:180seconds
30
AS1
AS2
• ReacQngtoafailure– Discardallrouteslearnedfromtheneighbor– Sendnewupdatesforanyroutesthatchange– Overheadincreaseswith#ofroutes
• WhymanyQer‐1ASesfilterprefixes</24
![Page 31: PATH VECTOR ROUTING AND THE BORDER GATEWAY PROTOCOL](https://reader031.vdocuments.us/reader031/viewer/2022020704/61fb4d9c2e268c58cd5c9239/html5/thumbnails/31.jpg)
RouQngChange:BeforeandAter
31
0
1 2
3
0
1 2
3
(1,0) (2,0)
(3,1,0)
(2,0)
(1,2,0)
(3,2,0)
![Page 32: PATH VECTOR ROUTING AND THE BORDER GATEWAY PROTOCOL](https://reader031.vdocuments.us/reader031/viewer/2022020704/61fb4d9c2e268c58cd5c9239/html5/thumbnails/32.jpg)
RouQngChange:PathExploraQon
• 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
32
0
1 2
3
(2,0)
(1,2,0)
(3,2,0)
![Page 33: PATH VECTOR ROUTING AND THE BORDER GATEWAY PROTOCOL](https://reader031.vdocuments.us/reader031/viewer/2022020704/61fb4d9c2e268c58cd5c9239/html5/thumbnails/33.jpg)
RouQngChange:PathExploraQon
• IniQalsituaQon– DesQnaQon0isalive– AllASesusedirectpath
• WhendesQnaQondies– AllASeslosedirectpath– 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 33
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 34: PATH VECTOR ROUTING AND THE BORDER GATEWAY PROTOCOL](https://reader031.vdocuments.us/reader031/viewer/2022020704/61fb4d9c2e268c58cd5c9239/html5/thumbnails/34.jpg)
BGPConvergesSlowly
• Pathvectoravoidscount‐to‐infinity– But,ASessQllmustexploremanyalternatepaths– …tofindthehighest‐rankedpaththatissQllavailable
• Fortunately,inpracQce– MostpopulardesQnaQonshaveverystableBGProutes– AndmostinstabilityliesinafewunpopulardesQnaQons
• SQll,lowerBGPconvergencedelayisagoal– Canbetensofsecondstotensofminutes– HighforimportantinteracQveapplicaQons– …orevenconvenQonalapplicaQon,likeWebbrowsing
34
![Page 35: PATH VECTOR ROUTING AND THE BORDER GATEWAY PROTOCOL](https://reader031.vdocuments.us/reader031/viewer/2022020704/61fb4d9c2e268c58cd5c9239/html5/thumbnails/35.jpg)
35
BGPNotGuaranteedtoConverge
Exampleknownasa“disputewheel”
(3d)isavailable
(2d)isavailable
(3d)isnotavailable
(1d)isavailable (2d)isnot
available
(1d)isnotavailable
![Page 36: PATH VECTOR ROUTING AND THE BORDER GATEWAY PROTOCOL](https://reader031.vdocuments.us/reader031/viewer/2022020704/61fb4d9c2e268c58cd5c9239/html5/thumbnails/36.jpg)
Conclusions
• BGPissolvingahardproblem– RouQngprotocoloperaQngataglobalscale– Withtensofthousandsofindependentnetworks– Thateachhavetheirownpolicygoals– Andallwantfastconvergence
• KeyfeaturesofBGP– Prefix‐basedpath‐vectorprotocol– Incrementalupdates(announcementsandwithdrawals)
• Nextlecture:Tricksforsemngpolicy!
36