computer networks - university of washington · computer networks 2 protocols and layers •...

Post on 16-Oct-2020

1 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

ComputerNetworksShyamGollakota

ComputerNetworks 2

ProtocolsandLayers•  Protocolsandlayeringisthemainstructuringmethodusedtodivideupnetworkfunc>onality–  Eachinstanceofaprotocoltalksvirtuallytoitspeerusingtheprotocol

–  Eachinstanceofaprotocolusesonlytheservicesofthelowerlayer

ProtocolsandLayers(3)•  Protocolsarehorizontal,layersarever>cal

ComputerNetworks 3

X

YY

XInstanceofprotocolX

Peerinstance

Node1 Node2

Lowerlayerinstance(ofprotocolY)

ProtocolX

ServiceprovidedbyProtocolY

ProtocolsandLayers(4)•  Setofprotocolsinuseiscalledaprotocolstack

ComputerNetworks 4

ComputerNetworks 5

ProtocolsandLayers(6)•  Protocolsyou’veprobablyheardof:

–  TCP,IP,802.11,Ethernet,HTTP,SSL,DNS,…andmanymore

•  Anexampleprotocolstack–  UsedbyawebbrowseronahostthatiswirelesslyconnectedtotheInternet

HTTP

TCP

IP

802.11

Browser

ComputerNetworks 6

Encapsula>on•  Encapsula>onisthemechanismusedtoeffectprotocollayering–  Lowerlayerwrapshigherlayercontent,addingitsowninforma>ontomakeanewmessagefordelivery

