lecture14-ip-addressing-forwarding - cornell university · 2019-03-07 · announcements • prelim:...

72
Computer Networks: Architecture and Protocols CS4450 Lecture 13 Distance-vector, Internet, Addressing, Path-Vector (BGP) Rachit Agarwal

Upload: others

Post on 11-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

ComputerNetworks:ArchitectureandProtocols

CS4450

Lecture13Distance-vector,Internet,

Addressing,Path-Vector(BGP)

RachitAgarwal

Page 2: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

Announcements

• Prelim:28thMarch,In-class(Confirmed)

• Nobodyshouldbeinconflict

• Duringmyfirstlecture,Ipromisedyou:

• Icareaboutyou(rlearning)!

• Ifyousticktothecontract,I’llbringmyAgameineverylecture!

• Youhavebeengreatsofar!

• Iwillsticktomypromise

• Wearealmosthalf-waythrough

• IfyouthinkIamnotbringingmyA-gameinthecourse

• Iwanttoknowandimprove!!!

• Pleasefilloutthemid-termevaluation(thisweekend)

• Completelyanonymized;onlyformyeyes;max5min2

Page 3: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

GoalsforToday’sLecture

• FinishDistance-VectorProtocol

• InternetAddressing

• BeginBorder-GatewayProtocol(BGP)

3

Page 4: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

Recapfromlastlecture

Page 5: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

• CreateTree,routeontree

• E.g.,Spanningtreeprotocol(switchedEthernet)

• Good:easy,no(persistent)loops,nodeadends

• Not-so-good:unnecessaryprocessing,highlatency,lowbandwidth

• Obtainaglobalview:

• Linkstate

• Good:conceptuallysimple,no(persistent)loops,nodeadends

• Not-so-good:floodingoflinkstatetoeverynode

• Distributedroutecomputation:

• Distance-vectorprotocol

Recap:Threeflavorsofprotocolsforproducingvalidroutingstate

Page 6: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

Recap:DistanceVectorProtocol

6

• Messages(Y,d,X):ForrootY;FromnodeX;advertisingadistancedtoY

• InitiallyeachswitchXinitializesitsroutingtableto(X,0,-)anddistanceinfinitytoallotherdestinations

• Switchesannouncetheirentiredistancevectors(routingtablew/0nexthops)

• Uponreceivingaroutingtablefromanode(sayX),eachnodedoes:

• ForeachdestinationYintheannouncement(distance(X,Y)=d):

• Ifcurrent_distance_to_Y>d+costoflinktoX:

• updatecurrent_distance_to_Y=d

• updatenext_hop_to_destination=X

• Ifshortestdistancetoanydestinationchanged,sendallneighborsyourdistancevectors

Page 7: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

Recap:LetsruntheProtocolagainonthisexample

(withdistancevectors)

2

1

3

2 1

7

Page 8: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

Round1

2

1

3

2 1

7

distance next-hop1 0 -2 infinity3 infinity

distance next-hop1 infinity2 0 -3 infinity

distance next-hop1 infinity2 infinity3 0 -

Page 9: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

Round2

2

1

3

2 1

7

distance next-hop1 0 -2 2 23 1 3

distance next-hop1 2 12 0 -3 7 3

distance next-hop1 1 12 7 23 0 -

Page 10: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

Round3

2

1

3

2 1

7

distance next-hop1 0 -2 2 23 1 3

distance next-hop1 2 12 0 -3 3 1

distance next-hop1 1 12 3 13 0 -

Page 11: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

Round4

2

1

3

2 1

7

distance next-hop1 0 -2 2 23 1 3

distance next-hop1 2 12 0 -3 3 1

distance next-hop1 1 12 3 13 0 -

Page 12: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

• Algorithm:

• NodesuseBellman-Fordtocomputedistances

• Protocol

• Nodesexchangedistancevectors

• Updatetheirownroutingtables

• Andexchangeagain…

• Details:whentoexchange,whattoexchange,etc….

FromAlgorithmtoProtocol

Page 13: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

• Whendoyousendmessages?

• Whenanyofyourdistancesd(u,v)change

• Whataboutwhenc(u,v)changes?

• Periodically,toensureconsistencybetweenneighbors

