39
CS 204: Layering Jiasi Chen MWF 12:10-1pm Humanities and Social Sciences 1403 http://www.cs.ucr.edu/~jiasi/teaching/cs204_spring17/ 1

CS 204: Layering

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: CS 204: Layering

CS204:Layering

Jiasi ChenMWF12:10-1pm

HumanitiesandSocialSciences1403

http://www.cs.ucr.edu/~jiasi/teaching/cs204_spring17/

1

Page 2: CS 204: Layering

Overview

• Howtoread• History• Layering

• Inter-LAN(small)• Inter-LAN(large)• Evolutionoflayers

• Paperdiscussion

2

Q:HowtodesigntheInternetfromthe

groundup?

Page 3: CS 204: Layering

WhyYouNeedtoRead

• Forclass!• Tounderstandclassicpapersinthefield• Tokeepupwiththefield• Toreviewconference/journalpapers• Toreviewdraftsofyourco-authorsforfurtherdiscussion• Tobecomeabetterwriterforyourownpapers

3

Page 4: CS 204: Layering

FirstPass

• Read• Abstractandintroduction• Sectionheadings• Conclusions

• Beabletounderstand• Category:Whattypeofpaperisit?• Context:Whatbodyofworkdoesitrelateto?• Correctness:Dotheassumptionsseemvalid?• Contributions:Whatarethemainresearchcontributions?• Clarity:Isthepaperwell-written?

4

Page 5: CS 204: Layering

SecondPass

• Read• Readpaperfully,butignoreproofs• Figures• Markrelevantreferences

• Beabletounderstand• Keyideas• Ifindithelpfultowrite2bulletpointsatthetopforfuturereference

• Whentodothis• Possiblyrelevantpapertoyourresearch

• Time• Onehour

5

Page 6: CS 204: Layering

ThirdPass

• Read• Alldetailsfully• Imagineyouwerewritingthepaper,andquestioneveryassumption• Noteideasforfuturework

• Whentodothis• Reviewingaconference/journalpaper• Keyrelatedworktoyourownpaper

• Time:severalhours

6

Page 7: CS 204: Layering

Internethistory

• 1961: Kleinrock -queueingtheoryshowseffectivenessofpacket-switching

• 1964: Baran - packet-switchinginmilitarynets

• 1967: ARPAnet conceivedbyAdvancedResearchProjectsAgency

• 1969: firstARPAnet nodeoperational

• 1972:• ARPAnet publicdemo• NCP(NetworkControlProtocol)firsthost-hostprotocol

• firste-mailprogram• ARPAnet has15nodes

1961-1972: Early packet-switching principles

7

Page 8: CS 204: Layering

• 1970: ALOHAnet satellitenetworkinHawaii

• 1974: CerfandKahn-architectureforinterconnectingnetworks

• 1976: EthernetatXeroxPARC• late70’s: proprietaryarchitectures:DECnet,SNA,XNA

• late70’s: switchingfixedlengthpackets(ATMprecursor)

• 1979: ARPAnet has200nodes

CerfandKahn’sinternetworkingprinciples:

• minimalism,autonomy- nointernalchangesrequiredtointerconnectnetworks

• besteffortservicemodel• statelessrouters• decentralizedcontrol

definetoday’sInternetarchitecture

1972-1980: Internetworking, new and proprietary nets

Internet history

8

Page 9: CS 204: Layering

• 1983: deploymentofTCP/IP

• 1982: smtp e-mailprotocoldefined

• 1983: DNSdefinedforname-to-IP-addresstranslation

• 1985: ftpprotocoldefined• 1988: TCPcongestioncontrol

• newnationalnetworks:Csnet,BITnet,NSFnet,Minitel

• 100,000hostsconnectedtoconfederationofnetworks

1980-1990: new protocols, a proliferation of networks

Internet history

9

Page 10: CS 204: Layering

• early1990’s: ARPAnetdecommissioned

