Problem 19 1 0.9 r=0.1 r=0.5 r=1 0.8 Throughput 0.7 0.6 0.5 0.4 0.3 0.2 10 3 10 2 10 1 10 0 PER Figure 2.3: Throughput of ABP vs. 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 T t 1+2(1+r)( p ) 1 p where T t 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 increasing 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 TRANSP +2PROP + ACK = 1 1000N 1000 + 5, 000, 000 + 80 = 1 N = 5001. We should have a window of at least 5001 packets to achieve 100% efficiency. Problem 21 (a) Total round-trip time T rt,isgivenby T rt = T SR t + T SR p + T RS t + T RS p, where Tt AB, Tp AB are the transmission time and propagation time respectively 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 T SR t = 8 1000 10 7 =0.8 ms, Tt RS = 8 40 =0.0107 ms, 30 1000 which gives T rt = 4.8107 ms. Thus, the window size W is W = T rt T SR t 6. (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 E[T succ t ]=(1 p)tt SR + p(wtt SR + E[Tt succ ]), ( ( ) ) p 1+ W. 1 p E[Tt succ ]=Tt SR Then, the average throughput is given by λ = 1 E[T succ t ] = 950 packets/s. 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 ), Efficiency = TRANSP. E(T ) To calculate τ = E(T ), let the state of the system be the number of packets remaining 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: E(T ) = (1 p)transp + p(time-out + E(T )) = TRANSP + p time-out 1 p pn TRANSP = TRANSP +. 1 p
So efficiency can be expressed as: Efficiency = TRANSP TRANSP + pn TRANSP 1 p = 1. 1+ pn 1 p 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 received correctly is P c =(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, E[X] = P c (1 P c ) x 1 = 1. P c x=1 where P c 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) dp c = (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.
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 tradeoff between triggering a quick retransmission when needed, but not retransmitting prematurely in the face of packet reordering.
Problem 23. a) K =number of windows that cover the object = minfk :3 0 +3 1 + +3 k 1 O=Sg ff = min ρk : 1 3k 1 3 O=S = minfk :3 k 1+2O=Sg = dlog 3 (1 + 2O=S)e b) Q is the number of times the server would stall for an object of infinite size. ρ ff Q = max k :RTT + S S R R 3k 1 0 = μ1 + log 3 1+ RTT S=R ν
c) = O R +2RTT + P X k=1 latency = O R +2RTT + P X k=1 stall k RTT + SR SR 3k 1 = O R +2RTT + P (RTT + S=R) (3P 1) 2 S R
Problem 28. a) Transfer time of all M + 1 objects : (M +1) O R TCP connection setup : Request for images : 2 RT T RT T To this we have to add the latency due to slow-start. Comparing the contribution of RTTs with that in non-persistent HTTP we see that the only RTTs that affect the response time are the two RTTs needed for setting up the TCP connection and sending the initial request and one RTT for requesting the images. In non-persistent HTTP we have a separate TCP connection setup for each object. b) Because the last window of the initial object is full and the server does not need to wait for a request for the images, the situation is identical to the server sending one large object of (M +1)O bytes. The response time is (M +1)O 2 RT T + R +P 0 RT T + S R (2 P 0 1) S R 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 2 K 1 (S=R)] +. In reality, the stall
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 0 RT T + S R (2 P 0 1) S R [ S R + RT T 2K 1 S R ]+