Sie sind auf Seite 1von 4

Homework, sheet 6

July 24, 2013

Exercise 1. Consider the plot below that shows the congestion window size of
a sender using TCP Reno. Answer the following questions. In all cases, you
should provide a short discussion justifying your answer.

45
Congestion window size (segments)

40

35

30

25

20

15

10

0
0 2 4 6 8 10 12 14 16 18 20 22 24 26 28

Transmission round

a) Identify the time intervals when TCP slow start is operating.


Answer: TCP slowstart is operating in the intervals [1,6] and [23,26]
b) Identify the time intervals when TCP congestion avoidance is operating.
Answer: TCP congestion avoidance is operating in the intervals [6,16]
and [17,22] (assuming that the ACK of the lost segement arrives directly
after the three duplicate ACKs).
c) After the 16th transmission round, is segment loss detected by a triple
duplicate ACK or by a timeout?
Answer: 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, is segment loss detected by a triple
duplicate ACK or by a timeout?
Answer: After the 22nd transmission round, segment loss is detected due
to timeout, and hence the congestion window size is set to 1.

1
e) What is the initial value of ssthresh at the first transmission round?
Answer: The threshold is initially 32, since it is at this window size that
slow start stops and congestion avoidance begins.
f) What is the value of ssthresh at the 18th transmission round?
Answer: 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 in round
17 is 42/2 + 3 = 24 and in round 18 it is 24+1=25.
g) What is the value of ssthresh at the 24th transmission round?
Answer: 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 29. Hence the threshold is 14
(taking lower floor of 14.5) during the 24th transmission round.
h) During what transmission round is the 70th segment sent?
Answer: 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;
packets 16 to 31 are sent in the 5th transmission round; packets 32 to 63
are sent in the 6th transmission round; packets 64 to 96 are sent in the
7th transmission round. Thus packet 70 is sent in the 7th transmission
round.
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?
Answer: The threshold will be set to half the current value of the conges-
tion window (8) when the loss occurred and congestion window will be set
to the new threshold value + 3 MSS. Thus the new values of the threshold
and window will be 4 and 7 respectively.
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?
Answer: The threshold is 21, and the congestion window size is 1.
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?
Answer: round 17, 1 packet; round 18, 2 packets; round 19, 4 packets;
round 20, 8 packets; round 21, 16 packets; round 22, 21 packets. So, the
total number is 52.

Exercise 2. Recall the macroscopic description of TCP throughput (slide 3-


142). In the period of time from when the connections rate varies from W/(2
RT T ) to W/RT T , only one packet is lost (at the very end of the period).
a) Show that the loss rate (fraction of packets lost) is equal to
1
L = loss rate = 3 .
8W
2 + 43 W

2
Answer: 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
W/2
W W X W
+( + 1) + + W = ( + n)
2 2 n=0
2
W/2
W W X
=( + 1) + n
2 2 n=0
W W W/2 (W/2 + 1)
=( + 1) +
2 2 2
W2 W W2 W
= + + +
4 2 8 4
3 2 3
= W + W
8 4
Thus the loss rate is
1
3 .
8W
2 + 34 W

b) Use the result above to show that if a connection has loss rate L, then its
average rate is approximately given by
1.22 M SS
.
RT T L
q
Answer: For large W , 38 W 2 >> 34 W . Thus, L 83 W 2 or W 8
3L .
From the text, we therefore have
r
3 8 M SS 1.22 M SS
average throughput = .
4 3L RT T RT T L

Exercise 3. Consider the following network. With the indicated link costs, use
Dijkstras shortest-path algorithm to compute the shortest path from x to all
network nodes. Show how the algorithm works by computing a table similar to
the table in the slides (see slide 4-75).

z
12

8 7
y t
6 8 4
3
x v 2
4 3
6
3
w u

3
Problem 26
Answer:
Step N D(t),p(t) D(u),p(u) D(v),p(v) D(w),p(w) D(y),p(y) D(z),p(z)

0 x ! ! 3,x 6,x 6,x 8,x


1 xv 7,v 6,v 3,x 6,x 6,x 8,x
2 xvu 7,v 6,v 3,x 6,x 6,x 8,x
3 xvuw 7,v 6,v 3,x 6,x 6,x 8,x
4 xvuwy 7,v 6,v 3,x 6,x 6,x 8,x
5 xvuwyt 7,v 6,v 3,x 6,x 6,x 8,x
6 xvuwytz 7,v 6,v 3,x 6,x 6,x 8,x

Exercise
Problem4.27Consider a general network topology and a synchronous version of
the distance-vector algorithm. Suppose that at each iteration, a node exchanges
its distance vectors with its neighbors and receives their distance vectors. As-
a)
suming
Step
that
N
the algorithm
D(x), p(x)
begins
D(u),p(u)
withD(v),p(v)
each nodeD(w),p(w)
knowing D(y),p(y)
only the costs to
D(z),p(z)
its immediate neighbors, what is the maximum number of iterations required
before the distributed algorithm converges? Justify your answer.
0
Answer: t The wording! 2,t question4,twas a bit!ambiguous.
of this 7,t We meant ! this
to1 mean, tuthe number ! of iterations
2,t from4,twhen the 5,u
algorithm 7,t is run for the! first
2
time tuv is, assuming
(that 7,v the only 2,t information
4,t 5,u initially
the nodes ! cost
7,t have is the
to3 their nearest
tuvw 7,v
neighbors). 2,t assume 4,t
We 5,u
that the algorithm !
7,t synchronously
runs
4
(that tuvwx
is, in 7,v all nodes
one step, 2,t compute 4,t 5,u tables7,t
their distance at the same 15,xtime
5 then tuvwxy
and exchange 7,vtables). At2,teach iteration,
4,t 5,u exchanges
a node 7,t distance15,xtables
6 its neighbors.
with tuvwxyz 7,v
Thus, if you 2,t are node4,tA, and your 5,u neighbor 7,t is B, all15,x
of Bs
neighbors (which will all be one or two hops from you) will know the shortest
cost path of one or two hops to you after one iteration (i.e., after B tells them its
b) to you). Let d be the diameter of the network - the length of the longest
cost
Step without
path N loops between
D(x), p(x) anyD(t),p(t)
two nodes D(v),p(v) D(w),p(w) Using
in the network. D(y),p(y) D(z),p(z)
the reasoning
above, after d-1 iterations, all nodes will know the shortest path cost of d or
fewer hops u to all other
! nodes. 2,u Since any 3,u path with 3,u
greater than ! d hops will ! have
loops (and ut thus have! a greater cost
2,u than that
3,u path with
3,u the loops
9,t removed),
! the
algorithmutvwill converge
6,v in at most
2,u d-1 iterations.
3,u ASIDE:
3,u if the
9,t DV algorithm
!
is run asutvwa result of6,va change2,uin link costs,3,u there 3,u is no a priori
9,t bound !on the
number ofutvwxiterations6,vrequired until
2,u convergence
3,u unless
3,u one also 9,tspecifies a14,x
bound
utvwxy
on link costs. 6,v 2,u 3,u 3,u 9,t 14,x
utvwxyz 6,v 2,u 3,u 3,u 9,t 14,x

Das könnte Ihnen auch gefallen