You are on page 1of 4

4

4.1

Ttimeout ≥ KTtrans + (K + 1)TACK + (2K + 2)Tprop

because timer begins after A finishes sending to either X1 /Y1 , then we must
wait for max(K, M ) = K additional
links to pass on the transmission to B, and finally pass back through the
same network the ACK/NACK all the way back to A, taking into account
propagation time on each link back and forth.

4.2

_
Pr(A sends to B successf ully) = Pr(A sends through Xs successf ully A sends through Y s successf ul
P r(A sends through Xs successf ully)+P r(A sends through Y s successf ully) =
p(1 − px )M +1 + (1 − p)(1 − py )K+1

4.3
first we compute:

Pr(A sends to B successf ully and receives ACK) = p(1−px )2(M +1) +(1−p)(1−py )2(K+1) = q

we build RV X = number of attempts to make successf ully transaction, X ∼


Geo(q)
so the expected number of tries is
1
E(X) = 1q = p(1−px )2(M +1) +(1−p)(1−p y)
2(K+1)

4.4
The time of one transaction is Ttrans +Ttimeout , so overall time until a successful
try is (Ttrans + Ttimeout ) ∗ E(X) =
(K + 1)(Ttrans + 2Tprop + TACK ) ∗ E(X)

4.5
first we have RV

1
Z = number of attempts to send successf ully through link, Z ∼ Geo(1−pY ), E(Z) =
1 − pY

1
GoodT ransmissionT ime
GoodputA,Y 1 = OverallT ransmissionT ime we compute these:
GoodT ransmissionT ime = Ttrans
1
OverallT ransmissionT ime = (Ttrans + TACK + 2Tprop ) ∗ 1−p Y
Ttrans
so we get GoodputA,Y 1 = (T +T +2T )∗ 1
trans ACK prop 1−pY

4.6
Let Ttimeout = TACK + 2Tprop for every link in the route,
1
let Xi = time to transmit across link i, E(Xi ) = (Ttrans + Ttimeout ) ∗ 1−p Y
P
Now let W = time to transmit
P f rom
P A to B, W = Xi
If so we have E(W ) = E (Xi ) = E(Xi ) = (K + 1) ∗ (Ttrans + Ttimeout ) ∗
1
1−pY

4.7 Same as 4.5. GoodTransmisionTime and OverallTransmissionTime stay


the same,
because Ttimeout = TACK + 2Tprop . The advantage we get from using S&W on
all links is for the average time it takes to send from A to B, not for any of the
individual links across the network.
5.1.a
throughput remains the same, because although window size increases by higher
linear constant, we reach congestion faster and thus reset window size more
frequently. Mathematically speaking:
nk− nk
W M ax = kn ⇒While in congestion control we hit WMax after k
2
= n2
time units. We compute integral
R n2 2 n 2 Rn
0
kxdx = k( x2 ) |02 = kn8 , but for maximum window size 02 nk 2 dx =
n
nk kn2
2 (x) |0 =
2
4 , so we get
kn2
1
8
kn2
= 2 , in other words during congestion control our overall throughput is
4
3W
still 4RT T .

5.1.b
The protocol is still fair. All users window sizes grow by same linear constant,
meaning those with larger window size suffer larger decrease in congestion, con-
verging to fairness.

5.2.a
This depends on the value of k. If W max−k > W max2 we get larger throughput,
simply because congestion control starts with larger window size at each phase
but exhibits same behavior. Otherwise we get the same or less.

2
5.2.b
No, the protocol is not fair. Because if one user has an advantage over an-
other, this advantage is not “fixed” at every window-size descrease. Meaning
the difference between user window-sizes does not converge with time to 0.

5.3.a
The throughput will be smaller. This is because window size grows exponen-
tially, therefore we have less “time” to utilise large window-sizes without con-
gestion before hitting W max and decreasing multiplicatively. In other words,
at any point in time W√2 < Wnormal with high probability

5.3.b
The protocol is fair for the same reason as 5.1.b.

5.4
α < 2 :throughput grows because W max α > W max
2 , so in general we use more
bandwidth at any given moment.
But we notice that in this case fairness is prolonged, because the smaller
 ' 0 for which α = 1 +  the longer it will take for difference between window
sizes to converge.
α > 2: in this case it is the exact opposite: throughput shrinks because
W max
α < W max
2 but fairness is achieved faster.

6
6.1.a
Total there will be 7 messages.
client->server: SYN
server->client: SYN ACK
client->server: ACK +transaction (ID1,ID2,amount), (If MSS is too small
this will be sent seperately)
server>client: ACK for transaction
client->server: FIN
server->client: ACK
server->client: FIN

6.1.b
Yes, the attacker can start a new TCP session with an ISN to his choice. If
he sends a transaction request together with the last message in the 3-way-

3
handshake, he has a 2132 chance of guessing correctly the server’s correct ISN,
thus opening the connection and making a transaction.

6.2
Yes, the attacker may attempt to make a transaction by sending a UDP message
with source and designated ports as headers and the transaction request. His
probability of success depends on the probability of the packet reaching the
destination port correctly, as UDP is unreliable.

6.3
Yes, in this case the attacker must send a message with correct IP’s to the
correct port number, as well as guess correctly both client and server’s current
ISN’s in the connection. Thus he has ( 2132 )2 = 2164 probability of making a
transaction.

You might also like