Solutions 2
Solutions 2
1
r=0.1
r=0.5
0.9
r=1
0.8
0.7
Throughput
0.6
0.5
0.4
0.3
0.2 −3 −2 −1 0
10 10 10 10
PER
Figure above shows the throughput of SRP as it varies with the packet error
rate (PER). The results are plotted for a link rate of 1 Mbps, a packet size of 1
Kilobits, propagation delay of 0.1, 0.5 and 1 ms respectively. It is assumed that
the transmission and propagation delay for both the data packet and the ACK are
the same. The maximum transmission rate achievable is 1000 packets/s. Thus,
the throughput in the plot is normalized to this maximum value.
The average throughput of ABP can be obtained theoretically. It is given by
1
λ̄ = packets/s
Tt 1 + 2(1 + r)( 1−p
p
)
where Tt is the packet transmission time, p the packet error rate (PER), r the ratio
of propagation time to the transmission time. The throughput of ABP obtained
through simulation should match with the theoretically obtained throughput.
Note that the throughput decreases with the PER. Also note that with increas-
ing r, the throughput reduces and the performance of ABP degrades.
Problem 20
We have a 10,000 km round-trip route with a propagation time of 5 µs/km, so it
will take 50 ms to make the round trip. At a transmission rate of 100 Mbps, a “full
pipe” will have 5 Mb of data, or 5000 thousand-bit packets.
If N is the minimum window size to achieve 100% efficiency, we should have
NTRANSP
= 1
TRANSP + 2PROP + ACK
1000N
= 1
1000 + 5, 000, 000 + 80
N = 5001.
Problem 21
(a) Total round-trip time Trt , is given by
where TtAB , TpAB are the transmission time and propagation time respec-
tively from node A to node B. We assume that there is no queueing delay
at R. Propagation time in each direction is 1 ms. Transmission times per
packet are given by
8 ∗ 1000
TtSR = = 0.8 ms,
107
8 ∗ 40
TtRS = = 0.0107 ms,
30 ∗ 1000
which gives Trt = 4.8107 ms. Thus, the window size W is
Trt
W = ≈ 6.
TtSR
(b) The probability of both a packet and its ACK being received without errors
is p, where p is the probability of an ACK packet being received correctly,
the channel from S to R being error-free. Then, the average time it takes to
transmit a packet successfully is given by
1
λ̄ = = 950 packets/s.
E[Ttsucc ]
Problem 22
In this problem we would like to calculate the efficiency of the Go Back N (GBN)
protocol in the presence of error, and assuming that errors in different packets are
independent.
Efficiency is defined as the ratio of the time required to transmit a packet,
TRANSP, to the average time it takes for a packet to be transmitted, E(T ),
TRANSP
Efficiency = .
E(T )
To calculate τ = E(T ), let the state of the system be the number of packets re-
maining to be transmitted and p be the packet error probability. The system moves
from state n to n − 1 when a packet is successfully transmitted; the probability of
such an event is 1 − p, and it takes TRANSP seconds. The system moves from
state n to state n when a packet has error; the probability of such an event is p and
it takes time-out seconds, where time-out is the time round-trip travel time for a
packet. When the pipe is just full with N packets, then time-out is N × TRANSP.
From the above description we can calculate E(T ) as follows:
Note that the value of time-out does not depend of the window size but on the
number of packets that we can store in the pipe; therefore, if we increase the
window size the efficiency doesn’t change. However, if we increase the time-out
as the window size increases, the efficiency drops.
Problem 23
(a) Probability of a packet being received correctly is (1 − p)d+h .
(b) Probability that a data packet is received correctly and its ACK is also re-
ceived correctly is Pc = (1 − p)d+h (1 − q)a .
(c) Let a random variable X equal the number of times a data packet had to be
transmitted before an ACK was successfully received. Then,
∞
1
E[X] = Pc (1 − Pc )x−1 = .
x=1
Pc
where Pc is the probability of a packet and its ACK being correctly received
as found in (b).
(d) Efficiency of this protocol is given by
time to transmit d data bits
η=
time to transmit mean number of bits transmitted before a successful ACK
d
=
E[X](d + h + a)
dPc
= .
(d + h + a)
(e) This protocol is similar to SRP in that it retransmits only those packets that
failed in successful transmission of both the packet and its ACK, but since
the window size is infinite, the transmitter is never idle waiting for ACKs.
Thus, the analysis is not valid for the standard SRP.
16
2w sequence numbers. That is, the sequence number space must be at least twice as large as the
window size, k 2w:
Problem 16.
a) True. Suppose the sender has a window size of 3 and sends packets 1, 2, 3 at t0. At t1 (t1 >
t0) the receiver ACKS 1, 2, 3. At t2 (t2 > t1) the sender times out and resends 1, 2, 3. At t3 the
receiver receives the duplicates and re-acknowledges 1, 2, 3. At t4 the sender receives the ACKs that
the receiver sent at t1 and advances its window to 4, 5, 6. At t5 the sender receives the ACKs 1, 2,
3 the receiver sent at t2. These ACKs are outside its window.
b) True. By essentially the same scenario as in (a).
c) True.
d) True. Note that with a window size of 1, SR, GBN, and the alternating bit protocol are func-
tionally equivalent. The window size of 1 precludes the possibility of out-of-order packets (within
the window). A cumulative ACK is just an ordinary ACK in this situation, since it can only refer
to the single packet within the window.
Problem 17.
There are 2 = 4; 294; 967; 296 possible sequence numbers.
32
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 le that
can be sent from A to B is simply the number of bytes representable by 2 4:19 Gbytes.
32
b) The number of segments is d e = 2; 941; 758. 66 bytes of header get added to each segment
232
giving a total of 194,156,028 bytes of header. The total number of bytes transmitted is 2 +
1460
24
Thus it would take 3,591 seconds = 59 minutes to transmit the le over a 10 Mbps link.
Problem 18.
Suppose packets n, n+1, and n+2 are sent, and that packet n is received and ACKed. If packets n+1
and n+2 are reordered along the end-to-end-path (i.e., are received in the order n+2, n+1) then the
receipt of packet n+2 will generate a duplicate ack for n and would trigger a retransmission under a
policy of waiting only for second duplicate ACK for retransmission. By waiting for a triple duplicate
ACK, it must be the case that two packet after packet n are correctly received, while n+1 was
not received. The designers of the triple duplicate ACK scheme probably felt that waiting for two
subsequent packets (rather than 1) was the right tradeo between triggering a quick retransmission
when needed, but not retransmitting prematurely in the face of packet reordering.
Problem 19. Denote EstimatedRT T n for the estimate after the nth sample.
( )
EstimatedRT T = SampleRT T
(1)
1
Problem 23.
a)
K = number of windows that cover the object
= minfk : 3 + 3 + + 3k O=S g
0 1 1
1 3 k
= min k : 1 3 O=S
= minfk : 3k 1 + 2O=S g
= dlog (1 + 2O=S )e
3
b) Q is the number of times the server would stall for an object of in nite size.
S S k
Q = max k : RTT + 3 1
0
R R
RTT
= 1 + log 1 + S=R
3
21
c)
P
X
latency = OR + 2RTT + stallk
k=1
P
X
O
= + 2RTT +
R
RTT + RS S k
R
3 1
k=1
Problem 24.
Problem 25.
a) T
b) T
c) F
d) F
Problem 26.
When the server sends a segment, it has to wait a time of T S=R + RT T for the acknowledgement to
23
Problem 27.
PRTT + RS (2P 1) RS
2RTT + OR + P RTT + RS (2P 1) RS
Problem 28.
a)
( M + 1)O
2 RT T + R + P RT T + R (2P 0 1) RS
0 S
c)
In the previous question, the server did not have to wait for a request for the images. The stall
time after sending the initial object in that case is [S=R + RT T 2K (S=R)] . In reality, the stall
1 +
24
time is RT T because the server has to wait for an explicit request for the images from the client.
Substituting this into the response time equation gives
( M + 1)O
3 RT T + R + P RT T + R (2P 0 1) RS [ RS + RT T 2K
0 S 1 S +
]
R
Problem 29.
Problem 30.
Problem 31.