• Whatinformationdoyousend?

• Couldsendentirevector

• Orjustupdatedentries

• Doyousendeveryonethesameinformation

• Considerthefollowingslides

OtherAspectsofProtocol

Page 14: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

OnedetailaboutDistanceVector:

HandlingCount-to-InfinityProblem

Page 15: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

Threenodenetwork

2

1

3

2 1

7

distance next-hop1 0 -2 2 23 1 3

distance next-hop1 1 12 3 13 0 -

Page 16: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

Threenodenetwork

2

1

3

2 1

7

distance next-hop1 0 -2 infinity3 1 3

distance next-hop1 1 12 3 13 0 -

Page 17: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

Round1

2

1

3

2 1

7

distance next-hop1 0 -2 4 33 1 3

distance next-hop1 1 12 3 13 0 -

Page 18: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

Round2

2

1

3

2 1

7

distance next-hop1 0 -2 4 33 1 3

distance next-hop1 1 12 5 13 0 -

Page 19: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

Round3

2

1

3

2 1

7

distance next-hop1 0 -2 6 33 1 3

distance next-hop1 1 12 5 13 0 -

Page 20: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

Round4

2

1

3

2 1

7

distance next-hop1 0 -2 6 33 1 3

distance next-hop1 1 12 7 13 0 -

COUNT-TO-INFINITYproblem!!!!

Page 21: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

Count-to-infinityproblem

2

1

3

2 1

7

distance next-hop1 0 -2 6 33 1 3

distance next-hop1 1 12 7 13 0 -

Notjustduetofailures:Canhappenwithchangesincost!

Page 22: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

• Donotadvertiseapathbacktothenodethatisthenexthoponthepath

• Called“splithorizon”

• Tellingthemaboutyourentrygoingthroughthem

• Doesn’ttellthemanythingnew

• Perhapsmisleadsthemthatyouhaveanindependentpath

• Anothersolution:ifyouareusinganext-hop’spath,then:

• Tellthemnottouseyourpath(bytellingthemcostofinfinity)

• Called“poisonedreverse”

• MoreinProblemSet3

HowCanYouFixThis?

Page 23: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

• Distancevectorprotocolscanconvergeslowly

• Whilethesecornercasesarerare

• Theresultingconvergencedelayscanbesignificant

Convergence

Page 24: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

• Link-State:

