You are on page 1of 2

Problem 13

In a NAK only protocol, the loss of packet x is only detected by the receiver when packet
x+1 is received. That is, the receivers receives x-1 and then x+1, only when x+1 is
received does the receiver realize that x was missed. If there is a long delay between the
transmission of x and the transmission of x+1, then it will be a long time until x can be
recovered, under a NAK only protocol.

On the other hand, if data is being sent often, then recovery under a NAK-only scheme
could happen quickly. Moreover, if errors are infrequent, then NAKs are only
occasionally sent (when needed), and ACK are never sent – a significant reduction in
feedback in the NAK-only case over the ACK-only case.

Problem 23

There are 2 32 = 4,294,967,296 possible sequence numbers.


a) The sequence number does not increment by one with each segment. Rather, is
increments by the number of bytes of data sent. So the size of the MSS is irrelevant -- the
maximum size file that can be sent from A to B is simply the number of bytes
representable by 2 32 ≈ 4.19 Gbytes .
⎡ 2 32 ⎤
b) The number of segments is ⎢ ⎥ = 2,941,758 . 66 bytes of header get added to each
⎢1460 ⎥
segment giving a total of 194,156,028 bytes of header. The total number of bytes
transmitted is 2 32 + 194,156,028 = 3,591 × 107 bits.
Thus it would take 3,591 seconds = 59 minutes to transmit the file over a 10~Mbps link.

Problem 36

In this problem, there is no danger in overflowing the receiver since the receiver’s receive
buffer can hold the entire file. Also, because there is no loss and acknowledgements are
returned before timers expire, TCP congestion control does not throttle the sender.
However, the process in host A will not continuously pass data to the socket because the
send buffer will quickly fill up. Once the send buffer becomes full, the process will pass
data at an average rate or R << S.
Host A requests a HTML file of size O = 500Kbytes from web sever B. Suppose RTT =
100 msec and S = 500bytes. Transmission rate R =1Mbps. The transmission goes through
a slow start process. No error and no congestion in the network. Calculate the total time
for Host A to get the file.

P is the number of times TCP idles at server. P = min{Q, K-1}, where Q is the number of
times the server idles if the object were of infinite size and K is the number of windows
that cover the object.

K = min{k : 2 0 S + 21 S + L + 2 k −1 S ≥ O}
= min{k : 2 0 + 21 + L + 2 k −1 ≥ O / S}
O
= min{k : 2 k − 1 ≥ }
S
O
= min{k : k ≥ log 2 ( + 1)}
S
⎡ O ⎤ ⎡ 500 *10 3 ⎤
= ⎢log 2 ( + 1)⎥ = ⎢log 2 ( + 1)⎥ = 10
⎢ S ⎥ ⎢ 500 ⎥

⎧ S S ⎫
Q = max ⎨q : RTT + ≥ 2 q −1 ⎬
⎩ R R ⎭
⎧ RTT ⎫
= max ⎨q : 2 q −1 ≤ 1 + ⎬
⎩ S /R⎭
⎧ ⎛ RTT ⎞ ⎫
= max ⎨q : q ≤ log 2 ⎜1 + ⎟ + 1⎬
⎩ ⎝ S/R⎠ ⎭
⎢ ⎛ RTT ⎞⎥ ⎢ ⎛ 100 *10 −3 ⎞⎥
= ⎢log 2 ⎜1 + ⎟⎥ + 1 = ⎢log 2 ⎜⎜1 + ⎟ +1 = 5
6 ⎟⎥
⎣ ⎝ S / R ⎠⎦ ⎣ ⎝ 500 * 8 / 10 ⎠⎦

P = min{Q, K-1} = 5

O ⎡ S⎤ S
Latency = 2 RTT + + P ⎢ RTT + ⎥ − (2 P − 1)
R ⎣ R⎦ R
⎡ 500 * 8 ⎤
3
500 * 8 *10 100
Latency = 2 *100 *10 −3 + + 5 * ⎢100 *10 −3 + 6 ⎥
− (2 5 − 1) 6
⎣ 10 ⎦
6
10 10
= 4.7169

You might also like