cs 204: bgp - university of california, riverside · · 2017-04-11cs 204: bgp jiasichen lectures:...
Post on 11-May-2018
217 Views
Preview:
TRANSCRIPT
CS204:BGPJiasi Chen
Lectures:MWF12:10-1pmHumanitiesandSocialSciences1403
http://www.cs.ucr.edu/~jiasi/teaching/cs204_spring17/
1
Overview
• ASrelationships• Inter-ASrouting
• BGP• Example
• Paperdiscussion
2
Q:Howto“gluetogether”the“networkofnetworks”?
WheredidYouTubego?
3Source:https://www.cnet.com/news/how-pakistan-knocked-youtube-offline-and-how-to-make-sure-it-never-happens-again/
WheredidYouTubego?
• In2008,PakistanigovernmentdecidedtoblockYouTube• PakistanTelecom(PT)beganadvertisingaroutetoYouTube
• Advertised256addresseswithinYouTube’sIPblock• Actuallyledtoa“blackhole”
• AHongKong-basedtelecomcompanypickeduptheadvertisement• AnnouncementspreadtoothermajorISPswithin10sofseconds• YouTubecountermeasures
• Advertise64addresseswithinYouTube’sIPblock• Morespecificruleshouldoverridegeneralone
• Fullrecoveryafter~2hoursafterPTstoppedadvertisingtheroute
4Source:https://www.cnet.com/news/how-pakistan-knocked-youtube-offline-and-how-to-make-sure-it-never-happens-again/
Overview
• ASrelationships• Inter-ASrouting
• BGP• Example
• Paperdiscussion
5
Q:Howto“gluetogether”the“networkofnetworks”?
AutonomousSystems
• Autonomoussystem(AS)• Unitofroutingpolicy• ~50kASes inuse• E.g.,UCRhasAS#6061,AT&ThasAS#144,PrincetonhasAS#88
AS60613b
3c3a
AS144
1c1a
1d1b AS88
2a2c
2bothernetworks
othernetworks
6
PeeringandTransitISPs
• Peering
• Transit
7
Peer Peer
• Trafficflowsarebi-directional• ISPsjointlypayforequipment
costs
Transitprovider
Transitcustomer
• Trafficflowsarebi-directional• Arrow=Paymentfrom
customertoproviderforupstreamanddownstreamtraffic
PricingContract
• Pricingcontractsaretypicallynotpublicinformation• $/Mbps/monthforalltraffictoalldestinations
• Variations• Paidpeering
• E.g.NetflixpaidComcastfordirectpeering• Backplanepeering
• ChargesmallISPsforaccesstoISP’speers• Regionalpricing
• Paytoaccessdifferentgeographicalregions,owncustomersvsexternalISPs
8
Examples
• DoestrafficflowbetweenAandD?• Whopayswho?
9
B
DA
C
B
DA
C
Examples(2)
10
B
DA
C
Peeringconnectiononlyopentocustomers
Q:WillCannounceBtoD?
11
WhocannetworkGsee?• NetworkGcanseeallthenetworks
becausenetworksE,DandHbuytransitfromit.
CanAseeBthroughF?• NetworkAcanseenetworkFandits
customersdirectly,butnotnetworkBthroughnetworkF.
CanCseeBthroughDorF?• NetworkCcanseeNetworkBthroughits
peerD,butnotviaitstransitcustomerF.
WilltrafficfromCtoHgothroughEorDorboth?• TrafficfromCtoHwillgothroughE,but
notthroughD.Source:https://arstechnica.com/features/2008/09/peering-and-transit/2/
InternetExchangePoints(IXP)
• Whentwonetworkspeer,itattractsothernetworkstopeertheretoo• Transitproviders• DirectconnectionbetweenISPsstillpreferred• Runasnon-profits(Europe)orprivatebusiness(USA)
• Providenetworkequipment,switches,etc.• MonthlyfeetojointheIXP
12
Overview
• ASrelationships• Inter-ASrouting
• BGP• Example
• Paperdiscussion
13
Q:Howto“gluetogether”the“networkofnetworks”?
ReviewofRouting
• Inter-ASrouting• BGP
• Intra-ASrouting• RIP• OSPF
Link-state?Distancevector?
AS60613b
3c3a
AS144
1c1a
1d1b AS88
2a2c
2bothernetworks
othernetworks
14
WhydifferentIntra-,Inter-ASrouting?policy:• inter-AS:adminwantscontroloverhowitstrafficrouted,whoroutesthroughitsnet.
• intra-AS:singleadmin,sonopolicydecisionsneededscale:• hierarchicalroutingsavestablesize,reducedupdatetraffic
performance:• intra-AS:canfocusonperformance• inter-AS:policymaydominateoverperformance
15
Internetinter-ASrouting:BGP• BGP(BorderGatewayProtocol): the defacto
inter-domainroutingprotocol• “gluethatholdstheInternettogether”
• BGPprovideseachASameansto:• eBGP: obtainsubnetreachabilityinformationfrom
neighboringASs.• iBGP: propagatereachabilityinformationtoallAS-
internalrouters.• determine“good” routestoothernetworksbasedon
reachabilityinformationandpolicy.• allowssubnettoadvertiseitsexistencetorestof
Internet:“Iamhere”
16
BGPbasics
• whenAS3advertisesaprefixtoAS1:• AS3promises itwillforwarddatagramstowardsthatprefix• AS3canaggregateprefixesinitsadvertisement
AS3
AS2
3b
3c3a
AS1
1c1a
1d1b
2a2c
2bothernetworks
othernetworks
v BGP session: two BGP routers (“peers”) exchange BGP messages:§ advertising paths to different destination network prefixes (“path vector”
protocol) § exchanged over semi-permanent TCP connections
BGP message
17
PathattributesandBGProutes
• advertisedprefixincludesBGPattributes• prefix+attributes=“route”
• twoimportantattributes:• AS-PATH: containsASsthroughwhichprefixadvertisementhaspassed
• NEXT-HOP: indicatesspecificinternal-ASroutertonext-hopAS
vExamplev Prefix:138.16.64/22vAS-PATH:AS3AS15…vNEXT-HOP:201.44.13.125
18
BGPbasics:distributingpathinformation
AS3
AS2
3b3a
AS1
1c1a
1d1b
2a2c
2bothernetworks
othernetworks
eBGP session
iBGP session
3c
19
BGPmessages• BGPmessagesexchangedbetweenpeersoverTCPconnection• BGPmessages:
• OPEN: opensTCPconnectiontopeerandauthenticatessender
• UPDATE: advertisesnewpath(orwithdrawsold)• KEEPALIVE: keepsconnectionaliveinabsenceofUPDATES;alsoACKsOPENrequest
• NOTIFICATION: reportserrorsinpreviousmsg;alsousedtocloseconnection
20
Overview
• ASrelationships• Inter-ASrouting
• BGP• Example
• Paperdiscussion
21
Q:Howto“gluetogether”the“networkofnetworks”?
3b
1d
3a
1c2aAS3
AS1AS2
1a
2c2b
1b
Intra-ASRouting algorithm
Inter-ASRouting algorithm
Forwardingtable
3c
InterconnectedASes
vforwardingtableconfiguredbybothintra-andinter-ASroutingalgorithm§ intra-ASsetsentriesforinternaldests
§ inter-AS&intra-ASsetsentriesforexternaldests
22
1
23
Dest IP
routing algorithms
local forwarding tableprefix output port
138.16.64/22124.12/16
212/8…………..
324…
Howdoesentrygetinforwardingtable?
entry
Assume prefix 138.16.64/22 is in another AS.
23
High-leveloverview1. Routerbecomesawareofprefix2. Routerdeterminesoutputportforprefix3. Routerentersprefix-portinforwardingtable
Howdoesentrygetinforwardingtable?
24
Routerbecomesawareofprefix
AS3
AS2
3b
3c
AS1
1c1a
1d
2a2c
2bothernetworks
BGP message
v BGP message contains “routes”v “route” is a prefix and attributes: AS-PATH, NEXT-
HOP,…v Example
v Prefix: 138.16.64/22v AS-PATH: AS3 AS15 …v NEXT-HOP: 201.44.13.125
138.16.64/22
3a
1bAS15
25
Routermayreceivemultipleroutes
v Router may receive multiple routes for same prefixv Which route to pick?
1. local preference value attribute: policy decision2. shortest AS-PATH 3. closest NEXT-HOP router: hot potato routing4. additional criteria
AS3
AS2
3b
3c
AS1
1c1a
1d
2a2c
2bothernetworks
AS131
3a
1b138.16.64/22
26
138.16.64/22
2.ShortestASPath
v AS3 AS131 AS201 to 138.16.64/22
v AS2 AS17 to 138.16.64/22
select
27
AS3
AS2
3b
3c
AS1
1c1a
1d
2a2c
2bothernetworks
AS131
3a
1b138.16.64/22
138.16.64/22
Useintra-domainrouting• Useselectedroute’sNEXT-HOPattribute
• NEXT-HOP=IPaddressoftherouterinterfacethatbeginstheASPATH
• Example:vAS-PATH:AS2AS17…;NEXT-HOP:111.99.86.55
• RouterusesOSPFtofindshortestpathfrom1cto111.99.86.55
• Insertentry(138.16.64/22,4)into1c’sforwardingtable
AS3
AS2
3b
3c3a
AS1
1c1a
1d1b
2a2c
2bAS17
AS1312a
3a
28
111.99.86.55
138.16.64/22
138.16.64/2212 3
4
3.ClosestNEXT-HOPRoutervSupposetheretwoormorebestinter-routes.vThenchooseroutewithclosestNEXT-HOP
§ UseOSPFtodeterminewhichgatewayisclosest§ Q:From1c,choseAS3AS131orAS2AS17?§ A:routeAS3AS131sinceitiscloser
AS3
AS2
3b
3c3a
AS1
1c1a
1d1b
2a2c
2bAS17
AS131
29
1.Policydecision
v A,B,C are provider networksv X,W,Y are customer (of provider networks)v X is dual-homed: attached to two networks
A
B
C
WX
Y
legend:
customer network:
providernetwork
30
1.Policydecision
v A advertises path AW to Bv B advertises path BAW to X v Q: Should B advertise path BAW to C?
§ No way! B gets no “revenue” for routing CBAW since neither W nor C are B’s customers
§ B wants to force C to route to w via A§ B wants to route only to/from its customers!
A
B
C
WX
Y
legend:
customer network:
providernetwork
31
Summary1. Routerbecomesawareofprefix
§ viaBGProuteadvertisementsfromotherrouters2. Filtertheroutebasedonpolicy($$$)3. Determinerouteroutputportforprefix
§ UseBGProuteselectiontofindbestinter-ASroute§ UseOSPFtofindbestintra-ASrouteleadingtobestinter-
ASroute§ Routeridentifiesrouterportforthatbestroute
4. Enterprefix-portentryinforwardingtable
Howdoesentrygetinforwardingtable?
32
InPractice
• SupposeyouwanttomaptheInternet…
33
IPaddress AS#AS#AS# Relationship
IPAddress
• PrincetonIPranges• 128.112.0.0/16• 140.180.0.0/16• 204.153.48.0/23• 66.180.177.0/24• 192.12.53.0/24
• UCRIPranges• 138.23.0.0/16 • 192.31.146.0/24 • 192.31.148.0/24 • 192.35.223.0/24
34
Q:WhatisthedifferencebetweenIPaddressblocksandAS#?
Overview
• ASrelationships• Inter-ASrouting
• BGP• Example
• Paperdiscussion
35
Q:Howto“gluetogether”the“networkofnetworks”?
StableBGPRouting
• TryingtogettodestinationA• Routeslistedinorderofpreference
A
B
C
(BCA)(BA)
(CBA)(CA)
36
StableBGProuting
• Supposewestartoffwithacertaininitialconfiguration
A
B
C
(BCA)(BA)
(CBA)(CA)
(BCA)(BA)
(CBA)(CA)
time
37
StableBGProuting
• Supposewestartoffwiththesecondchoiceoptions…
A
B
C
(BCA)(BA)
(CBA)(CA)
(BCA)(BA)
(CBA)(CA)
(BCA)(BA)
(CBA)(CA)
time
38
PaperDiscussion
• Whatareimplicitandexplicitpolicies?
• Whataresomeoftheunderlyingassumptionsofthemodel?
• Doyouthinkitisfeasibletohaveacentralizedrouteregistry?
39
Sources
• ComputerNetworking:ATop-DownApproach,Kurose&Ross• Lixin GaoandJenniferRexford,“StableInternetRoutingWithoutGlobalCoordination,”IEEETrans.Networking,2001.
40
top related