Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

King Fahd University of Petroleum and Minerals

College of Computer Sciences and Engineering


Department of Computer Engineering

COE 344 – Computer Networks (T191)

Homework # 03 (due date & time: Tuesday 05/11/2019 during class period)

Late homework submission will NOT be accepted

*** Show all your work. No credit will be given if work is not shown! ***

Problem # 1 (6 points):

Two hosts A and B are connected by a 1-Gbps link with a 20 ms round trip time. Assuming MSS = 1000
Bytes and ACK transmission time is negligible, answer the following questions:

a. Compute the required window size in order to achieve a utilization of 80%.

𝑊 × 𝐿 ⁄𝑅 𝑊 × 1000 × 8⁄1 × 109


𝑈= → 0.8 = → 𝑊 = 2001
𝑅𝑇𝑇 + 𝐿⁄𝑅 20 × 10−3 + 1000 × 8⁄1 × 109

b. Assuming 𝑠𝑠𝑡ℎ𝑟𝑒𝑠ℎ = ∞, and no timeout or duplicate ACKs occur, how long would it take
for the slow-start phase of TCP to achieve 80% utilization?

𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑠𝑡𝑒𝑝𝑠 𝑟𝑒𝑞𝑢𝑖𝑟𝑒𝑑 = 𝑛𝑜 𝑜𝑓 𝑅𝑇𝑇𝑠 𝑟𝑒𝑞𝑢𝑖𝑟𝑒𝑑 = ⌈log2 (2001) + 1⌉ = 12


𝑇ℎ𝑒 𝑟𝑒𝑞𝑢𝑖𝑟𝑒𝑑 𝑡𝑖𝑚𝑒 = 12 × 20 × 10−3 = 0.24 𝑚𝑠

Problem # 2 (20 points):

Consider the following plot of a TCP congestion window (cwnd) for a short 30-round session.
Assuming TCP Reno is in use, answer the following questions:

40

35
Congestion Window Size (Segments)

30

25

20

15

10

0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
Transmission Round

a. (2 pt) What is the initial value of ssthresh?


32

Page 1 of 5
b. (2 pts) Identify the rounds during which slow-start is operating?
[1,6] and [17,21]
c. (4 pts) Identify the rounds during which congestion avoidance is operating?
[6,10], [11,16], [21,26], and [27,30]
d. (2 pts) Identify the rounds after which a segment loss is detected by duplicate ACKs.
10 and 26
e. (1 pt) Identify the rounds after which a segment loss is detected by a timeout.
16
f. (1 pt) What is the value of ssthresh at the 11th transmission round?
18
g. (1 pt) What is the value of ssthresh at the 17th transmission round?
11
h. (1 pt) What is the value of ssthresh at the 27th transmission round?
8
i. (4 pts) Identify the transmission round during which the 40th segment is sent.

Round Segments in that round Total segments transmitted so far


1 1 1 (< 40)
2 2 3 (< 40)
3 4 7 (< 40)
4 8 15 (< 40)
5 16 31 (< 40)
6 32 63 (> 40)  6th round

j. (2 pts) Assuming a packet loss is detected after the 30th round by a triple duplicate ACK, what will
the values of the cwnd size and of ssthresh be?
cwnd =ssthresh=5

Page 2 of 5
Problem # 3 (15 points):

Consider two hosts A and B where Host A is sending a 9-segment file to Host B using TCP with initial
ssthresh = 10. Let T denote the retransmission timeout, RTT to be the round-trip time. Further, assume that
there are no packet delays and that all unlost packets will be received before the retransmission timer
expires. Ignore TCP connection establishment and termination and assume transmission delay to be
negligible. If the 4th segment is lost, show the complete set of message exchanges needed to transfer the
complete file from Host A to Host B under the following conditions:

a. Using TCP Tahoe with no fast retransmit.


b. Using TCP Reno with fast retransmit.

Show the values of cwnd and ssthresh for each transmission round.

Solution 1: Under the assumption that retransmitted lost segment are counted in the cwnd, the solution
becomes as follows:

A B A B
cwnd =1 ssthresh=10 cwnd =1 ssthresh=10

cwnd =2 ssthresh=10 cwnd =2 ssthresh=10

cwnd =4 ssthresh=10 cwnd =4 ssthresh=10


timeout

timeout

cwnd =2 ssthresh=2

cwnd =1 ssthresh=2 TIMEOUT


cwnd=3 ssthresh=2

cwnd =2 ssthresh=2
cwnd=4 ssthresh=2

cwnd =3 ssthresh=2

a) b)

Page 3 of 5
Solution 2: Under the assumption that cwnd includes only new (never transmitted) segments, and lost
segments are transmitted without being counted in the cwnd, the solution becomes as follows:

A B A B
cwnd =1 ssthresh=10 cwnd =1 ssthresh=10

cwnd =2 ssthresh=10 cwnd =2 ssthresh=10

cwnd =4 ssthresh=10 cwnd =4 ssthresh=10


Retransmission

timeout
timeout

Retransmission
cwnd =2 ssthresh=2

cwnd =1 ssthresh=2 TIMEOUT


cwnd=3 ssthresh=2

cwnd =2 ssthresh=2

cwnd =3 ssthresh=2

a) b)

Page 4 of 5
Problem # 4 (9 points):

Consider the message flow diagrams, shown below, where Host A sends 50 bytes to Host B using TCP.
Complete the following scenarios by showing all missing messages between A and B. Identify all messages
using proper sequence numbers or ACK numbers. Assume fast-retransmit is used but no congestion or
flow control. Also, assume the time between any two received TCP segments is larger than 500 ms and
that all undelayed packets will be received before the retransmission timer expires.

A B A B A B

ACK 109
ACK 109
ACK 100
ACK 100 ACK 109
ACK 109

timeout
timeout

ACK 109
timeout

ACK 109 ACK 100


ACK 100 ACK 109
ACK 109
ACK 150

ACK 150 ACK 150


ACK 150

ACK 150

a) b) c)

Page 5 of 5

You might also like