–  Likesendingale[erinanenvelope;postalservicedoesn’tlookinside

Encapsula>on(3)•  Message“onthewire”beginstolooklikeanonion

–  Lowerlayersareoutermost

ComputerNetworks 7

HTTP

TCP

IP

802.11

HTTP

TCP HTTP

TCP HTTPIP

TCP HTTPIP802.11

Encapsula>on(4)

ComputerNetworks 8

HTTP

TCP

IP

802.11

HTTP

TCP HTTP

TCP HTTPIP

TCP HTTPIP802.11

HTTP

TCP

IP

802.11(wire)

HTTP

TCP HTTP

TCP HTTPIP

TCP HTTPIP802.11

TCP HTTPIP802.11

AdvantageofLayering•  Informa>onhidingandreuse

ComputerNetworks 9

HTTP

Browser

HTTP

Server

HTTP

Browser

HTTP

Server

or

AdvantageofLayering(2)•  Informa>onhidingandreuse

ComputerNetworks 10

HTTP

TCP

IP

802.11

Browser

HTTP

TCP

IP

802.11

Server

HTTP

TCP

IP

Ethernet

Browser

HTTP

TCP

IP

Ethernet

Server

or

AdvantageofLayering(3)•  Usinginforma>onhidingtoconnectdifferentsystems

ComputerNetworks 11

HTTP

TCP

IP

802.11

Browser

HTTP

TCP

IPEthernet

Server

AdvantageofLayering(4)•  Usinginforma>onhidingtoconnectdifferentsystems

ComputerNetworks 12

HTTP

TCP

IP

802.11

Browser

IP

802.11

IP

Ethernet

HTTP

TCP

IPEthernet

Server

IP TCP HTTP

802.11 IP TCP HTTP Ethernet IP TCP HTTP

ComputerNetworks 13

DisadvantageofLayering•  ??

InternetReferenceModel•  Afourlayermodelbasedonexperience;omitssomeOSIlayersandusesIPasthenetworklayer.

ComputerNetworks 14

4Applica>on–Programsthatusenetworkservice3Transport–Providesend-to-enddatadelivery2Internet –Sendpacketsovermul>plenetworks

1Link –Sendframesoveralink

InternetReferenceModel(3)•  IPisthe“narrowwaist”oftheInternet

–  Supportsmanydifferentlinksbelowandappsabove

ComputerNetworks 15

4Applica>on3Transport

2Internet

1Link Ethernet802.11

IP

TCP UDP

HTTPSMTP RTP DNS

3GDSLCable

ComputerNetworks 16

Layer-basedNames(2)•  Fordevicesinthenetwork:

NetworkLink

NetworkLink

Link Link

Physical PhysicalRepeater(orhub)

Switch(orbridge)

Router

ComputerNetworks 17

Layer-basedNames(3)•  Fordevicesinthenetwork:

Proxyormiddleboxorgateway

NetworkLink

NetworkLink

AppTransport

AppTransport

Buttheyalllooklikethis!

18

ScopeofthePhysicalLayer•  Concernshowsignalsareusedtotransfermessagebitsoveralink– Wiresetc.carryanalogsignals– Wewanttosenddigitalbits

…1011010110…

Signal

SimpleLinkModel•  We’llendwithanabstrac>onofaphysicalchannel

–  Rate(orbandwidth,capacity,speed)inbits/second–  Delayinseconds,relatedtolength

•  Otherimportantproper>es:– Whetherthechannelisbroadcast,anditserrorrate

CSE461UniversityofWashington 19

DelayD,RateR

Message

MessageLatency•  Latencyisthedelaytosendamessageoveralink

–  Transmissiondelay:>metoputM-bitmessage“onthewire”

–  Propaga>ondelay:>meforbitstopropagateacrossthewire

–  Combiningthetwotermswehave:

CSE461UniversityofWashington 20

MessageLatency(2)•  Latencyisthedelaytosendamessageoveralink

–  Transmissiondelay:>metoputM-bitmessage“onthewire”

T-delay=M(bits)/Rate(bits/sec)=M/Rseconds

–  Propaga>ondelay:>meforbitstopropagateacrossthewire

P-delay=Length/speedofsignals=Length/⅔c=Dseconds

–  Combiningthetwotermswehave:L=M/R+D

CSE461UniversityofWashington 21

CSE461UniversityofWashington 22

MetricUnits•  Themainprefixesweuse:

•  Usepowersof10forrates,2forstorage–  1Mbps=1,000,000bps,1KB=210bytes

•  “B”isforbytes,“b”isforbits

Prefix Exp. prefix exp. K(ilo) 103 m(illi) 10-3

M(ega) 106 µ(micro) 10-6

G(iga) 109 n(ano) 10-9

CSE461UniversityofWashington 23

LatencyExamples(2)•  “Dialup”withatelephonemodem:

D=5ms,R=56kbps,M=1250bytes

L=5ms+(1250x8)/(56x103)sec=184ms!

•  Broadbandcross-countrylink:D=50ms,R=10Mbps,M=1250bytes

L=50ms+(1250x8)/(10x106)sec=51ms

•  Alonglinkoraslowratemeanshighlatency–  Open,onedelaycomponentdominates

CSE461UniversityofWashington 24

Bandwidth-DelayProduct•  Messagestakespaceonthewire!

•  Theamountofdatainflightisthebandwidth-delay(BD)product

BD=RxD– Measureinbits,orinmessages–  SmallforLANs,bigfor“longfat”pipes

CSE461UniversityofWashington 25

Bandwidth-DelayExample(2)•  Fiberathome,cross-country

R=40Mbps,D=50msBD=40x106x50x10-3bits

=2000Kbit=250KB

•  That’squitealotofdata“inthenetwork”!

110101000010111010101001011

weightsofharmonicfrequenciesSignalover>me

=

FrequencyRepresenta>on•  Asignalover>mecanberepresentedbyitsfrequencycomponents(calledFourieranalysis)

26am

plitu

de

Lost!

EffectofLessBandwidth•  Fewerfrequencies(=lessbandwidth)degradessignal

27

Lost!

27

Lost!Bandwidth

SignalsoveraWire(2)•  Example:

28

2:A[enua>on:

3:Bandwidth:

4:Noise:

Sentsignal

CSE461UniversityofWashington 29

SignalsoverWireless•  Signalstransmi[edonacarrierfrequency,likefiber

•  Travelatspeedoflight,spreadoutanda[enuatefasterthan1/dist2

•  Mul>plesignalsonthesamefrequencyinterfereatareceiver

30

SignalsoverWireless(5)•  Variousothereffectstoo!

– Wirelesspropaga>oniscomplex,dependsonenvironment

•  Somekeyeffectsarehighlyfrequencydependent,–  E.g.,mul>pathatmicrowavefrequencies

WirelessMul>path•  Signalsbounceoffobjectsandtakemul>plepaths

–  Somefrequenciesa[enuatedatreceiver,varieswithloca>on– Messesupsignal;handledwithsophis>catedmethods(§2.5.3)

31

32

Wireless•  Senderradiatessignaloveraregion

–  Inmanydirec>ons,unlikeawire,topoten>allymanyreceivers

–  Nearbysignals(samefreq.)interfereatareceiver;needtocoordinateuse

33

WiFi

WiFi

Wireless(2)•  Microwave,e.g.,3G,andunlicensed(ISM)frequencies,e.g.,WiFi,arewidelyusedforcomputernetworking

34

802.11b/g/n

802.11a/g/n

35

Topic•  We’vetalkedaboutsignalsrepresen>ngbits.How,exactly?–  Thisisthetopicofmodula>on

…1011010110…

Signal

ASimpleModula>on•  Letahighvoltage(+V)representa1,andlowvoltage(-V)representa0– ThisiscalledNRZ(Non-ReturntoZero)

36

Bits

NRZ

0 0 1 0 1 1 1 1 0 1 0 0 0 0 1 0

+V

-V

ASimpleModula>on(2)•  Letahighvoltage(+V)representa1,andlowvoltage(-V)representa0– ThisiscalledNRZ(Non-ReturntoZero)

37

Bits

NRZ

0 0 1 0 1 1 1 1 0 1 0 0 0 0 1 0

+V

-V

Modula>on

38

NRZsignalofbits

Amplitudeshipkeying

Frequencyshipkeying

Phaseshipkeying

39

Topic•  Howrapidlycanwesendinforma>onoveralink?–  Nyquistlimit(~1924)»–  Shannoncapacity(1948)»

•  Prac>calsystemsaredevisedtoapproachtheselimits

40

KeyChannelProper>es•  Thebandwidth(B),signalstrength(S),andnoisestrength(N)–  Blimitstherateoftransi>ons–  SandNlimithowmanysignallevelswecandis>nguish

BandwidthB SignalS,NoiseN

41

NyquistLimit•  Themaximumsymbolrateis2B

•  ThusifthereareVsignallevels,ignoringnoise,themaximumbitrateis: R=2Blog2Vbits/sec

1010101010101010101

42

ClaudeShannon(1916-2001)•  Fatherofinforma>ontheory

–  “AMathema>calTheoryofCommunica>on”,1948

•  Fundamentalcontribu>onstodigitalcomputers,security,andcommunica>ons

Credit:CourtesyMITMuseum

Electromechanicalmousethat“solves”mazes!

ShannonCapacity•  Howmanylevelswecandis>nguishdependsonS/N

–  OrSNR,theSignal-to-NoiseRa>o–  Notenoiseisrandom,hencesomeerrors

•  SNRgivenonalog-scaleindeciBels:–  SNRdB=10log10(S/N)

43

0

1

2

3

N

S+N

44

ShannonCapacity(2)•  Shannonlimitisforcapacity(C),themaximuminforma>oncarryingrateofthechannel:

C=Blog2(1+S/(BN))bits/sec

Wired/WirelessPerspec>ve•  Wires,andFiber

– EngineerlinktohaverequisiteSNRandB→ Canfixdatarate

•  Wireless– GivenB,butSNRvariesgreatly,e.g.,upto60dB!→ Can’tdesignforworstcase,mustadaptdatarate

45

Wired/WirelessPerspec>ve(2)•  Wires,andFiber

– EngineerlinktohaverequisiteSNRandB→ Canfixdatarate

•  Wireless– GivenB,butSNRvariesgreatly,e.g.,upto60dB!→ Can’tdesignforworstcase,mustadaptdatarate

46

EngineerSNRfordatarate

AdaptdataratetoSNR

Puzngitalltogether–DSL•  DSL(DigitalSubscriberLine)iswidelyusedforbroadband;manyvariantsoffer10sofMbps–  Reusestwistedpairtelephonelinetothehome;ithasupto~2MHzofbandwidthbutusesonlythelowest~4kHz

47

DSL(2)•  DSLusespassbandmodula>on(calledOFDM)

–  Separatebandsforupstreamanddownstream(larger)– Modula>onvariesbothamplitudeandphase(calledQAM)–  HighSNR,upto15bits/symbol,lowSNRonly1bit/symbol

48

Upstream Downstream

26–138kHz

0-4kHz 143kHzto1.1MHz

Telephone

Freq.

Voice Upto1Mbps Upto12Mbps

ADSL2:

top related