• 1991: NSFliftsrestrictionsoncommercialuseofNSFnet(decommissioned,1995)

• early1990s: Web• hypertext[Bush1945,Nelson1960’s]

• HTML,HTTP:Berners-Lee• 1994:Mosaic,laterNetscape• late1990’s:commercialization oftheWeb

late1990’s– 2000’s:• morekillerapps:instantmessaging,P2Pfilesharing

• networksecuritytoforefront

• est.50millionhost,100million+users

• backbonelinksrunningatGbps

1990, 2000’s: commercialization, the Web, new apps

Internet history

10

Page 11: CS 204: Layering

2005-present• ~750millionhosts

• Smartphonesandtablets• Aggressivedeploymentofbroadbandaccess• Increasingubiquityofhigh-speedwirelessaccess• Emergenceofonlinesocialnetworks:

• Facebook:soononebillionusers• Serviceproviders(Google,Microsoft)createtheirownnetworks

• BypassInternet,providing“instantaneous” accesstosearch,emai,etc.

• E-commerce,universities,enterprisesrunningtheirservicesin“cloud” (eg,AmazonEC2)

Internet history

1-11

Page 12: CS 204: Layering

Overview

• Howtoread• History• Layering

• Inter-LAN(small)• Inter-LAN(large)• Evolutionoflayers

• Paperdiscussion

12

Q:HowtodesigntheInternetfromthe

groundup?

Page 13: CS 204: Layering

Inter-LANconnectivity

• Circuitswitching• Packetswitching

• Datagramrouting• Sourcerouting• Virtualcircuits

13

Page 14: CS 204: Layering

Circuitswitchingend-endresourcesallocatedto,reservedfor“call” betweensource&dest:

• Indiagram,eachlinkhasfourcircuits.

• callgets2nd circuitintoplinkand1st circuitinrightlink.

• dedicatedresources:nosharing• circuit-like(guaranteed)performance

• circuitsegmentidleifnotusedbycall(nosharing)

• Commonlyusedintraditionaltelephonenetworks

Page 15: CS 204: Layering

Packet-switching:store-and-forward

Nusers

Page 16: CS 204: Layering

Packetswitchingversuscircuitswitching

example:§ 1Mb/slink§ eachuser:

• 100kb/swhen“active”• active10%oftime

• circuit-switching:• 10users

• packetswitching:• with35users,probability>10activeatsametimeislessthan.0004

packetswitchingallowsmoreuserstousenetwork!

Nusers 1 Mbps link

Q: how did we get value 0.0004?

Page 17: CS 204: Layering

Typesofpacketswitching

• Datagramrouting• Packetheadercontainsdestination• Switchesperformrouting

• Sourcerouting• Packetheadercontainslistofswitchestotraverse

• Virtualcircuit• Firstsendacontrolmessage• Whenswitchesreceivethiscontrolmessage,setuproutesandreserveresources

17

S1,S2|data

D|data

D|

Dà 1 Dà 2

flag|dataFlagà 1 Flagà 2

H S2S1D

H S2S1D

H S2S1D

1 2

1 2

1 20

0

0

Page 18: CS 204: Layering

Switchforwardingtable

Q: howdoesswitchknowA’reachableviainterface4,B’reachableviainterface5?

switch with six interfaces(1,2,3,4,5,6)

A

A’

B

B’ C

C’

1 2

345

6v A: eachswitchhasaswitchtable, eachentry:§ (MACaddressofhost,interfacetoreachhost,timestamp)

§ lookslikearoutingtable!

Q: howareentriescreated,maintainedinswitchtable?

§ somethinglikearoutingprotocol?

Page 19: CS 204: Layering

A

A’

B

B’ C

C’

1 2

345

6

Switch:self-learning• switch learns whichhostscanbereachedthroughwhichinterfaces

• whenframereceived,switch“learns” locationofsender:incomingLANsegment

• recordssender/locationpairinswitchtable

A A’

Source: ADest: A’

MAC addr interface TTLSwitch table

