计网-第五章作业

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

Chapter5作业题,请同学们注意题目描述。1.(R1)Whataresomeofthepossibleservicesthatalink-layerprotocolcanoffertothenetworklayer?Whichoftheselink-layerserviceshavecorrespondingservicesinIP?InTCP?答:可能提供的服务:链路接入,成帧,可靠传输,流量控制,差错检测,差错纠正,半双工和全双工;InIP:成帧,差错检测;InTCP:成帧,可靠传输,差错检测,半双工和全双工。2.(R2)IfallthelinksintheInternetweretoprovidereliabledeliveryservice,wouldtheTCPreliabledeliveryserviceberedundant?Whyorwhynot?答:不会多余,因为TCP保证的是传输层的数据传送,而link提供稳定可靠传输保证链路层的传输稳定,二者不完全重叠,所以TCP可靠传输也不会多余。例如,链路层协议不能保证端到端的顺序,就需要TCP协议进行排序;路由器缓存溢出丢包,链路层协议无法解决这个问题,但是TCP可以。3.(R8)HowbigistheMACaddressspace?TheIPv4addressspace?TheIPv6addressspace?答:248个MACaddresses;232个IPv4addresses;2128个IPv6addresses4.(R9)WhyisanARPquerysentwithinabroadcastframe?WhyisanARPresponsesentwithinaframewithaspecificdestinationMACaddress?答:因为新加入网络的主机是不知道路由器的IP的,自己也没有IP,所以只能广播才能得到IP,特定的主机就会特定响应。因为每个主机的MAC地址都是唯一的,而ARP建立转发表的时候会带上MAC地址。5.(P5)Considerthe4-bitgenerator,G,showninFigure5.8,andsupposethatDhasthevalue11111010.WhatisthevalueofR?G=1001答:𝐷×2𝑅𝐺的余数,∴R=1106.(P11)ConsiderabroadcastchannelwithNnodesandatransmissionrateofRbps.Supposethebroadcastchannelusespolling(withanadditionalpollingnode)formultipleaccess.Supposetheamountoftimefromwhenanodecompletestransmissionuntilthesubsequentnodeispermittedtotransmit(thatis,thepollingdelay)isdpoll.Supposethatwithinapollinground,agivennodeisallowedtotransmitatmostQbits.Whatisthemaximumthroughputofthebroadcastchannel?答:情况1:𝑄𝑅𝑄𝑅+𝑁∙𝑑𝑝𝑜𝑙𝑙情况2:𝑁∙𝑄𝑅𝑁∙(𝑄𝑅+𝑑𝑝𝑜𝑙𝑙)两种极端情况进行比较,明显情况2为最大值;情况1为最小值。7.(P12)ConsiderthreeLANsinterconnectedbytworouters,asshowninFigure5.38.a.Redrawthediagramtoincludeadapters.Figure5.38Threesubnets,interconnectedbyroutersb.AssignIPaddressestoalloftheinterfaces.ForSubnetIuseaddressesoftheform111.111.111.xxx;forSubnet2usesaddressesoftheform122.222.222.xxx;andforSubnet3useaddressesoftheform133.333.333.xxx.(注:本题目略有修改,见红色标注)c.AssignMACaddressestoalloftheadapters.d.ConsidersendinganIPdatagramfromHostAtoHostF.SupposealloftheARPtablesareuptodate.Enumerateallthesteps,asdoneforthesingle-routerexampleinSection5.4.2.e.Repeat(d),nowassumingthattheARPtableinthesendinghostisempty(andtheothertablesareuptodate).答:a.b.c.d.1.由A的转发表决定了数据报应该被转发到路由器端口111.111.111.002.2.由A的适配器生成一个携带以太网目的地址22-22-22-22-22-22的以太网分组.3.第一个路由器即收到该分组并且解析了数据报。该路由器中的转发表提示该数据报应该被转发到122.222.222.003.4.第一个路由器发送带有目的地址为55-55-55-55-55-55并且源地址为33-33-33-33-33-33的以太网分组,经过IP地址为122.222.222.002的端口。5.过程以此类推,直到分组到达主机F.e.主机A的ARP模块一定知道本网段网关的IP地址为111.111.111.002。主机A发送一个ARP请求(包含在一个以太网广播帧中)。第一个路由器接收到这个请求分组并且发送给主机A一个ARP响应分组。这个ARP响应分组装载于一个包含以太网目的地址00-00-00-00-00-00的以太网帧上。得知了路由器端口的MAC地址后,以他作为目的地址成帧,以后的步骤与上一问相同。8.(P15)SupposenodesAandBareonthesame10MbpsEthernetbus,andthepropagationdelaybetweenthetwonodesis225bittimes.SupposeAandBsendframesatthesametime,theframescollide,andthenAandBchoosedifferentvaluesofKintheCSMA/CDalgorithm.Assumingnoothernodesareactive,cantheretransmissionsfromAandBcollide?Forourpurposes,itsufficestoworkoutthefollowingexample.SupposeAandBbegintransmissionatt=0bittimes.Theybothdetectcollisionsatt=225bittimes.Theyfinishtransmittingajamsignalatt=225+48=273bittimes.Suppose0AKand1BK,AtwhattimedoesBscheduleitsretransmission?AtwhattimedoesAbegintransmission?(Note:ThenodesmustwaitforanidlechannelafterreturningtoStep2-seeprotocol.)AtwhattimedoesA'ssignalreachB?DoesBrefrainfromtransmittingatitsscheduledtime?答:9.(P16)SupposenodesAandBareonthesame10MbpsEthernetbus,andthepropagationdelaybetweenthetwonodesis225bittimes.SupposenodeAbeginstransmittingaframeand,beforeitfinishes,nodeBbeginstransmittingaframe.CanAfinishtransmittingbeforeitdetectsthatBhastransmitted?Whyorwhynot?Iftheanswerisyes,thenAincorrectlybelievesthatitsframewassuccessfullytransmittedwithoutacollision.Hint:Supposeattimet=0bittimes,Abeginstransmittingaframe.Intheworstcase,Atransmitsaminimum-sizedframeof512+64bittimes.SoAwouldfinishtransmittingtheframeatt=512+64bittimes.Thus,theanswerisno,ifB'ssignalreachesAbeforebittimet=512+64bits.Intheworstcase,whendoesB'ssignalreachA?答:假设在t=0时刻A开始传输。考虑到以太网的最短帧长为576bit,最早在t=576时刻,A可以完成传输。在最坏的情况下,B在t=224时刻开始传输,此时它还不知道A正在传输。在t=224+225=449时刻,B的第一个比特到达A,因为449576,A将在完成分组传输之前中断。因此A不能在他察觉到B的传输之前完成传输。10.(P19)Supposetwonodes,AandB,areattachedtooppositeendsofa900mcable,andthattheyeachhaveoneframeof1,000bits(includingallheadersandpreambles)tosendtoeachother.Bothnodesattempttotransmitattimet=0.SupposetherearefourrepeatersbetweenAandB,eachinsertinga20-bitdelay.Assumethetransmissionrateis10Mbps,andCSMA/CDwithbackoffintervalsofmultiplesof512bitsisused.Afterthefirstcollision,AdrawsK=0andBdrawsK=1intheexponentialbackoffprotocol.Ignorethejamsignalandthe96-bittimedelay.a.Whatistheone-waypropagationdelay(includingrepeaterdelays)betweenAandBinseconds?Assumethatthesignalpropagationspeedis8102m/sec.b.Atwhattime(inseconds)isA’spacketcompletelydeliveredatB?c.NowsupposethatonlyAhasapackettosendandthattherepeatersarereplacedwithswitches.Supposethateachswitchhasa20-bitprocessingdelayinadditiontoastore-and-forwarddelay.Atwhattime,inseconds,isA’spacketdeliveredatB?答:a.9002×108+4×2010𝑀=12.5微秒b.12.5+12.5+12.5

1 / 4
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功