---
# System prepended metadata

title: Homework 6 (FCN)

---

# Homework 6 (FCN)

# 1.

a) 1s - 6s, 23s-26s --> Both of which do not exhibit linear properties
b) 6s - 16s, 17s-22s --> Both of which exhibit linear properties
c) 3 Duplicate ACK --> If its a timeout, TCP Reno will immediately return the window to 1.
d) Timeout --> TCP Reno returns the window to 1.
e) sshthresh = 33
f) sshthresh = 21
g) sshthresh = 14 --> half of congestion size (29 at 16th transmission round)
h) 
    - CW1 = Pkt 1
    - CW2 = Pkt 2-3
    - CW4 = Pkt 4-7
    - CW8 = Pkt 8-15
    - CW16 = Pkt 16-33
    - CW32 = Pkt 34-67
    - CW33 = Pkt 68 - 102 --> Pkt 70 is at this --> Hence the 7th round.
i) congestion window = 1 at that point , sshthresh = 4 at that point--> +3 MSS. Hence, CW = 4, sshthresh = 7.
j) sshthresh at 17th is 21, cwnd = 1, 
sshthresh at 18th is 21, cwnd = 2, 
sshthresh at 19th is 21, cwnd = 4, 
k) sshthresh at 17th is 21, cwnd = 1, 
sshthresh at 18th is 21, cwnd = 2, 
sshthresh at 19th is 21, cwnd = 4, 
sshthresh at 20th is 21, cwnd = 8, 
sshthresh at 21st is 21, cwnd = 16, 
sshthresh at 22nd is 21, cwnd = 21 [due to reaching the sshthresh],  --> Total = 52
# 2.

Each cycle after slow start : W/2 + n

example: 

cycle 0: $\frac{W}{2} + 0$
cycle 1: $\frac{W}{2} + 1$
cycle 2: $\frac{W}{2} + 2$
cycle 3: $\frac{W}{2} + 3$
.
.
.
cycle n: $\frac{W}{2} + n$
.
.
.
cycle W/2: $\frac{W}{2} + \frac{W}{2}$

Now that we know the number of packets sent at each cycle, we can conclude that the total is:

$$
\sum_{n=0}^{\frac{W}{2}} (\frac{W}{2}+n)
$$

$$
=\frac{W}{2} (\frac{W}{2}+1)+ \sum_{n=0}^{\frac{W}{2}}n
$$

$$
=\frac{W}{2} (\frac{W}{2}+1) +\frac{\frac{W}{2} (\frac{W}{2}+1)}{2}
$$

$$
= \frac{W^2}{4} + \frac{W^2}{8}+ \frac{W}{2}+ \frac{W}{4}
$$

$$
= \frac{3W^2}{8} +\frac{3W}{4}
$$


Loss rate is the ratio between lost packet and sent packet (note that for every 1 packet lost, $\frac{3W^2}{8} +\frac{3W}{4}$ packets is sent )

Hence the ratio is:

$$
\frac{1}{\frac{3W^2}{8} +\frac{3W}{4}}
$$

For VERY Large W $\frac{3W^2}{8} >> \frac{3W}{4}$ hence the ratio can be seen as the following:

$$
L = \frac{8}{3W^2} --> W = (\frac{8}{3L})^{0.5}
$$

avg TCP throughput = 3W/4RTT = $\frac{1.22*MSS}{RTT * L^{0.5}}$ (shown)

# 3.

Advantage: using the earlier values of cwnd and ssthresh at t2 is that TCP would nothave to go through slow start and congestion avoidance to ramp up to the throughput value obtained at t1.

Disadvantage: 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.