(initially empty)A 1 60

Page 20: CS 204: Layering

A

A’

B

B’ C

C’

1 2

345

6

Self-learning,forwarding:exampleA A’

Source: ADest: A’

MAC addr interface TTLswitch table

(initially empty)A 1 60

A A’A A’A A’A A’A A’

• framedestination,A’,locatonunknown: flood

A’ A

v destination A location known:

A’ 4 60

selectively send on just one link

Page 21: CS 204: Layering

Interconnectingswitches

vswitchescanbeconnectedtogether

Q: sending from A to G - how does S1 know to forward frame destined to F via S4 and S3?

A

B

S1

C D

E

FS2

S4

S3

HI

G

Page 22: CS 204: Layering

Overview

• Howtoread• History• Layering

• Inter-LAN(small)• Inter-LAN(large)• Evolutionoflayers

• Paperdiscussion

22

Q:HowtodesigntheInternetfromthe

groundup?

Page 23: CS 204: Layering

Inter-networking

• Goal:scalablenetworkinfrastructurethatconnectsdifferentsmallernetworkstogether,toenablehostsondifferentnetworkstotalktoeachother.

• KeychallengeswiththeLANapproach:1. Scalingup2. Heterogeneity

23

Page 24: CS 204: Layering

Whyscalingupdoesn’twork

24

A

A’

B

B’ C

C’

Page 25: CS 204: Layering

WhatisLANheterogeneity?

• Sourcesofheterogeneity• Addressing• Bandwidthandlatency• Packetsize• Lossrates• Packetrouting

• GatewaysprovidetranslationbetweenLANs

25

A

B

S1

C D

E

FS2

S4

S3

HI

G

Page 26: CS 204: Layering

Optionsforgatewayfunctionality

1. Translation:translatebetweendifferentLAN“languages”• Updates:translationmayfailifLANsgetupdatedornewfeaturesareadded• Scalability:havetotranslatebetweenmanyLANs

2. Unifiednetworklayer:definesomecommon“words”thateveryonehastounderstand• ThisistheClarkpaperyouread!

26

Page 27: CS 204: Layering

Universalitygoals

• IP-over-everything• Commonsetofnames(IPaddresses)androutingprotocolssothatgatewaysknowhowtobehave

• Best-effort• Nospecialtreatmentofdifferentpackets(ignoringQoS)• Nolossrecovery(atthenetworklayer)

• End-to-end• Complicatedfunctionality(e.g.reliabilityinthetransportlayer)implementedintheendhost

• Networkgatewayskeptsimple

27

Page 28: CS 204: Layering

Robustnessgoals

• Soft-stateinsidethenetwork• Definition:informationthattimesout(goesaway)unlessrefreshed• Easilyrecoverfromerrors• E.g.,routingprotocolsautomaticallyupdatethemselvesperiodically

• Fatesharingofendhosts• Ifendhostsgodown,stateislost• Ifgatewayfails,networkcanrecover(softstate)

• Conservativetransmission/liberalreception• “Beconservativeinwhatyousend;beliberalinwhatyouaccept”• E.g.senderreceivesACKforunknownpackets;silentlydrops

28

Page 29: CS 204: Layering

Weaknesses

• Relyonend-hoststobehave• Buggyimplementation• Greedysenders(non-TCP)• Malicious

• Administrationandmanagementtoolsnotverymature

• Weakaccountingandpricingtools

29

Page 30: CS 204: Layering

Overview

• Howtoread• History• Layering

• Inter-LAN(small)• Inter-LAN(large)• Evolutionoflayers

• Paperdiscussion

30

Q:HowtodesigntheInternetfromthe

groundup?

Page 31: CS 204: Layering

Internetprotocolstack• application: supportingnetworkapplications

• FTP,SMTP,HTTP• transport: process-processdatatransfer

• TCP,UDP• network: routingofdatagramsfromsourcetodestination

• IP,routingprotocols• link: datatransferbetweenneighboringnetworkelements

