📄 homeworka_chapter3.txt
字号:
Chapter 3
Review Questions
1.
Source port number y and destination port number x.
2.
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.
3.
Yes. The application developer can put reliable data transfer into the application layer protocol. This would require a significant amount of work and debugging, however.
4.
a) false(B可以单独发个确认给A)
b) false(是动态改变的)
c) true
d) false(可能重传)
e) true
f) false(SampleRTT只是过程中的一个RTT,它不能影响到整体RTT)
g) false(应该是用收到的B报文序列号作为确认号)
5.
a) 20 bytes
b) ack number = 90
6.
3 segments:
First segment: seq = 43, ack =80;
Second segment: seq = 80, ack = 44;
Third segment: seq = 44, ack = 81
7.
R/2
8.
False, it is set to half of the current value of the congestion window.
Problems
1.
a) A->S SP:4678/Dp:23
b) B->S SP:6789/Dp:23
c) S->A SP:23/Dp:4678
d) S->B SP:23/Dp:6789
e) yes
f) no
3.
01010101
+01110000
-------------
11000101
+01001100
-------------
00010001
One's complement = 1 1 1 0 1 1 1 0.
To detect errors, the receiver adds the four words (the three original words and the checksum). If the sum contains a zero, the receiver knows there has been an error. All one-bit errors will be detected, but not all two-bit errors can be detected (e.g., if the last digit of the first word is converted to a 0 and the last digit of the second word is converted to a 1).
16.
a) Here we have a window size of N=3.
Suppose the receiver has received packet k-1, and has ACKed that and all other preceding packets. If all of these ACK's have been received by sender, then sender's window is [k, k+N-1].
Suppose next that none of the ACKs have been received at the sender. In this second case, the sender's window contains k-1 and the N packets up to and including k-1. The sender's window is thus [k-N,k-1].
b) If the receiver is waiting for packet k, then it has received (and ACKed) packet k-1 and the N-1 packets before that. If none of those N ACKs have been yet received by the sender, then ACK messages with values of [k-N,k-1] may still be propagating back. Because the sender has sent packets [k-N, k-1], it must be the case that the sender has already received an ACK for k-N-1. Once the receiver has sent an ACK for k-N-1 it will never send an ACK that is less that k-N-1. Thus the range of in-flight ACK values can range from k-N-1 to k-1.
18.
In order to avoid the scenario of Figure 3.27, we want to avoid having the leading edge of the receiver's window (i.e., the one with the "highest" sequence number) wrap around in the sequence number space and overlap with the trailing edge (the one with the "lowest" sequence number in the sender's window). That is, the sequence number space must be large enough to fit the entire receiver window and the entire sender window without this overlap condition. So - we need to determine how large a range of sequence numbers can be covered at any given time by the receiver and sender windows.
Suppose that the lowest-sequence number that the receiver is waiting for is packet m. In this case, it's window is [m,m+w-1] and it has received (and ACKed) packet m-1 and the w-1 packets before that, where w is the size of the window. If none of those w ACKs have been yet received by the sender, then ACK messages with values of [m-w,m-1] may still be propagating back. If no ACKs with these ACK numbers have been received by the sender, then the sender's window would be [m-w,m-1].
Thus, the lower edge of the sender's window is m-w, and the leading edge of the receivers window is m+w-1. In order for the leading edge of the receiver's window to not overlap with the trailing edge of the sender's window, the sequence number space must thus be big enough to accommodate 2w sequence numbers. That is, the sequence number space must be at least twice as large as the window size, k >= 2w.
19.
a) True.
Suppose at t0 the sender has a window size of 3 and sends packets 1, 2, 3.
At t1 (t1>t0) the receiver ACKS 1, 2, 3.
At t2 (t2>t1) the sender times out and resends 1, 2, 3.
At t3 (t3>t2) the receiver receives the duplicates and re-acknowledges 1, 2, 3.
At t4 (t4>t1) the sender receives the ACKs that the receiver sent at t1 and advances its window to 4, 5, 6.
At t5 (t5>t4) the sender receives the ACKs 1, 2, 3 the receiver sent at t3. These ACKs are outside its window.
b) True. By essentially the same scenario as in (a).
c) True.
d) True. Note that with a window size of 1, SR, GBN, and the alternating bit protocol are functionally equivalent. The window size of 1 precludes the possibility of out-of-order packets (within the window). A cumulative ACK is just an ordinary ACK in this situation, since it can only refer to the single packet within the window.
20.
There are 2(32 exponent) = 4,294,967,296 possible sequence numbers.
a) The sequence number does not increment by one with each segment, Rather, is increments by the number of bytes of data sent. So the size of the MSS is irrelevant -- the maximum size file that can be sent from A to B is simply the number of bytes representable by 2(32 exponent) = 4,294,967,296 bytes.
b) The number of segments is 2(32 exponent)/1460 = 2,941,758 segments. Every 66 bytes of header get added to each segment giving a total of 194,156,028 bytes of header. The total number of bytes transmitted is 4,294,967,296+194,156,028 = 4,489,123,324 bytes. Thus it would take (4,489,123,324 x 8)/10000000 = 3,591 seconds = 59 minutes to transmit the file over a 10Mbps link.
23.
At any given time t, SendBase-1 is the sequence number of the last byte that the sender knows has been received correctly and in order at the receiver. The actually last byte received (correctly and in order) at the receiver at time t may be greater if there are acknowledgements in the pipe. Thus
SendBase-1 <= LastByteRcvd
24.
When, at time t, the sender receives an acknowledgement with value y, the sender knows for sure that the receiver has received everything up through y-1. The actual last byte received (correctly and in order) at the receiver at time t may be greater if y <= SendBase or if there are other acknowledgements in the pipe. Thus
y-1 <= LastByteRvcd
25.
Suppose packets n, n+1, and n+2 are sent, and that packet n is received and ACKed. If packets n+1 and n+2 are reordered along the end-to-end-path (i.e., are received in the order n+2, n+1) then the receipt of packet n+2 will generate a duplicate ack for n and would trigger a retransmission under a policy of waiting only for second duplicate ACK for retransmission. By waiting for a triple duplicate ACK, it must be the case that two packets after packet n are correctly received, while n+1 was not received. The designers of the triple duplicate ACK scheme probably felt that waiting for two packets (rather than one) was the right tradeoff between triggering a quick retransmission when needed, but not retransmitting prematurely in the face of packet reordering.
27.
a) TCP slowstart is operating in the intervals [1,6] and [23,26]
b) TCP congestion advoidance is operating in the intervals [6,16] and [17,22]
c) After the 16th transmission round, packet loss is recognized by a triple duplicate ACK. If there was a timeout, the congestion window size would have dropped to 1.
d) After the 22nd transmission round, segment loss is detected due to timeout, and hence the congestion window size is set to 1.
e) The threshold is initially 32, since it is at this window size that slowtart stops and congestion avoidance begins.
f) The threshold is set to half the value of the congestion window when packet loss is detected. When loss is detected during transmission round 16, the congestion windows size is 42. Hence the threshold is 21 during the 18th transmission round.
g) The threshold is set to half the value of the congestion window when packet loss is detected. When loss is detected during transmission round 22, the congestion windows size is 26. Hence the threshold is 13 during the 24th transmission round.
h) During the 1st transmission round, packet 1 is sent; packet 2-3 are sent in the 2nd transmission round; packets 4-7 are sent in the 3rd transmission round; packets 8-15 are sent in the 4th transmission round; packets16-31 are sent in the 5th transmission round; packets 32-63 are sent in the 6th transmission round; packets 64 – 97 are sent in the 7th transmission round. Thus packet 70 is sent in the 7th transmission round.
i) The congestion window and threshold will be set to half the current value of the congestion window when the loss occurred. Thus the new values of the threshold and window will be 4.
33.
An advantage of using the earlier values of CongWin and Threshold at t2 is that TCP would not have to go through slow start and congestion avoidance to ramp up to the throughput value obtained at t1. A disadvantage of using these values is that they may be no longer accurate. In particular, if the path has become more congested between t1 and t2, the sender will send a large window’s worth of segments into an already (more) congested path.
40.
The fraction of the response time that is due to slow start is:
y/(x+y)
where x = 2 RTT + O/R
y = P (RTT + S/R) – (2P – 1) S/R
note: P in 2P is exponent of 2
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -