计网-第三章作业
更新时间:2024-01-09 04:33:01 阅读量: 教育文库 文档下载
Chapter 3
注:括弧中标题号为第四版教材中对应的习题号
1. (R14)Suppose HostA sends two TCP segments back to back to Host B over a TCPconnection.
The first segment has sequence number 90; the second hassequence number 110. a. How much data is in the first segment?
b.Suppose that the first segment is lost but the second segment arrives at B.In the acknowledgment that Host B sends to Host A, what will be theacknowledgment number? 答:
a.[90,109]=20bytes
b.ack number=90,对第一个报文段确认
2. (R15)True or false?
a. The size of the TCP RcvWindow never changes throughout the durationof the connection. b. suppose Host A is sending Host B a large file over a TCP connection. Thenumber of unacknowledged bytes that A sends cannot exceed the size ofthe receive buffer.
c. HostA is sending Host B a large file over a TCP connection. Assume HostB has no data to send Host A. Host B will not send acknowledgments toHost A because Host B cannot piggyback the acknowledgment on data.
d. The TCP segment has a field in its header for RcvWindow.
e. Suppose Host A is sending a large file to Host B over a TCP connection. Ifthe sequence number for a segment of this connection is m, then thesequence number for the subsequent segment will necessarily be m + 1.
f. Suppose that the last SampleRTT in a TCP connection is equal to 1 sec.The current value of TimeoutInterval for the connection will necessarilybe>=1 sec.
g.Suppose Host A sends one segment with sequence number 38 and 4 bytesof data over a TCP connection to Host B. In this same segment theacknowledgment number is necessarily 42. 答: a.F b.T
c.F:即使没有数据传送,也会进行单独确认 d.T
e.F:按字节编号,不按报文段编号 f.F
g.F:B->A的确认号不一定为38+4=42
3. (R17)True or false? Consider congestion control in TCP. When the timer expires atthe sender,
the threshold is set to one half of its previous value. 答:
F:应为当前拥塞窗口的一半,而不是阈值的一半。
4. (P3)UDP and TCP use 1s complement for their checksums. Suppose you have the following
three 8-bit bytes: 01101010, 01001111, 01110011. What is the 1s complement of the sum of these 8-bit byte? (Note that although UDP and TCP use 16-bit words in computing the
checksum, for this problem you are being asked to consider 8-bit sums. ) Show all work.. Why is it that UDP takes complement of the sum; that is, why not just use the sum? With the 1s complement scheme, how does the receiver detect errors? Is it possible that a 1-bit error will go undetected? How about a 2-bit error? 答:
01101010+01001111=11000101, 11000101+01110011=00010001
取反为11101110。为了发现错误,接收端增加4个字组(3个原始的,1个取反后的),如果总数包含0,即有错误。所有的一位错误会发现,但两位错误有可能不会被发现。
5. (P7)Draw the FSM for the receiver side of protocol rdt3.0.
答:
6. (P13)Consider a reliable data transfer protocol that uses only negative acknowledgements.
Suppose the sender sends data only infrequently. Would a NAK-only protocol be preferable to a protocol to that uses ACKs? Why? Now suppose the sender has a lot of data to send and the end-to-end connection experiences few losses. In this second case, would a NAK-only protocol be preferable to a protocol that uses ACKs? Why? 答:
在仅使用NAK的协议中,只有当接收到分组x+1时才能检测到分组x的丢失。如果传输x和传输x+1之间有很长的延时,那么在此协议中修复分组x需要很长的时间;如果要发送大量的数据,在仅有NAK的协议中修复速度很快;如果错误很少,那么NAK只偶尔发送ACK,则会明显减少反馈时间。
7. (P14)Consider the cross-country example shown in Figure 3.17. How big would the window
size have to be for the channel utilization to be greater than 80 percent?
答:
U=n×L/R/(RTT+L/R)≥80% n≥3001
8. (P19)Answer true or false to the following questions and briefly justify youranswer:
a. With the SR protocol, it is possible for the sender to receive an ACK for apacket that falls outside of its current window
b. With GBN, it is possible for the sender to receive an ACK for a packet thatfalls outside of its current window.
c. The alternating-bit protocol is the same as the SR protocol with a senderand receiver window size of 1.
d. The alternating-bit protocol is the same as the GBN protocol with a senderand receiver window size of 1.
答:
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:见a c. T
d. T:在窗口1时,SR,GBN,the alternating bit protocol 在功能上是一样的,窗口1会自
动排除有可能无序的包。
9. (P23)Consider transferring an enormous file of L bytes from Host A to Host B. Assume an
MSS of 1,460 bytes.
a. What is the maximum value of L such that TCP sequence numbers are not exhausted?
Recall that the TCP sequence number fields has 4 bytes.
b. For the L you obtain in (a), find how long it takes to transmit the file. Assume that a total
of 66 bytes of transport, network, and data-link header are added to each segment before the resulting packet is sent our over a 100 Mbps link. Ignore flow control and congestion control so A can pump out the segments back to back and continuously. 答:
a. TCP序号范围为4bytes,LMAX=232bytes b. 传输速度=155Mbps,每段加66bytes大小的头,共分段:232bytes/1460bytes=2941758
段;头大小和=2941758×66=194156028bytes;总共需传输194156028+232bytes=4489123324bytes=35912986592bits的数据;用10Mbps的速度传输则时间为3591s。
10. (P34)Consider the following plot of TCP window size as a function of time.
Assuming TCP Reno is the protocol experiencing the behavior shown above,answer the following questions. In all cases, you should provide a shortdiscussion justifying your answer. a. Identify the intervals of time when TCP slow start is operating.
b. Identify the intervals of time when TCP congestion avoidance is operating.
c. After the 16th transmission round, is segment loss detected by a tripleduplicate ACK or by a timeout?
d. After the 22nd transmission round, is segment loss detected by a tripleduplicate ACK or by a timeout?
e. What is the initial value of Threshold at the first transmission round? f. What is the value of Threshold at the 18th transmission round? g. What is the value of Threshold at the 24th transmission round? h. During what transmission round is the 70th segment sent?
i. Assuming a packet loss is detected after the 26th round by the receipt of atriple duplicate ACK, what will be the values of the congestion windowsize and of Threshold? 答:
a. 运行TCP慢启动的时间间隔是[1,6]和[23,26]; b. 运行TCP避免拥塞时的时间间隔是[1,6]和[17,22];
c. 在第16个传输周期后,通过3个冗余ACK能够检测到一个报文段丢失。如果有一
个超时,拥塞窗口尺寸将减小为1.
d. 在第22个传输周期后,因为超时能够检测到一个报文段丢失,因此拥塞窗口的尺寸
被设置为1。
e. Threshold的初始值设置为32,因为在这个窗口尺寸是慢启动停止,避免拥塞开始。 f. 当检测到报文段丢失时,threshold被设置为拥塞窗口值的一半。当在第16个周期检
测到丢失时,拥塞窗口的大小是42,因此在第18个传输周期时threshold值为21。 g. 当检测到报文段丢失时,threshold被设置为拥塞窗口值的一半。当在第22个周期检
测到丢失时,拥塞窗口的大小是26,因此在第24个传输周期时threshold值为13。
h. 在第1个传输周期内,报文段1被传送;在第2个传输周期发送报文段2-3;在第3
个传输周期发送报文段4-7,在第4个传输周期发送8-15;在第5个传输周期发送16-31;在第6个传输周期发送32-63;在第7个传输周期发送64-96;因此,报文段70在第7个传送周期内发送。
i. 当丢失出现时拥塞窗口和threshold的值被设置为目前拥塞窗口长度8的一半。因此
新的拥塞窗口和threshold的值为4.
11. (P38)Host A is sending an enormous file to Host B over a TCP connection. Overthis
connection there is never any packet loss and the timers never expire.Denote the transmission rate of the link connecting Host A to the Internet byR bps. Suppose that the process in Host A is capable of sending data into itsTCP socket at a rateS bps, where S = 10*R. Further suppose that the TCPreceive buffer is large enough to hold the entire file, and the send buffer canhold only one percent of the file. What would prevent the process in HostAfrom continuously passing data to its TCP socket at rate S bps? TCP flowcontrol? TCP congestion control? Or something else? Elaborate. 答:
在这个问题中,接收机没有溢出的危险,因为接收机的接收缓冲区可以承载整个文件。同样的,因为在计时器计时完毕前,没有丢失和回复确认,TCP不会限制发送方。但是,在端系统A上的进程不会一直传输数据给套接字,因为发送缓冲区会很快被填满,一旦发送缓冲区满,那么进程就会以平均速率传输数据。
h. 在第1个传输周期内,报文段1被传送;在第2个传输周期发送报文段2-3;在第3
个传输周期发送报文段4-7,在第4个传输周期发送8-15;在第5个传输周期发送16-31;在第6个传输周期发送32-63;在第7个传输周期发送64-96;因此,报文段70在第7个传送周期内发送。
i. 当丢失出现时拥塞窗口和threshold的值被设置为目前拥塞窗口长度8的一半。因此
新的拥塞窗口和threshold的值为4.
11. (P38)Host A is sending an enormous file to Host B over a TCP connection. Overthis
connection there is never any packet loss and the timers never expire.Denote the transmission rate of the link connecting Host A to the Internet byR bps. Suppose that the process in Host A is capable of sending data into itsTCP socket at a rateS bps, where S = 10*R. Further suppose that the TCPreceive buffer is large enough to hold the entire file, and the send buffer canhold only one percent of the file. What would prevent the process in HostAfrom continuously passing data to its TCP socket at rate S bps? TCP flowcontrol? TCP congestion control? Or something else? Elaborate. 答:
在这个问题中,接收机没有溢出的危险,因为接收机的接收缓冲区可以承载整个文件。同样的,因为在计时器计时完毕前,没有丢失和回复确认,TCP不会限制发送方。但是,在端系统A上的进程不会一直传输数据给套接字,因为发送缓冲区会很快被填满,一旦发送缓冲区满,那么进程就会以平均速率传输数据。
正在阅读:
计网-第三章作业01-09
中国民间信仰现状的思考与探究11-13
动车组制动第一章05-23
《长春中医药大学学报》投稿须知08-07
四年级语文期末检测质量分析04-16
齐白石的传奇经历与艺术特色05-29
操作系统复习终极版03-05
儿童营养性贫血的诊断与治疗 - 图文03-18
甘肃电大07春、秋、08春英语专科集中实践环节教学成绩汇总表03-28
奥运会诗歌【优秀9篇】04-02
- exercise2
- 铅锌矿详查地质设计 - 图文
- 厨余垃圾、餐厨垃圾堆肥系统设计方案
- 陈明珠开题报告
- 化工原理精选例题
- 政府形象宣传册营销案例
- 小学一至三年级语文阅读专项练习题
- 2014.民诉 期末考试 复习题
- 巅峰智业 - 做好顶层设计对建设城市的重要意义
- (三起)冀教版三年级英语上册Unit4 Lesson24练习题及答案
- 2017年实心轮胎现状及发展趋势分析(目录)
- 基于GIS的农用地定级技术研究定稿
- 2017-2022年中国医疗保健市场调查与市场前景预测报告(目录) - 图文
- 作业
- OFDM技术仿真(MATLAB代码) - 图文
- Android工程师笔试题及答案
- 生命密码联合密码
- 空间地上权若干法律问题探究
- 江苏学业水平测试《机械基础》模拟试题
- 选课走班实施方案
- 作业
- 第三章
- 高考播音主持自备稿件精选
- 八年级语文测试习题:语文版八年级下第四单元测试题2
- 2012教师招聘面试题
- 甘村逸夫小学教学工作总结
- 数学经典例题集锦:数列(含答案)
- 小学语文沪教版五年级上册第八单元第40课《月光曲》优质课公开课教案教师资格证面试试讲教案
- SAT基础阅读讲义1 - 图文
- 辽阳职业技术学院示范性高职高专院校建设实施方案
- 福师《幼儿园教育》在线作业二答案
- 2016-2022年中国卫星应急通信行业投资分析及前景趋势预测报告(目录) - 图文
- 石家庄煤改电入围名录 - 图文
- 端午节活动方案
- 高考文科数学专题复习导数训练题- 副本
- 2019届浙江省稽阳联谊学校高三10月联考物理科试题卷(word版) - 图文
- 全面衰退量表(GDS)
- 宁波市十二五文化发展规划
- 2014年中央财经大学801经济学考研资料历年真题答案笔记
- 西南交大-工程力学A-第1-4次作业
- 留学360谢老师恭贺卢同学成功考上新加坡华中国际学校中学快捷班 - 图文
- 装饰、装修方案(修)