• Ethernet,802.111(WiFi),PPP• physical: bits“onthewire”

application

transport

network

link

physical

31

Page 32: CS 204: Layering

Sender writes letter

Sender drops off letter at post office

Post office X sends mail to city Y

Sender city X Recipient city Yintermediate air-trafficcontrol centers

airplane routing

Recipient reads letter

Mailman delivers from post office to sender’s home

Post office Y receives mail from city X

Layeringofpostofficefunctionality

layers: eachlayerimplementsaservice• viaitsowninternal-layeractions• relyingonservicesprovidedbylayerbelow

32

Page 33: CS 204: Layering

Sender writes letter

Sender drops off letter at post office

Post office X sends mail to city Y

Sender city X Recipient city Yintermediate air-trafficcontrol centers

airplane routing

Recipient reads letter

Mailman delivers from post office to sender’s home

Post office X receives mail from city X

Layeringofpostofficefunctionality

layers: eachlayerimplementsaservice• viaitsowninternal-layeractions• relyingonservicesprovidedbylayerbelow

PhysicalLink

Network

PhysicalLinkNetwork

Transport:DeliveryviaUPS(signaturerequired)orUSPS(nosignaturerequired)Application:thecontentsoftheletter,e.g.photo,video,novel 33

Page 34: CS 204: Layering

ThenarrowwaistofIP

34“TheEvolutionofLayeredProtocolStacksLeadstoanHourglass-ShapedArchitecture”,SIGCOMM 2011.

Q:WhydoestheInternetprotocolstackresemble

anhourglass?

Page 35: CS 204: Layering

Whythenarrowwaist?

• IPisaglobaladdress,sononeedfortwonamingsystems?

• Lowerlayersarediverse(e.g.wireless,optical,cable),higherlayersarealsodiverse(e.g.voice,video,filetransfer),soIPlayerinthemiddlemustbemoregeneral(andhenceunique)?

• Analyticbirth/deathmodel?

35

Page 36: CS 204: Layering

Overview

• Howtoread• History• Layering

• Inter-LAN(small)• Inter-LAN(large)• Evolutionoflayers

• Paperdiscussion

36

Q:HowtodesigntheInternetfromthe

groundup?

Page 37: CS 204: Layering

Discussion1. Internetcommunicationmustcontinue

despitelossofnetworksorgateways.2. TheInternetmustsupportmultipletypesof

communicationsservice.3. TheInternetarchitecturemust

accommodateavarietyofnetworks.4. TheInternetarchitecturemustpermit

distributedmanagementofitsresources.5. TheInternetarchitecturemustbecost

effective.6. TheInternetarchitecturemustpermithost

attachmentwithalowlevelofeffort.7. Theresourcesusedintheinternet

architecturemustbeaccountable.

37

Firstgoalis“communicationmustcontinuedespitelossofnetworksorgateways”– isthisthesameas“reliability”?

Whyismuchofthefunctionalityplacedonendhosts?Whatdisadvantagesdoesthisplaceonthenetwork?

What“hacks”aretheretogetaroundtheremaininggoals?e.g.,security,networkmanagement,

Page 38: CS 204: Layering

Consequencesofthedesigngoals

• Internetcommunicationmustcontinuedespitelossofnetworksorgateways.

• Statecontainedintheendhost,onlysoftstateinthenetwork• TheInternetmustsupportmultipletypesofcommunicationsservice.

• Differenttransport-layerprotocols(e.g.TCP,UDP)• Datagramasfundamentalunit

• Accommodateavarietyoflocalareanetworks• Best-effortservice

• Distributedmanagement• Multipletier-1ISPs• Intra-domainandinter-domainrouting

38

Page 39: CS 204: Layering

AnyAlternativestoTCP/IP?

• Nameddatanetworking• Universalnamesforcontent,insteadofIPaddresses

• e.g.,weather/riverside/yesterday,video/horror/freddy/chunk1• Forwardingandroutingbasedonnameprefixes

39