Upload
others
View
6
Download
0
Embed Size (px)
Citation preview
ComputerNetworks:ArchitectureandProtocols
CS4450
Lecture13InternetAddressing,
Path-VectorProtocol(BGP)
RachitAgarwal
Announcements
• Prelim1gradesposted
• Remember:wehaveaveryflexiblegradingmechanism
• Evenifyougota0inprelim1,youcouldgetanA-
• Ifyougot>20inprelim1,youcouldgetanA+
• Thegradingschemewasdesignedtomakeyoufocuson“learning”
• Ifyou’dliketotalk,Iamhere.
�2
GoalsforToday’sLecture
• InternetAddressing
• BeginInter-domainrouting(Border-GatewayProtocol(BGP))
�3
InternetAddressing
Addressingsofar
• Eachnodehasa“name”
• Wehavesofarworkedonlywithnames
• Assumedthatforwarding/routingetc.doneonnames
• Today:
• Whydoweneedaddresses?
• Whydoweassignaddressesthewayweassignaddresses?
Threerequirementsforaddressing
• Scalablerouting
• Howmuststatemustbestoredtoforwardpackets?
• Howmuchstateneedstobeupdateduponhostarrival/departure?
• Efficientforwarding
• Howquicklycanonelocateitemsinroutingtable?
• Hostmustbeabletorecognizepacketisforthem
Layer2(linklayer):“Flat”Addressing
• UsesMACnames
• Uniqueidentifiershardcodedinhardware;nolocationinformation
• Localareanetworksrouteonthese“flat”addresses
• SpanningTreeProtocolrunsonswitches
• Eachswitchstoresaroutingentryforeachhostconnectedtoit
• End-hostsstorenothing
• Uponreceivingaframe,anend-host:
• Putsdestination’sanditsownMACnameintheheader
• Forwardsittotheswitchitisconnectedto
• Switchesforwardtheframealongedgesinspanningtree
• Destinationisabletorecognizetheframeisforthemusingaddress
Ifweweretouse“Flat”AddressingonInternet…
• EthernetroutesframesviafloodingonSpanningTree
• Aswehavediscussed:cannotuseitonentireInternet
• OnepossiblewaytouseflataddressesonInternet
• Routingtablesstoreoneentryperend-host
• End-hostsstorenothing
• Uponreceivingapacket,anend-host:
• Putsdestination’sanditsownflataddressintheheader
• Forwardsittotheswitchitisconnectedto
• Switchesforwardthepacketusingroutingtables(noflooding!)
• Destinationisabletorecognizetheframeisforthemusingaddress
Recap:Today’sInternetAddressing:CIDR
• ClasslessInter-domainRouting
• Idea:Flexibledivisionbetweennetworkandhostaddresses
• Prefixisnetworkaddress
• Suffixishostaddress
• Example:
• 128.84.139.5/23isa23bitprefixwith:
• First23bitsfornetworkaddress
• Next9bitsforhostaddresses:maximum2^9hosts
• Terminology:“Slash23”
Howdoesthismeetourrequirements?
• Scalablerouting
• Howmuchstatetoforwardpackets?
• Oneentryperhostperswitch
• Howmuchstateupdatedforeacharrival/departure?
• Oneentryperhostperswitch
• Efficientforwarding
• Exactmatchlookuponflataddresses(exactmatchiseasy!)
• Hostmustbeabletorecognizethepacketisforthem
• Easy
Conclusion:L2addressingdoesnotenablescalablerouting
HowwouldyouscaleL2addressing?
• Supposewewanttodesignamuchlargernetworkusingflataddresses
• MustuseMACaddressaspartoftheaddress
• Onlywayhostknowsthatthepacketisforthem
• Buthowwouldyouenablescalablerouting?
• Small#routingentries(lessthanoneentryperhostperswitch)
• Small#updates(lessthanoneupdateperswitchperhostchange)
ScalableL2addressing:TowardsInternet-scaleaddressing
• Assigneachend-hostanaddressesoftheform—Switch.MAC
• Routingtablesstoreoneentryperswitch(ratherthanperhost)
• Uponreceivingapacket,anend-host:
• Putsdestination’sanditsownSwitch.MACaddressintheheader
• Forwardsittotheswitchitisconnectedto
• Switchesforwardthepacketusingfirstpartoftheaddress
• Destinationisabletorecognizethepacketisforthemusingsecondpartoftheaddress
Better,butstillnotfeasible
(Internethasbillionsofswitches/routers)
Layer3:Hierarchicaladdressing
• Defineacollectionofswitches/routerstobea“Network”
• Useaddressesoftheform—Network.MAC
• Switches/Routersknowhowtoreachallnetworksintheworld
• Routingalgorithmsonlyannounce“Network”partoftheaddresses
• Routingtablesnowstoreanext-hopforeach“network”
• Forwarding:
• RoutersignoreMACpartoftheaddress
• Whenthepacketreachestheright“network”
• PacketforwardedusingMACpartoftheaddress
• UsingLayer2
• ThiswastheoriginalIPaddressingscheme
WhatdoImeanby“network”
• IntheoriginalIPaddressingscheme…
• NetworkmeantanL2network
• Oftenreferredtoasa“subnet”
• Therearetoomanyofthemnowtoscale
Aggregation
• Aggregation:singleforwardingentryusedformanyindividualhosts
• Example:
• InourscalablesolutionSwitch.MAC:aggregatewasswitch
• InourscalablesolutionNetwork.MAC:aggregatewasnetwork
• Advantages:
• Fewerentriesandmorestable
• Changeofhostsdonotchangetables
• Don’tneedtokeepstateonindividualhosts
HierarchicalStructure
• TheInternetisan“inter-network”
• Usedtoconnectnetworkstogether,nothosts
• Formsanaturaltwo-wayhierarchy
• WideAreaNetwork(WAN)deliverstotheright“network”
• LocalAreaNetwork(LAN)deliverstotherighthost
HierarchicalAddressing
• Canyouthinkofanexample?
• AddressingintheUSmail
• Country
• City,Zipcode
• Street
• HouseNumber
• Occupant“Name”
???
IPaddresses
• Unique32bitnumbersassociatedwithahost
• Usedotted-quadnotation,e.g.,128.84.139.5
Country City,State Street,Number Occupant
(8bits) (8bits) (8bits) (8bits)
10000000 0-1010100 10001011 00000-101
128 84 139 5
Network Host
OriginalAddressingmechanism
• Firsteightbits:networkaddress(/8)
• Slashnotationindicatesnetworkaddress
• Last24bits:hostaddress
• Howmanynetworkscanwesupportusing8bits?
• 256!
• Assumed256networksweremorethanenough!!!
• Nowwehavemillions!
Supposewewanttoaccommodatemorenetworks
• Wecanallocatemorebitstonetworkaddress
• Problem?
• Fewerbitsforhostnames
• Whatifsomenetworksneedmorehosts?
Today’sAddressing:CIDR
• ClasslessInter-domainRouting
• Idea:Flexibledivisionbetweennetworkandhostaddresses
• Prefixisnetworkaddress
• Suffixishostaddress
• Example:
• 128.84.139.5/23isa23bitprefixwith:
• First23bitsfornetworkaddress
• Next9bitsforhostaddresses:maximum2^9hosts
• Terminology:“Slash23”
ExampleforCIDRAddressing
• 128.84.139.5/23isa23bitprefixwith2^9hostaddresses
10000000 0-1010100 10001011 00000-101
128 84 139 5
Network(23bits) Host(9bits)
Allocatingaddresses
• InternetCorporationforAssignedNamesandNumbers(ICANN)…
• AllocateslargeblocksofaddressestoRegionalInternetRegistries• E.g.,AmericanRegistryforInternetNames(ARIN)…
• ThatallocatesblocksofaddressestoLargeInternetServiceProviders(ISP)
• Thatallocateaddressestoindividualsandsmallerinstitutions
• Fakeexample:
• ICANN->ARIN->AT&T->Cornell->CS->Me
Allocatingaddresses:Fakeexample
• ICANNgivesARINseveral/8s—101.*.*.*,128.*.*.*,….
• ARINgivenAT&Tone/8—128.*.*.*/8(cansupport2^24hosts)
• Networkprefix:10000000
• AT&TgivesCornellone/16—128.84.*.*/16(supports2^16hosts)
• Networkprefix:1000000001010100
• CornellgivesCSone/24—128.84.139.*/24(supports2^8hosts)
• Networkprefix:100000000101010010001011
• CSgivenmeaspecificaddress—128.84.139.5
• IPaddress:10000000010101001000101100000101
Howdoesthismeetourrequirements?
• Tounderstandthis,weneedtounderstandtheroutingontheInternet
• Andtounderstandthat,weneedtounderstandtheInternet
Asetofnetworkelementsconnectedtogether,thatimplementasetofprotocolsforthepurposeofsharingresourcesattheendhosts
Backtothebasics:whatisacomputernetwork?
“InteriorRouters”
“AutonomousSystem(AS)”or“Domain” Regionofanetworkunderasingleadministrativeentity
“BorderRouters”
An“end-to-end”route
Whatdoesacomputernetworkactuallylooklike?
“InteriorRouters”
“AutonomousSystem(AS)”or“Domain” Regionofanetworkunderasingleadministrativeentity
“BorderRouters”
An“end-to-end”route
Whatdoesacomputernetworklooklike?
AutonomousSystems(AS)
• AnASisanetworkunderasingleadministrativecontrol
• Currentlyover30,000
• Example:AT&T,FranceTelecom,Cornell,IBM,etc.
• AcollectionofroutersinterconnectingmultipleswitchedEthernets
• AndinterconnectionstoneighboringASes
• Sometimescalled“Domains”
• EachASassignedauniqueidentifier
• 16bitASnumber
AT&T a.0.0.0/8
France Telecom
LBL a.b.0.0/16
Cornella.c.0.0/16
a.c.*.* is this way
a.b.*.* is this way
IPaddressing->ScalableRouting?
AT&T a.0.0.0/8
France Telecom
LBL a.b.0.0/16
Cornella.c.0.0/16
a.*.*.* is this way
foo.com a.d.0.0/16
Canaddnewhosts/networkswithoutupdakngtheroukngentriesatFranceTelecom
IPaddressing->ScalableRouting?
AT&T a.0.0.0/8
LBL a.b.0.0/16
Cornella.c.0.0/16
ESNet
ESNetmustmaintainroukngentriesforbotha.*.*.*anda.c.*.*
IPaddressing->ScalableRouting?
AdministrativeStructureShapesInter-domainRouting
● ASeswantfreedomtopickroutesbasedonpolicy● “Mytrafficcan’tbecarriedovermycompetitor’snetwork!”
● “Idon’twanttocarryA’strafficthroughmynetwork!”
● CannotbeexpressedasInternet-wide“shortest(cost)path”
● ASeswantautonomy● Wanttochoosetheirowninternalroutingprotocol
● Wanttochoosetheirownpolicy
● ASeswantprivacy● Choiceofnetworktopology,routingpolicies,etc.
ChoiceofRoutingAlgorithm
● LinkState(LS)vs.DistanceVector(DV)
The“BorderGatewayProtocol”(BGP)extendsDistance-Vectorideastoaccomodatepolicy
● LSoffersnoprivacy—linkstateannouncementsknowntoeveryone
● LSlimitsautonomy—needagreementonmetric,algorithm
● DVisadecentstartingpoint● Per-destinationupdatesbyintermediatenodesgiveusahook
● But,wasn’tdesignedtoimplementpolicy
● …andisvulnerabletoloopsifshortestpathsnottaken
BusinessRelationshipsShapeTopologyandPolicy
● ThreebasickindsofrelationshipsbetweenASes
● Businessimplications● Customerpaysprovider
● Peersdon’tpayeachother● Exchangeroughlyequaltraffic
● ASAcanbeASB’scustomer
● ASAcanbeASB’sprovider
● ASAcanbeASB’speer
peer peerprovider customerRelationsbetweenASes
•Customerspayprovider•Peersdon’tpayeachother
BusinessImplications
BusinessRelationships
peer peerprovider customerRelationsbetweenASes
•Customerspayprovider•Peersdon’tpayeachother
BusinessImplications
A
B C
D E
E.g.,DandE talkalot
Peeringsaves BandCmoney
WhyPeer?
● ASesprovide“transit”betweentheircustomers● Peersdonotprovidetransitbetweenotherpeers
trafficallowed trafficnotallowed
A B C
D E F
QPr Cu
Peer Peer
RoutingFollowstheMoney
A B C
D E F
QPr Cu
Peer Peer
RoutingFollowstheMoney
trafficallowed trafficnotallowed
● ASesprovide“transit”betweentheircustomersandproviders● Peersdonotprovidetransitbetweenotherpeersandproviders
● ASesprovide“transit”betweentheircustomers● Peersdonotprovidetransitbetweenotherpeers
trafficallowed trafficnotallowed
A B C
D E F
QPr Cu
Peer Peer
Inter-domainRoutingFollowstheMoney
A B C
D E F
QPr Cu
Peer Peer
RoutingFollowstheMoney
trafficallowed trafficnotallowed
● ASesprovide“transit”betweentheircustomersandproviders● Peersdonotprovidetransitbetweenotherpeersandproviders
Inter-domainRouting:Setup
● DestinationsareIPprefixes(12.0.0.0/8)
● NodesareAutonomousSystems(ASes)● InternalsofeachASarehidden
● Linksrepresentbothphysicallinksandbusinessrelationships
● BGP(BorderGatewayProtocol)istheInterdomainroutingprotocol● ImplementedbyASborderrouters
BGP
EachASselectsthe“best”routeithearsadvertisedfor
aprefix
AnASadvertisesitsbestroutes
tooneormoreIPprefixes
Soundfamiliar?
BGPInspiredbyDistanceVector
● Per-destinationrouteadvertisements
● Noglobalsharingofnetworktopology
● Iterativeanddistributedconvergenceonpaths
● But,fourkeydifferences
BGPvs.DV
● BGPselectsroutebasedonpolicy,notshortestdistance/leastcost
(1)BGPdoesnotpicktheshortestpathroutes!
2 3
1
Node2mayprefer2,3,1over2,1
● Howdoweavoidloops?
BGPvs.DV
● Idea:advertisetheentirepath● Distancevector:senddistancemetricperdest.d
● Pathvector:sendtheentirepathforeachdest.d
(2)Path-vectorRouting
C B A
Destination IP
“d: path (B,A)” “d: path (A)”
data traffic data traffic
LoopDetectionwithPath-Vector
● Nodecaneasilydetectaloop● Lookforitsownnodeidentifierinthepath
● Nodecansimplydiscardpathswithloops● e.g.node1seesitselfinthepath3,2,1
3 2 1
“d: path (2,1)” “d: path (1)”
“d: path (3,2,1)”
d
BGPvs.DV
● Idea:advertisetheentirepath● Distancevector:senddistancemetricperdest.d
● Pathvector:sendtheentirepathforeachdest.d
(2)Path-vectorRouting
● Benefits
● Loopavoidanceiseasy
● Flexiblepoliciesbasedonentirepath
BGPvs.DV
● Forpolicyreasons,anASmaychoosenottoadvertisearoutetoadestination
(3)SelectiveRouteAdvertisement
● Asaresult,reachabilityisnotguaranteedevenifthegraphisconnected
AS 2
AS 3AS 1
Example:AS#2doesnotwanttocarrytrafficbetweenAS#1andAS#3
BGPvs.DV
● Forscalability,BGPmayaggregateroutesfordifferentprefixes
(4)BGPmayaggregateroutes
AT&T a.0.0.0/8
LBL a.b.0.0/16
Cornella.c.0.0/16
a.*.*.* is this way
foo.com a.d.0.0/16
BGPOutline
● BGPPolicy● Typicalpoliciesandimplementation
● BGPprotocoldetails
● IssueswithBGP
Policy:
Imposedinhowroutesareselectedandexported
Can reach 128.3/16
blah blah
Route selection
A
P
C
B
Q
Route export
● Selection:Whichpathtouse● Controlswhether/howtrafficleavesthenetwork
● Export:Whichpathtoadvertise● Controlswhether/howtrafficentersthenetwork
TypicalSelectionPolicy
● Indecreasingorderofpriority:1. Makeorsavemoney(sendtocustomer>peer>provider)
2. Maximizeperformance(smallestASpathlength)
3. Minimizeuseofmynetworkbandwidth(“hotpotato”)
4. …
TypicalExportPolicy
Destinationprefixadvertisedby…
Exportrouteto…
CustomerEveryone
(providers,peers,othercustomers)
Peer Customers
Provider Customers
Knownasthe“Gao-Rexford”rulesCapturecommon(butnotrequired!)prackce