欢迎来到天天文库
浏览记录
ID:55955423
大小:3.78 MB
页数:14页
时间:2020-06-18
《川大林锋计网第三次作业.doc》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、ReviewQuestions:3.ConsideraTCPconnectionbetweenHostAandHostB.SupposethattheTCPsegmentstravelingfromHostAtoHostBhavesourceportnumberxanddestinationportnumbery.WhatarethesourceanddestinationportnumbersforthesegmentstravelingfromHostBtoHostA?Thesourceportnumberisy,thed
2、estinationportnumberisx.5.WhyisitthatvoiceandvideotrafficisoftensentoverTCPratherthanUDPintoday’sInternet.(Hint:TheanswerwearelookingforhasnothingtodowithTCP’scongestion-controlmechanism.)因为UDP虽然传输速度快,不需要建立对等连接,但是容易丢包,而且数据包顺序容易混乱;TCP传输更稳定,文件没有丢失或者损失。6.Isitpossiblefo
3、ranapplicationtoenjoyreliabledatatransferevenwhentheapplicationrunsoverUDP?Ifso,how?是的,只需要在UDP的协议上添加验证的数据,比如给每个包传输时加个头,并且设置返回值,还有很多其他方法在此不一一列举了。7.SupposeaprocessinHostChasaUDPsocketwithportnumber6789.SupposebothHostAandHostBeachsendsaUDPsegmenttoHostCwithdestination
4、portnumber6789.WillbothofthesesegmentsbedirectedtothesamesocketatHostC?Ifso,howwilltheprocessatHostCknowthatthesetwosegmentsoriginatedfromtwodifferenthosts?正解,两个部分将针对同一接口。在套接字接口,对于每个收到的片段,操作系统将提供过程与IP地址确定各段的起源。8.SupposethataWebserverrunsinHostConport80.SupposethisWe
5、bserverusespersistentconnections,andiscurrentlyreceivingrequestsfromtwodifferentHosts,AandB.ArealloftherequestsbeingsentthroughthesamesocketatHostC?Iftheyarebeingpassedthroughdifferentsockets,dobothofthesocketshaveport80?Discussandexplain.对于每个坚持的连接,web服务器会创建一个连接套接字,
6、每个连接套接字由4个数组定义。当主机C收到一个请求的时候,它会检查数据报和段中的4个区域,以此决定用哪个区域来接收TCP段。因此,A和B传输的套接字是不一样的。每一个套接字的标识符都使用80端口作为目的的,但是不同的资源有不同的IP地址。和UDP不同,当传输层传输一个TCP段至应用层的时候,它并不需要明确指定IP地址,因为套接字标识符会帮它指定。14.Trueorfalse?(F)a.HostAissendingHostBalargefileoveraTCPconnection.AssumeHostBhasnodatatose
7、ndHostA.HostBwillnotsendacknowledgmentstoHostAbecauseHostBcannotpiggybacktheacknowledgmentsondata.(F)b.ThesizeoftheTCPrwndneverchangesthroughouttheduration(持续时间)oftheconnection.(T)c.SupposeHostAissendingHostBalargefileoveraTCPconnection.Thenumberofunacknowledgedbyte
8、sthatAsendscannotexceedthesizeofthereceivebuffer.(F)d.SupposeHostAissendingalargefiletoHostBoveraTCPconnection.Ifthesequencenumberforasegm
此文档下载收益归作者所有