• Globalflood:eachrouter’slink-state(#ports)

• Senditonceperlinkevent,orperiodically

• DistanceVector:

• Sendlongervector(#dest)justtoneighbors

• Butmightenduptriggeringtheirupdates

• SenditeverytimeDVchanges(whichcanbeoften)

• Tradeoff:

• LS:Senditeverywhereandbedoneinpredictabletime

• DV:Sendlocally,andperhapsiterateuntilconvergence

ComparisonofScalability

Page 25: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

EndofDistance-vectorRouting

NowyouknowjustasmuchasmyPhDstudents:-)

Page 26: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

InternetAddressing

Page 27: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

Addressingsofar

• Eachnodehasa“name”

• Wehavesofarworkedonlywithnames

• Assumedthatforwarding/routingetc.doneonnames

• Today:

• Whydoweneedaddresses?

• Whydoweassignaddressesthewayweassignaddresses?

Page 28: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

Threerequirementsforaddressing

• Scalablerouting

• Howmuststatemustbestoredtoforwardpackets?

• Howmuchstateneedstobeupdateduponhostarrival/departure?

• Efficientforwarding

• Howquicklycanonelocateitemsinroutingtable?

• Hostmustbeabletorecognizepacketisforthem

Page 29: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

Layer2(linklayer):“Flat”Addressing

• UsesMACaddress

• “Names”,remember?Usedasidentifier

• Uniqueidentifiershardcodedinthehardware

• Nolocationinformation

• Localareanetworksrouteonthese“flat”addresses

• SpanningTreeProtocolrunsonswitchesandhosts

• Eachswitchstoresaseparateroutingentryforeachhost

• End-hostsstorenothing

• Uponreceivingapacket,anend-host:

• Putsdestination’sanditsownMACaddressintheheader

• Forwardsittotheswitchitisconnectedto

• Destinationisabletorecognizethepacketisforthemusingaddress

Page 30: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

Howdoesthismeetourrequirements?

• Scalablerouting

• Howmuchstatetoforwardpackets?

• Oneentryperhostperswitch

• Howmuchstateupdatedforeacharrival/departure?

• Oneentryperhostperswitch

• Efficientforwarding

• ExactmatchlookuponMACaddresses(exactmatchiseasy!)

• Hostmustbeabletorecognizethepacketisforthem

• MACaddressdoesthisperfectly

Conclusion:L2addressingdoesnotenablescalablerouting

Page 31: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

HowwouldyouscaleL2?

• SupposewewanttodesignamuchlargerL2network

• MustuseMACaddressaspartoftheaddress

• Onlywayhostknowsthatthepacketisforthem

• Buthowwouldyouenablescalablerouting?

• Small#routingentries(lessthanoneentryperhostperswitch)

• Small#updates(lessthanoneupdateperswitchperhostchange)

Page 32: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

OnepossibleSolution:TowardsInternet-scaleaddressing

• Assigneachend-hostanaddressesoftheform—Switch:MAC

• SpanningTreeProtocolrunsonlyonswitches

• So,eachswitchhasoneentryperswitch(ratherthanperhost)

• Uponreceivingapacket,anend-host:

• Putsdestination’sanditsownSwitch:MACaddressintheheader

• Forwardsittotheswitchitisconnectedto

• Switchesforwardthepacketusingfirstpartoftheaddress

• Destinationisabletorecognizethepacketisforthemusingsecondpartoftheaddress

Page 33: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

Layer3:Hierarchicaladdressing

• RoutingtablescannothaveentryforeachswitchintheInternet

• Useaddressesoftheform—Network:Host

• Routersknowhowtoreachallnetworksintheworld

• Routingalgorithmsonlyannounce“Network”partoftheaddresses

• Routingtablesnowstoreanext-hopforeach“network”

• Forwarding:

• Routersignorehostpartoftheaddress

• Whenthepacketreachestherightnetwork

• PacketforwardedusingHostpartoftheaddress

• UsingLayer2

• ThiswastheoriginalIPaddressingscheme

Page 34: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

WhatdoImeanby“network”

• IntheoriginalIPaddressingscheme…

• NetworkmeantanL2network

• Oftenreferredtoasa“subnet”

• Therearetoomanyofthemnowtoscale

Page 35: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

Aggregation

• Aggregation:singleforwardingentryusedformanyindividualhosts

• Example:

• InourscalableL2solution:aggregatewasswitch

• InourscalableL3solution:aggregatewasnetwork

• Advantages:

• Fewerentriesandmorestable

• Changeofhostsdonotchangetables

• Don’tneedtokeepstateonindividualhosts

Page 36: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

HierarchicalStructure

• TheInternetisan“inter-network”

• Usedtoconnectnetworkstogether,nothosts

• Formsanaturaltwo-wayhierarchy

• WideAreaNetwork(WAN)deliverstotheright“network”

• LocalAreaNetwork(LAN)deliverstotherighthost

Page 37: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

HierarchicalAddressing

• Canyouthinkofanexample?

• AddressingintheUSmail

• Country

• City,Zipcode

• Street

• HouseNumber

• Occupant“Name”

???

Page 38: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

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

Page 39: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

OriginalAddressingmechanism

• Firsteightbits:networkaddress(/8)

• Slashnotationindicatesnetworkaddress

• Last24bits:hostaddress

• Assumed256networksweremorethanenough!!!

• Nowwehavemillions!

Page 40: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

Supposewewanttoaccommodatemorenetworks

• Wecanallocatemorebitstonetworkaddress

• Problem?

• Fewerbitsforhostnames

• Whatifsomenetworksneedmorehosts?

Page 41: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

Today’sAddressing:CIDR

• ClasslessInter-domainRouting

• Idea:Flexibledivisionbetweennetworkandhostaddresses

• Prefixisnetworkaddress

• Suffixishostaddress

• Example:

• 128.84.139.5/23isa23bitprefixwith:

• First23bitsfornetworkaddress

• Next9bitsforhostaddresses:maximum2^9hosts

• Terminology:“Slash23”

Page 42: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

ExampleforCIDRAddressing

• 128.84.139.5/23isa23bitprefixwith2^9hostaddresses

10000000 0-1010100 10001011 00000-101

128 84 139 5

Network(23bits) Host(9bits)

Page 43: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

Allocatingaddresses

• InternetCorporationforAssignedNamesandNumbers(ICANN)…

• AllocateslargeblocksofaddressestoRegionalInternetRegistries• E.g.,AmericanRegistryforInternetNames(ARIN)…

• ThatallocatesblocksofaddressestoLargeInternetServiceProviders(ISP)

• Thatallocateaddressestoindividualsandsmallerinstitutions

• Fakeexample:

• ICANN->ARIN->AT&T->Cornell->CS->Me

Page 44: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

Allocatingaddresses:Fakeexample

• ICANNgivesARINseveral/8s

• ARINgivenAT&Tone/8,128.0/8

• Networkprefix:10000000

• AT&TgivesCornellone/16,128.84/16

• Networkprefix:1000000001010100

• CornellgivesCSone/24,128.84.139/24

• Networkprefix:100000000101010010001011

• CSgivenmeaspecificaddress128.84.139.5

• Networkprefix:10000000010101001000101100000101

Page 45: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

Howdoesthismeetourrequirements?

• Tounderstandthis,weneedtounderstandtheroutingontheInternet

• Andtounderstandthat,weneedtounderstandtheInternet

Page 46: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

Asetofnetworkelementsconnectedtogether,thatimplementasetofprotocolsforthepurposeofsharingresourcesattheendhosts

Backtothebasics:whatisacomputernetwork?

Page 47: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

“InteriorRouters”

“AutonomousSystem(AS)”or“Domain” Regionofanetworkunderasingleadministrativeentity

“BorderRouters”

An“end-to-end”route

Whatdoesacomputernetworklooklike?

Page 48: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

“InteriorRouters”

“AutonomousSystem(AS)”or“Domain” Regionofanetworkunderasingleadministrativeentity

“BorderRouters”

An“end-to-end”route

Whatdoesacomputernetworklooklike?

Page 49: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

AutonomousSystems(AS)

• AnASisanetworkunderasingleadministrativecontrol

• Currentlyover30,000

• Example:AT&T,FranceTelecom,Cornell,IBM,etc.

• AcollectionofroutersinterconnectingmultipleswitchedEthernets

• AndinterconnectionstoneighboringASes

• Sometimescalled“Domains”

• EachASassignedauniqueidentifier

• 16bitASnumber

Page 50: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

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?

Page 51: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

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/networkswithoutupdaqngtherouqngentriesatFranceTelecom

IPaddressing->ScalableRouting?

Page 52: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

AT&T a.0.0.0/8

LBL a.b.0.0/16

Cornella.c.0.0/16

ESNet

ESNetmustmaintainrouqngentriesforbotha.*.*.*anda.c.*.*

IPaddressing->ScalableRouting?

Page 53: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

AdministrativeStructureShapesInter-domainRouting

● ASeswantfreedomtopickroutesbasedonpolicy● “Mytrafficcan’tbecarriedovermycompetitor’snetwork!”

● “Idon’twanttocarryA’strafficthroughmynetwork!”

● CannotbeexpressedasInternet-wide“leastcost”

● ASeswantautonomy● Wanttochoosetheirowninternalroutingprotocol

● Wanttochoosetheirownpolicy

● ASeswantprivacy● Choiceofnetworktopology,routingpolicies,etc.

Page 54: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

ChoiceofRoutingAlgorithm

● LinkState(LS)vs.DistanceVector(DV)

The“BorderGatewayProtocol”(BGP)extendsDistance-Vectorideastoaccomodatepolicy

● LSoffersnoprivacy—broadcastsallnetworkinformation

● LSlimitsautonomy—needagreementonmetric,algorithm

● DVisadecentstartingpoint● Per-destinationupdatesbyintermediatenodesgiveusahook

● But,wasn’tdesignedtoimplementpolicy

● …andisvulnerabletoloopsifshortestpathsnottaken

Page 55: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

BusinessRelationshipsShapeTopologyandPolicy

● ThreebasickindsofrelationshipsbetweenASes

● Businessimplications● Customerpaysprovider

● Peersdon’tpayeachother● Exchangeroughlyequaltraffic

● ASAcanbeASB’scustomer

● ASAcanbeASB’sprovider

● ASAcanbeASB’speer

Page 56: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

peer peerprovider customerRelationsbetweenASes

•Customerspayprovider•Peersdon’tpayeachother

BusinessImplications

BusinessRelationships

Page 57: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

peer peerprovider customerRelationsbetweenASes

•Customerspayprovider•Peersdon’tpayeachother

BusinessImplications

A

B C

D E

E.g.,DandE talkalot

Peeringsaves BandCmoney

WhyPeer?

Page 58: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

● ASesprovide“transit”betweentheircustomers● Peersdonotprovidetransitbetweenotherpeers

trafficallowed trafficnotallowed

A B C

D E F

QPr Cu

Peer Peer

RoutingFollowstheMoney

Page 59: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

● AnASonlycarriestrafficto/fromitsowncustomersoverapeeringlink

A B C

D E F

QPr Cu

Peer Peer

RoutingFollowstheMoney

Page 60: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

Inter-domainRouting:Setup

● DestinationsareIPprefixes(12.0.0.0/8)

● NodesareAutonomousSystems(ASes)● InternalsofeachASarehidden

● Linksrepresentbothphysicallinksandbusinessrelationships

● BGP(BorderGatewayProtocol)istheInterdomainroutingprotocol● ImplementedbyASborderrouters

Page 61: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

BGP

EachASselectsthe“best”routeithearsadvertisedfor

aprefix

AnASadvertisesitsbestroutes

tooneormoreIPprefixes

Soundfamiliar?

Page 62: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

BGPInspiredbyDistanceVector

● Per-destinationrouteadvertisements

● Noglobalsharingofnetworktopology

● Iterativeanddistributedconvergenceonpaths

● But,fourkeydifferences

Page 63: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

BGPvs.DV

● BGPselectsroutebasedonpolicy,notshortestdistance/leastcost

(1)BGPdoesnotpicktheshortestpathroutes!

2 3

1

Node2mayprefer2,3,1over2,1

● Howdoweavoidloops?

Page 64: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

BGPvs.DV

● Idea:advertisetheentirepath● Distancevector:senddistancemetricperdest.d

● Pathvector:sendtheentirepathforeachdest.d

(2)Path-vectorRouting

C B A

d

“d: path (B,A)” “d: path (A)”

data traffic data traffic

Page 65: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

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

Page 66: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

BGPvs.DV

● Idea:advertisetheentirepath● Distancevector:senddistancemetricperdest.d

● Pathvector:sendtheentirepathforeachdest.d

(2)Path-vectorRouting

● Benefits

● Loopavoidanceiseasy

● Flexiblepoliciesbasedonentirepath

Page 67: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

BGPvs.DV

● Forpolicyreasons,anASmaychoosenottoadvertisearoutetoadestination

(3)SelectiveRouteAdvertisement

● Asaresult,reachabilityisnotguaranteedevenifthegraphisconnected

AS 2

AS 3AS 1

Example:AS#2doesnotwanttocarrytrafficbetweenAS#1andAS#3

Page 68: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

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

Page 69: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

BGPOutline

● BGPPolicy● Typicalpoliciesandimplementation

● BGPprotocoldetails

● IssueswithBGP

Page 70: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

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

Page 71: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

TypicalSelectionPolicy

● Indecreasingorderofpriority:1. Makeorsavemoney(sendtocustomer>peer>provider)

2. Maximizeperformance(smallestASpathlength)

3. Minimizeuseofmynetworkbandwidth(“hotpotato”)

4. …

Page 72: lecture14-IP-addressing-forwarding - Cornell University · 2019-03-07 · Announcements • Prelim: 28th March, In-class (Confirmed) • Nobody should be in conflict • During my

TypicalExportPolicy

Destinationprefixadvertisedby…

Exportrouteto…

CustomerEveryone

(providers,peers,othercustomers)

Peer Customers

Provider Customers

Knownasthe“Gao-Rexford”rulesCapturecommon(butnotrequired!)pracqce