Homework Chapter 3 - 下载本文

《Computer Networks and Internet》

Homework Chapter 3 1. Suppose that they are connected by a channel with a transmission rate, R, of 1 Gbps (109 bits per second). How big would the window size have to be for the channel utilization to be greater than 95 percent? Suppose that the size of a packet is 1,500 bytes, including both header fields and data.

假设他们的传输速率,R通道连接,1 Gbps(每秒109比特)。窗口大小的大小会有多大,对信道的利用率要大于百分之95?假设数据包的大小为1500个字节,包括头字段和数据。

2. Answer true or false to the following questions and briefly justify your answer:

a. With the SR protocol, it is possible for the sender to receive an ACK for a packet that falls outside of its current window.

b. With GBN, it is possible for the sender to receive an ACK for a packet that falls outside of its current window. c. The alternating-bit protocol is the same as the SR protocol with a sender and receiver window size of 1.

d. The alternating-bit protocol is the same as the GBN protocol with a sender and receiver window size of 1.

1.随着SR协议,有可能对发送者接收一个ACK为落在其当前窗口以外的分组。 2.用GBN,它有可能为发送者接收一个ACK为落在其当前窗口以外的分组。 3.交替位协议是相同的为1的发送器和接收器窗口大小将SR协议。 4.交替位协议是相同的为1的发送器和接收器窗口大小的GBN协议。

1

《Computer Networks and Internet》

3. Consider transferring an enormous file of L bytes from Host A to Host B. Assume an MSS of 536 bytes.

a. What is the maximum value of L such that TCP sequence numbers are not exhausted? Recall that the TCP sequence number field 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 out over a 155 Mbps link. Ignore flow control and congestion control so A can pump out the segments back to back and continuously. 考虑转移的L-字节一个巨大的文件,从主机A向主机B。假设536字节的MSS。 1.使得TCP序列号未用尽的L的最大值?TCP序列号字段具有4个字节。

2.对于在(1)中您获得的L,发现它需要多长时间来传输文件。假定总共66字节传输,网络和数据链路标头被添加到每个段之前产生的数据包被送出超过155Mbps的链路。忽略流量控制和拥塞控制,因此A能不断地泵出段。

4. Host A and B are communicating over a TCP connection, and Host B has already received from A all bytes up through byte 126. Suppose Host A then sends two segments to Host B back-to-back. The first and second segments contain 70 and 50 bytes of data, respectively. In the first segment, the sequence number is 127, the source port number is 302, and the destination port number is 80. Host B sends an acknowledgement whenever it receives a segment from Host A. a. In the second segment sent from Host A to B, what are the sequence number, source port number, and destination port number?

b. If the first segment arrives before the second segment, in the acknowledgement of the first arriving segment, what is the

acknowledgment number, the source port number, and the destination port number?

c. If the second segment arrives before the first segment, in the acknowledgement of the first arriving segment, what is the acknowledgment number?

2

《Computer Networks and Internet》

d. Suppose the two segments sent by A arrive in order at B. The first acknowledgement is lost and the second acknowledgement arrives after the first timeout interval. Draw a timing diagram, showing these segments and all other segments and acknowledgements sent. (Assume there is no additional packet loss.) For each segment in your figure, provide the sequence number and the number of bytes of data; for each

acknowledgement that you add, provide the acknowledgement number. 主机A和B通信的TCP连接,和主机B已经收到了来自A的所有126字节。假设主机A发送两段给主机B。在第一和第二区段包含70和50个字节的数据,分别在第一段中,序列号为127,源端口号是302,以及目的地端口号为80。主机B发送每当它接收到来自主机A的段的确认。

1.在第二段从主机A向B发送的,什么是序列号,源端口号,目的端口号? 2.如果第一区段在第二区段之前到达,在首先到达的段的确认,是什么确认号,源端口号和目的地端口号?

3.如果第二段在第一片段之前到达,在首先到达的段的确认,是什么确认号?4.假设由A发送两段按顺序到达B。第一确认丢失,第一超时间隔之后第二个确认到达。画一个时序图,显示这些段和发送的所有其他段和确认。 (假设没有附加分组丢失)。对于在图中每个段,提供的序列号和数据的字节数;为您添加的每个确认,提供确认号。

3

《Computer Networks and Internet》

5. What is the relationship between the variable SendBase and the variable LastByteRcvd? What is the relationship between the variable LastByteRcvd and the ACK variable y?

变量SendBase和变量LastByteRcvd之间的关系?变量LastByteRcvd和ACK变量y之间的关系?

6. Consider Figure 3-1. Assuming TCP Reno is the protocol experiencing the behavior shown above, answer the following questions. In all cases, you should provide a short discussion 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 triple duplicate ACK or by a timeout?

d. After the 22nd transmission round, is segment loss detected by a triple duplicate ACK or by a timeout?

e. What is the initial value of ssthresh at the first transmission round? f. What is the value of ssthresh at the 18th transmission round? g. What is the value of ssthresh 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 a triple duplicate ACK, what will be the values of the congestion window size and of ssthresh?

j. Suppose TCP Tahoe is used (instead of TCP Reno), and assume that triple duplicate ACKs are received at the 16th round. What are the ssthresh and the congestion window size at the 19th round?

k. Again suppose TCP Tahoe is used, and there is a timeout event at 22nd round. How many packets have been sent out from 17th round till 22nd round, inclusive?

考虑图3-1。假设TCP Reno在协议遇到上述行为,回答下列问题。在任何情况下,你应该提供一个简短的讨论证明你的答案。

4

《Computer Networks and Internet》

1.确定的时间间隔,当TCP慢启动运行。 2.确定的时间间隔时,当TCP拥塞避免运行。

3.在第16轮传动,检测由三重复的ACK或超时分段损失? 4.在第22轮传动,检测由三重复的ACK或超时分段损失? 5.什么是阕值在第一传输周期的初始值? 6.什么是阕值的第18届传输周期的价值? 7.什么是阕值在24日传送轮的价值? 8.在什么传送轮的第70段中发送?

9.假设第26轮被接收到三重重复ACK之后检测到包丢失,这将是阕值的拥塞窗口的大小和的值?

10.假设太浩TCP使用(而不是TCP雷诺),并假设三重复ACK在第16轮被接收。什么是慢启动阈值和拥塞窗口的大小,在第19轮?

11.再次假设TCP浩被使用,并且有在第22轮超时事件。有多少数据包被发送出去,从第17轮至第22轮,包容性?

Fig. 3-1 TCP window size as a function of time

5

《Computer Networks and Internet》

7. Describe why an application developer may choose to run its application over UDP rather than TCP.

说明为什么应用程序开发人员可以选择其运行在UDP上而不是TCP的应用程序。

An application developer may not want its application to use TCP’s congestion control, which can throttle the application’s sending rate at times of congestion. Often, designers of IP telephony and IP videoconference applications choose to run their applications over UDP because they want to avoid TCP’s congestion control. Also, some applications do not need the reliable data transfer provided by TCP.

应用程序开发人员可能不希望它的应用使用TCP的拥塞控制,它可以在拥塞时间节流应用程序的发送速率。通常情况下,IP电话和IP视频会议应用的设计选择,因为他们想避免TCP拥塞控制在UDP上运行他们的应用程序。此外,某些应用程序并不需要通过TCP提供的可靠的数据传输。

6