Problem 24
a) True. Suppose the sender has a window size of 3 and sends packets 1, 2, 3 at
0
t
. At
1
t
)01(
tt
the receiver ACKS 1, 2, 3. At
2
t
)12(
tt
the sender times out and
t
4
t
2
t
b) True. By essentially the same scenario as in (a).
Problem 25
a) Consider sending an application message over a transport protocol. With TCP, the
application writes data to the connection send buffer and TCP will grab bytes without
Problem 26
There are
2964,294,967,2
32
possible sequence numbers.
a) The sequence number does not increment by one with each segment. Rather, it
.
w
k
2
Problem 27
a) In the second segment from Host A to B, the sequence number is 207, source port
number is 302 and destination port number is 80.
c) If the second segment arrives before the first segment, in the acknowledgement of the
first arriving segment, the acknowledgement number is 127, indicating that it is still
waiting for bytes 127 and onwards.
d)
Problem 28
100Mbps. Still, host A sends data into the receive buffer faster than Host B can remove
Seq = 127, 80 bytes
Host A Host B
Problem 29
a) The server uses special initial sequence number (that is obtained from the hash of
source and destination IPs and ports) in order to defend itself against SYN FLOOD
attack.
Problem 30
a) If timeout values are fixed, then the senders may timeout prematurely. Thus, some
Problem 31
DevRTT = (1- beta) * DevRTT + beta * | SampleRTT – EstimatedRTT |
EstimatedRTT = (1-alpha) * EstimatedRTT + alpha * SampleRTT
TimeoutInterval = EstimatedRTT + 4 * DevRTT
After obtaining 140ms:
DevRTT = 0.75*8.75 + 0.25 * | 140 103.16 | = 15.77 ms
EstimatedRTT = 0.875 * 103.16 + 0.125 * 140 = 107.76 ms
TimeoutInterval = 107.76+4*15.77 = 170.84 ms
Problem 32
a)
Denote
)
(n
TTEstimatedR
for the estimate after the nth sample.
b)
j
n
j
jn SampleRTTxxTTEstimatedR
1
1
1)( )1(
n
n
SampleRTTx
1
)1(
c)
j
j
Problem 33
could wrong if TCP measures SampleRTT for a retransmitted
segment. Suppose the source sends packet P1, the timer for P1 expires, and the source
then sends P2, a new copy of the same packet. Further suppose the source measures
Problem 34
At any given time t, SendBase 1 is the sequence number of the last byte that the
Problem 35
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
Problem 36
Suppose packets n, n+1, and n+2 are sent, and that packet n is received and ACKed. If
Problem 37
a) GoBackN:
A sends 9 segments in total. They are initially sent segments 1, 2, 3, 4, 5 and later re
sent segments 2, 3, 4, and 5.
Problem 38
Yes, the sending rate is always roughly cwnd/RTT.
Problem 39
If the arrival rate increases beyond R/2 in Figure 3.46(b), then the total arrival rate to the
qu
increases. When the arrival rate equals R/2, 1 out of every three packets that leaves the
Problem 40
a) TCP slowstart is operating in the intervals [1,6] and [23,26]
b) TCP congestion avoidance 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.
Problem 41
Refer to Figure 5. In Figure 5(a), the ratio of the linear decrease on loss between
connection 1 and connection 2 is the same as ratio of the linear increases: unity. In this
Figure 5: Lack of TCP convergence with linear increase, linear decrease
Problem 42
If TCP were a stop-and-wait protocol, then the doubling of the time out interval would
Problem 43
In this problem, there is no danger in overflowi
Problem 44
a) It takes 1 RTT to increase CongWin to 7 MSS; 2 RTTs to increase to 8 MSS; 3
RTTs to increase to 9 MSS; 4 RTTs to increase to 10 MSS; 5 RTTs to increase to 11
MSS; 6 RTTs to increase to 12 MSS.
Problem 45
a) The loss rate,
L
, is the ratio of the number of packets lost over the number of packets
sent. In a cycle, 1 packet is lost. The number of packets sent in a cycle is
2/
0
)
2
(1
22
W
n
n
W
W
WW
8
Thus the loss rate is
b) For
W
large,
WW
4
3
8
3
2. Thus 2
3/8 WL or L
W3
8. From the text, we
therefore have
Problem 46
a) Let W denote the max window size measured in segments. Then, W*MSS/RTT =
10Mbps, as packets will be dropped if the maximum sending rate exceeds link
capacity. Thus, we have W*1500*8/0.15=10*10^6, then W is about 125 segments.
Problem 47
Let W denote max window size. Let S denote the buffer size. For simplicity, suppose
TCP sender sends data packets in a round by round fashion, with each round
corresponding to a RTT. If the window size reaches W, then a loss occurs. Then the
Problem 48
a) Let W denote the max window size. Then, W*MSS/RTT = 10Gbps, as packets will
be dropped if maximum sending rate reaches link capacity. Thus, we have
Problem 49
LRTT
MSS
B22.1 , so we know that,
Problem 50
a) lf of that of C2.
Thus C1 adjusts its window size after 50 msec, but C2 adjusts its window size after
100 msec. Assume that whenever a loss event happens, C1 receives it after 50msec
The following table describes the evolution of window sizes and sending rates based
on the above assumptions.
C1 C2
Time
(msec)
Window Size
(num. of
segments sent
in next
50msec)
Average data sending
rate (segments per
second,
=Window/0.05)
Window
Size(num. of
segments
sent in next
100msec)
Average data sending
rate (segments per
second, =Window/0.1)
0
10
200 (in [0
50]msec]
10
100 (in [0
50]msec)
50 5
(decreases
window size
as the avg.
total sending
rate to the
is
200+100)
100 (in [50-100]msec] 100 (in [50-100]msec)
100 2
(decreases
window size
as the avg.
total sending
rate to the
is
as the avg.
total sending
rate to the
is
40 5
(decreases
window size
50
(100+100)/2)
200 1
(no further
decrease, as
window size
is already 1)
20 2
(decreases
window size
as the avg.
total sending
rate to the
link in
last
100msec
is
80=
(40+20)/2 +
(50+50)/2)
20
(no further
decrease, as
window size
is already 1)
(no further
decrease, as
window size
window size
as the avg.
total sending
rate to the
last
is
(20+20)/2 +
350
2
40
10
400
1
20
1
10
450
2
40
10
window size
as the avg.
window size
as the avg.
total sending
rate to the
link in last
50msec is
link in last
50msec is
50= (40+10)
550 2 40 10
600 1 20 1 10
650 2 40 10
Based on
are 1 segment each.
b)
Problem 51
a) Similarly as in last problem, we can compute their window sizes over time in the
following table. Both C1 and C2 have the same window size 2 after 2200msec.
C1
C2
Time
(msec)
Window Size
(num. of
segments sent in
next 100msec)
Data sending speed
(segments per second,
=Window/0.1)
Window
Size(num. of
segments sent
in next
100msec)
Data sending speed
(segments per second,
=Window/0.1)
0
15
150 (in [0
100]msec]
10
100 (in [0
100]msec)
100
7
70
5
50
200
3
30
2
20
300
1
10
1
10
400
2
20
2
20
500
1
10
1
10
600
2
20
2
20
700
1
10
1
10
800
2
20
2
20
1100 1 10 1 10
1200 2 20 2 20
1300 1 10 1 10
1400 2 20 2 20
b) Yes, this is due to the AIMD algorithm of TCP and that both connections have the
same RTT.
Problem 52
Note that W represents the maximum window size.
First we can find the total number of segments sent out during the interval when TCP
changes its window size from W/2 up to and include W. This is given by:
Problem 53
-byte packets and a 100 ms round-trip time. From the TCP throughput
Problem 54
An advantage of using the earlier values of cwnd and ssthresh at t2 is that TCP would
Problem 55
a) The server will send its response to Y.
Problem 56
a) Referring to the figure below, we see that the total delay is
b) Similarly, the delay in this case is:
c) Similarly, the delay in this case is:
RTT
initiate TCP
connection
request
object first window
= S/R