您好,欢迎访问三七文档
Chapter3注:括弧中标题号为第四版教材中对应的习题号1.(R14)SupposeHostAsendstwoTCPsegmentsbacktobacktoHostBoveraTCPconnection.Thefirstsegmenthassequencenumber90;thesecondhassequencenumber110.a.Howmuchdataisinthefirstsegment?b.SupposethatthefirstsegmentislostbutthesecondsegmentarrivesatB.IntheacknowledgmentthatHostBsendstoHostA,whatwillbetheacknowledgmentnumber?答:a.[90,109]=20bytesb.acknumber=90,对第一个报文段确认2.(R15)Trueorfalse?a.ThesizeoftheTCPRcvWindowneverchangesthroughoutthedurationoftheconnection.b.supposeHostAissendingHostBalargefileoveraTCPconnection.ThenumberofunacknowledgedbytesthatAsendscannotexceedthesizeofthereceivebuffer.c.HostAissendingHostBalargefileoveraTCPconnection.AssumeHostBhasnodatatosendHostA.HostBwillnotsendacknowledgmentstoHostAbecauseHostBcannotpiggybacktheacknowledgmentondata.d.TheTCPsegmenthasafieldinitsheaderforRcvWindow.e.SupposeHostAissendingalargefiletoHostBoveraTCPconnection.Ifthesequencenumberforasegmentofthisconnectionism,thenthesequencenumberforthesubsequentsegmentwillnecessarilybem+1.f.SupposethatthelastSampleRTTinaTCPconnectionisequalto1sec.ThecurrentvalueofTimeoutIntervalfortheconnectionwillnecessarilybe=1sec.g.SupposeHostAsendsonesegmentwithsequencenumber38and4bytesofdataoveraTCPconnectiontoHostB.Inthissamesegmenttheacknowledgmentnumberisnecessarily42.答:a.Fb.Tc.F:即使没有数据传送,也会进行单独确认d.Te.F:按字节编号,不按报文段编号f.Fg.F:B-A的确认号不一定为38+4=423.(R17)Trueorfalse?ConsidercongestioncontrolinTCP.Whenthetimerexpiresatthesender,thethresholdissettoonehalfofitspreviousvalue.答:F:应为当前拥塞窗口的一半,而不是阈值的一半。4.(P3)UDPandTCPuse1scomplementfortheirchecksums.Supposeyouhavethefollowingthree8-bitbytes:01101010,01001111,01110011.Whatisthe1scomplementofthesumofthese8-bitbyte?(NotethatalthoughUDPandTCPuse16-bitwordsincomputingthechecksum,forthisproblemyouarebeingaskedtoconsider8-bitsums.)Showallwork..WhyisitthatUDPtakescomplementofthesum;thatis,whynotjustusethesum?Withthe1scomplementscheme,howdoesthereceiverdetecterrors?Isitpossiblethata1-biterrorwillgoundetected?Howabouta2-biterror?答:01101010+01001111=11000101,11000101+01110011=00010001取反为11101110。为了发现错误,接收端增加4个字组(3个原始的,1个取反后的),如果总数包含0,即有错误。所有的一位错误会发现,但两位错误有可能不会被发现。5.(P7)DrawtheFSMforthereceiversideofprotocolrdt3.0.答:6.(P13)Considerareliabledatatransferprotocolthatusesonlynegativeacknowledgements.Supposethesendersendsdataonlyinfrequently.WouldaNAK-onlyprotocolbepreferabletoaprotocoltothatusesACKs?Why?Nowsupposethesenderhasalotofdatatosendandtheend-to-endconnectionexperiencesfewlosses.Inthissecondcase,wouldaNAK-onlyprotocolbepreferabletoaprotocolthatusesACKs?Why?答:在仅使用NAK的协议中,只有当接收到分组x+1时才能检测到分组x的丢失。如果传输x和传输x+1之间有很长的延时,那么在此协议中修复分组x需要很长的时间;如果要发送大量的数据,在仅有NAK的协议中修复速度很快;如果错误很少,那么NAK只偶尔发送ACK,则会明显减少反馈时间。7.(P14)Considerthecross-countryexampleshowninFigure3.17.Howbigwouldthewindowsizehavetobeforthechannelutilizationtobegreaterthan80percent?答:U=n×L/R/(RTT+L/R)≥80%n≥30018.(P19)Answertrueorfalsetothefollowingquestionsandbrieflyjustifyyouranswer:a.WiththeSRprotocol,itispossibleforthesendertoreceiveanACKforapacketthatfallsoutsideofitscurrentwindowb.WithGBN,itispossibleforthesendertoreceiveanACKforapacketthatfallsoutsideofitscurrentwindow.c.Thealternating-bitprotocolisthesameastheSRprotocolwithasenderandreceiverwindowsizeof1.d.Thealternating-bitprotocolisthesameastheGBNprotocolwithasenderandreceiverwindowsizeof1.答:a.T:在t0时刻发送方窗口3发送包1,2,3;在t1时刻接收方接收ACKs1,2,3;在t2时刻发送方延时并重新发送1,2,3;在t3时刻接收方接收包并重新发送确认1,2,3;在t4时刻发送方接收接收方在t1时刻发送的ACKs并进入窗口4,5,6;在t5时刻发送方接收接收方在t2时刻发送的ACKs1,2,3。这些ACKs在窗口之外。b.T:见ac.Td.T:在窗口1时,SR,GBN,thealternatingbitprotocol在功能上是一样的,窗口1会自动排除有可能无序的包。9.(P23)ConsidertransferringanenormousfileofLbytesfromHostAtoHostB.AssumeanMSSof1,460bytes.a.WhatisthemaximumvalueofLsuchthatTCPsequencenumbersarenotexhausted?RecallthattheTCPsequencenumberfieldshas4bytes.b.FortheLyouobtainin(a),findhowlongittakestotransmitthefile.Assumethatatotalof66bytesoftransport,network,anddata-linkheaderareaddedtoeachsegmentbeforetheresultingpacketissentourovera100Mbpslink.IgnoreflowcontrolandcongestioncontrolsoAcanpumpoutthesegmentsbacktobackandcontinuously.答:a.TCP序号范围为4bytes,LMAX=232bytesb.传输速度=155Mbps,每段加66bytes大小的头,共分段:232bytes/1460bytes=2941758段;头大小和=2941758×66=194156028bytes;总共需传输194156028+232bytes=4489123324bytes=35912986592bits的数据;用10Mbps的速度传输则时间为3591s。10.(P34)ConsiderthefollowingplotofTCPwindowsizeasafunctionoftime.AssumingTCPRenoistheprotocolexperiencingthebehaviorshownabove,answerthefollowingquestions.Inallcases,youshouldprovideashortdiscussionjustifyingyouranswer.a.IdentifytheintervalsoftimewhenTCPslowstartisoperating.b.IdentifytheintervalsoftimewhenTCPcongestionavoidanceisoperating.c.Afterthe16thtransmissionround,issegmentlossdetectedbyatripleduplicateACKorbyatimeout?d.Afterthe22ndtransmissionround,issegmentlossdetectedbyatripleduplicateACKorbyatimeout?e.WhatistheinitialvalueofThresholdatthefirsttransmissionround?f.WhatisthevalueofThresholdatthe18thtransmissionround?g.WhatisthevalueofThresholdatthe24thtransmissionround?h.Duringwhattransmissionroundisthe70thsegmentsent?i.Assumingapacketlossisdetectedafterthe26throundbyth
本文标题:计网-第三章作业
链接地址:https://www.777doc.com/doc-7138696 .html