Transcription of hw2-sol
1 15-441:ComputerNetworksHomework2 SolutionAssigned:September25, :October7, ,congestioncontrol, thehomeworkindividually. Make sure ,show yourworkinclearlyreadablewriting. MaximumSegmentSizebytes/packet Window Sizepackets Window Sizebytes Roundtriptimeseconds or Throughputbits/sec Utilizationdimensionlesspercentage Lossratedimensionlessproportion/probabil ityTable1 (a)HostA is sendinga largefileto hostB over a hasnodatato sendto willnotsendacknowledgmentstohostA becausehostB anoptimizationthatis usedwhenbothsideshavetosenddatatoeachoth ersothatthereceiver, , anACKanda datapacket,it (B)doesnothaveanydatatosend,it willstillsendanACKwiththesequencenumberf ieldcontainingthenext sequenceofdatait is supposedtosend.(b) usedto givethesenderanideaof howmuch freebufferspaceis availableatthereceiver.
2 ThusastheamountofunacknowledgedTCPdatava riestheRcvWindowalsochanges.(c)Supposeho stA is sendinga largefiletohostB overa notpermittedtooverflowtheallocatedreceiv erbuffer. Hencewhenthesendercannotsendanymore dataRcvWindowwouldbe0 andhenceallthebufferwouldhaveunacknowled geddata.(d)SupposethatthelastSampleRTTin a TCPconnectionis orEstimatedRTTit sendinga largefiletohostB overa endhostsare10msecapart(20msecRTT)connect edbya areusinga packet (a)Atleasthowbigwouldthewindowsize(inpac kets)have tobeforthechannelutilizationtobegreatert han80%.Answer:Bandwidth-delayproductofA toB ! .For80%utilization,it willbe " # %$&' ( "$) * + , ! .Numberofpackets .-+/0213-546718-94:4;4 < =8> ? @ A ! .(b)Assuminginfiniteinitialthreshold,nol ossesandcompetingtraffic,approximatelyho w long(inseconds)wouldit take forthenormalslow startmechanismtoachieve 80%utilization?
3 Answer:NumberofRTTs CBEDGF H"IKJG MLONP Q R .Time S K * % T 3$ KUM AV?. hasreceivedthreeduplicateACKsbeforeperfo rminga fastretransmitafterthefirstduplicateACKf ora segmentis received?Answer:Packetscanarriveoutoford erfromtheIPlayer. Sowheneveranoutoforderpacketwouldberecei vedit wouldgeneratea duplicateACKandif weperformretransmissionafterthefirst misbehavingTCPreceiver. Thereceiver modifiesitsTCPsuchthatuponreceivinga datasegmentcontain-ingWbytes,thereceiver dividestheresultingacknowledgmentinto , where YXW, separateacknowledgmentseachcoveringoneof it receivesdataacknowledgingbytes1 to1000,thenthereceiver, for < , willsend2 normalTCPsendersendingdatatothismisbehav ingTCPreceiver. Thesendersendsa 1500bytepacket < ACKs?Answer:Responsewillbepacketswithbyt esequencenumbers 1501,3001, transmissiontime,derive anexpressionforthesenderwindow sizeduringtheslow startphase,intermsof[(numberofRTTs)and.]
4 Answer:Foreach outgoingpacket,thereceiversendsback \][_^by . Soif initiallythewindowwas1,after1 RTTthewindowsizewillbe N< . InthesecondRTT, thesendersends NR packets(thewindowsize)andreceives `J N `J N Landbecome `J NR LaN N CJ N LI. After[RTTs,thewindowsizewillbeJ NP simpleenhancementtothesenderwhichcanprev entthereceiver fromlaunchingthisattack?Answer:Onesoluti onis thatthesendershouldadvancethecongestionw indowat bytegranularityratherthanpacket granularity. Hence? \][_^willbeincrementednotbya toincrement? \ [_^byoneMSSwhena validACKarrivescoveringtheentire :Burstytrafficsuffers more burst wouldresultinseverallossesasmostofthebur st ,it dropspacketsearlysoasnottoallowthequeuet ogrowfully. Sowhena burstarrives,it :RemembertouseTable1 ,achievedTCPthroughputshouldbe75% thatwhenthethroughputreaches100%ofthebot tleneck,thereis a packetdropcausingthewindow tobehalvedto50%andthenit increaseslinearlybackto100% herightorwrong?]]
5 :Heis wrong. Theachievedthroughputshouldbecloseto100% becauseofrouterbuffers. AstheTCPconnectionstartssendingatrateshi gherthanthebottleneck bandwidththebuffers starttofillupuntilthere isa TCPwillbesendingatmuch higherratethan75%ofthebottleneck \representthecongestionwindow sizevariesfrom Ito duringsteadystateandthena sizefora connectionis setto . Assuminga lossoccurswhenthecongestionwindow hasa sizeof ,(a)Findthelossrate forthisTCPconnectionin termsof .Hint: Calculatethenumberofpacketssentperlosscy cleAnswer:Solution1 (correct): 7to ApproximateNumberofPacketssent= Areaunderthegraph= rectangularregion+ trapeziumregion= 7 7N-IJ 7N L 7 --I7 ILossrate - -I7 - Solution2 (acceptedwithfullpoints): Ito ApproximateNumberofPacketssent= Areaunderthegraph= rectangularregion+ trapeziumregion= I IN-IJ IN L -;- I ILossrate - I-;- W/2W3W/4 Time RTTW/2 RTT3W/4 Time RTT5W/8 RTTF igure1 : TCPW indow withflow control(b)Derive anexpressionfortheachievedthroughput intermsof and.
6 Answer:Solution1 (correct): 7to Frompreviousanswer, -I7 - .3 1 17 1 - 1 -5421 Replacing with -I7 - andsimplifyingweget -54I1 1 bpsSolution2 (acceptedwithfullpoints): Ito Frompreviousanswer, I-:- . 1 17 1 -:- 1 I1 Replacing with I-:- andsimplifyingweget I I:I1 1 bps5 CongestionControlHarryBovikthinksthatif thesourcesin theInternetuseadditive increaseadditive decrease(AIAD) IRegion IIRegion IIIR egion IVConnection 2 throughputConnection 1 throughputFigure2:TCPP hase-plotHarrydecidestousephase-plots( ) ,thestateofthesystemis representedbya point(x1,x2),wherex1is stream1 s currentrateandx2is stream2 s C sizeshave beenreducedaccordingtoAIAD andnow thesystemstateis ,foreachofthelabelledregions,I, II,III,andIV, draw vectorsindicatingthedirectioninwhichthes ystemwillmove ,aftertheAIAD responsetothepacket :SeeFigure ,doestheresponseafterthepacketlossincrea se,reduceorkeepfairnessthesame?
7 RegionI:Answer:Increases RegionII:Answer:Decreases4 CCRegion IRegion IIRegion IIIR egion IVConnection 2 throughputConnection 1 throughputFigure3 : TCPP hase-plot RegionIII:Answer:Decreases RegionIV:Answer:Increases Onthe45degreelinethroughtheorigin: s schemeconvergetoa fairallocation? :Noit equallyona packetloss(additivedecrease)ratherthanin proportiontotheirshare ofC (multiplicativedecrease).Similarlybothth econnectionswillattempttograbbandwidtheq uallywhenit is available. s schemeconvergetoanefficientallocation? :Yesit adaptivelyincreasetheirshare whenthey are belowtheefficiencyline(RegionsI andIV)tomovetowardstheefficiencyline. Similarlythey decreasetheirshare onlossesandhencemovetowardstheefficiency linewhenthey are abovetheefficiencyline(RegionsII andIII). themistake thatHarryis making?
8 Answer:Thebufferplayouttimeshouldbebased onthedelayjitterratherthanend-to-enddela y(RTT)toensure smoothplaying. Inthiscasewhatis happeningis thatforshorterRTTsthejitteris more thantheRTTandthesedelayedpacketsresultin missedframeswhileforlarge RTTvalues,thejitteris smallerthantheRTTandsofewerpacketsare notusedforstreamingmultimedia(audio,vide o)files?Answer:Providingtimelydeliveryis more crucialinmultimediaapplicationsthanprovi dingreliability. ,multimediaapplicationsusuallyhavetheiro wnapplicationlevelmechanismstohandlecong estionbecauseit oftenrequiresunderstandingoftheapplicati ondata( B,I andP framesinmpeg)andTCPis nota suitablelayerforprovidingsuch ,thestreamingmultimediaapplicationsdonot needtohave a :Theplayback bufferis requiredto arriveaftertheirplayouttimeandhenceare bufferis neededevenif there are , TCPR enosender.
9 Thex-axisshowsthetimeinsecondsandthey-ax isshowsthesequencenumberofthepacket (orACK)beingsent(orreceived).Assumethata llpacketsthatarenotlostwillarrive inorderatboththesenderandreceiver. view of packets and ACKs in TCP :Reno: ,thetimeinterval whentheconnectionis :Slowstartis approximatelyfromtime0 , , (thoughit is fineif youmissedthislastone). (ifany)with :Packet Numbers:25,26,27,29,32,36,41,46,47,48, (ifany)witha .Answer:PacketNumbers:28(2nd),30(2nd),31 (2nd),33(2nd),34(2nd),35(2nd),36(3rd),37 (2nd),38(2nd),39(2nd),40(2nd),41(3rd),42 (2nd),43(2nd),44(2nd),45(2nd),46(3rd),50 (2nd) (ifany)witha :Packet onthegraphanapproximatecurve showinghow a :TahoewillbehavethesameasRenoforthefirst timeout.