习题课 联系客服

发布时间 : 星期二 文章习题课更新完毕开始阅读a23de7ed4afe04a1b071de77

议不能正常工作。

解答:发送端:0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0

接收端: 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0

当发送方发送0~7数据帧,因发送窗口已满,发送暂停,接收方收到所有数据帧,并对每一个帧都发送确认帧,若所有的确认帧都没有到达发送方,经过发送方计时器控制的超时后,发送方会再次发送之前的8个数据帧,而接收方收到这8个帧却无法判断是新的数据帧或是重传的数据帧。

20. 在选择重传ARQ协议中,设编号用3位。再设发送窗口WT=6,而接收窗口WR=3。试找出

一种情况,使得在此情况下协议不能正常工作。 解答:发送端:0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0

接收端:0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0

Chapter 3

1. Why is it that voice and video traffic is often sent over TCP rather than UDP in today's

Internet. (Hint: The answer we are looking for has nothing to do with TCP's congestion-control mechanism.)

2. Is it possible for an application to enjoy reliable data transfer even when the application runs over UDP? If so, how?

3. Consider a TCP connection between Host A and Host B. Suppose that the TCP segments

traveling from Host A to Host B have source port number X and destination port number y. What are the source and destination port numbers for the segments traveling from Host B to Host A?

4. Suppose a process in Host C has a UDP socket with port number 6789. Suppose both Host A

and Host B each send a UDP segment to Host C with destination port number 6789. Will both

of these segments be directed to the same socket at Host C? If so, how will the process at Host C know that these two segments originated from two different hosts?

5. In our rdt protocols, why did we need to introduce sequence numbers? 6. In our rdt protocols, why did we need to introduce timers?

7. Suppose Host A sends two TCP segments back to back to Host B over a TCP connection. The first segment has sequence number 90; the second has sequence 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 the acknowledgment number? 8. True or false?

a. The size of the TCP RcvWindow never changes throughout the duration of the connection. b. suppose Host A is sending Host B a large file over a TCP connection. The number of unacknowledged bytes that A sends cannot exceed the size of the receive buffer.

c. Host A is sending Host B a large file over a TCP connection. Assume Host B has no data to send Host A. Host B will not send acknowledgments to Host A because Host B cannot piggyback the acknowledgmens 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. If the sequence number for a segment of this connection is m, then the sequence number for the subsequent segment will necessarily be m + 1.

f. Suppose that the last SampleRTT in a TCP connection is equal to I sec. The current value of Timeoutrnterval for the connection will necessarily be>1 sec.

g. Suppose Host A sends one segment with sequence number 3g and 4 bytes of data over a TCP connection to Host B. In this same segment the acknowledgment number is necessarily 42.

9. Consider congestion control in TCP. when the timer expires at the sender, the threshold is set

to one half of its previous value. 10. Suppose client A initiates a Telnet session with Server S. At about the same time, client B also

initiates a Telnet session with Server S. Provide possible source and destination port numbers for

a. The segments sent from A to S.

b. The segments sent from B to S. c. The segments sent from S to A. d. The segments sent from S to B.

e. If A and B are different hosts, is it possible that the source port number in the segments from A to S is the same as that from B to S? f. How about if they are the same host?

11. Consider Figure 3.5. What are the source and destination port values in the segments flowing

from the server back to the clients' processes? What are the IP addresses in the

network-layer datagram carrying the transport-layer segments?

12. Consider the GBN protocol with a sender window size of 3 and a sequence number range of

1,024. Suppose that at time r, the next in-order packet that the receiver is expecting has a sequence number of t. Assume that the medium does not reorder messages. Answer the following questions:

a. What are the possible sets of sequence numbers inside the sender's window at time t? Justify your answer.

b. What are all possible values of the ACK field in all possible messages currently propagating back to the sender at time r? Justify your answer.

13. 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.

14. Host A and B are communicating over a TCP connection, and Host B has already received

from A all bytes up through byte 358. Suppose Host A then sends two segments to Host B back-to-back. The first and second segments contain 50 and 80 bytes of data, respectively. In

the first segment, the sequence number is 359, the source port number is 1028, 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?

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.

15. Host A and B are directly connected with a 200 Mbps link. There is one TCP connection

between the two hosts, and Host A is sending to Host B an enormous file over this connection. Host A can send application data into the link at 100 Mbps but Host B can read

out of its TCP receive buffer at a maximum rate of 50 Mbps. Describe the effect of TCP flow control.

16. In Section 3.5.4, we saw that TCP waits until it has received three duplicate ACKs before

performing a fast retransmit. Why do you think the TCP designers chose not to perform a fast

retransmit after the first duplicate ACK for a segment is received? 17. 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 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 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 a triple duplicate ACK, what will be the values of the congestion window size and of Threshold?

18. Host A is sending an enormous file to Host B over a TCP connection. Over this connection

there is never any packet loss and the timers never expire. Denote the transmission rate of