HW 2
HW 2
HW 2
S10
You are encouraged to type in your answers. Homework must be done individually. Due on April 19th, 2010.
where RT Tn is the nth RTT measurement, srttn is the nth estimate of RTT, rttvarn is the nth estimate of RTT variance, and RT On is the nth retransmission timeout value. In a typical TCP implementation, the parameters are set to: = 1/4, = 1/8, and = 4. Ben Bitdiddle considers this design a bit convoluted, and proposes to use a simple arithmetic average to estimate the RTT over a xed number of past samples. That is, RT T (i) ;k 0 k+1 RT On = srttn srttn =
n i=nk
(4) (5)
where k = 99, and = 2. Suppose that at time before n = 0, a TCPs RTT time is a constant 10ms. Both RTT estimates in EQ (1) and (4) converge to 10ms. At n = 0, the RTT of the TCP connection experiences a sudden change, and goes up to 1 second, and does not change afterwards. Answer the following questions: 1. With TCPs RTO estimate, whats the RTO at time when n = 1? 2. With Bens RTO estimate, whats the RTO at time when n = 1? 3. Will TCP suffer spurious (premature) retransmissions? If no, explain why. If yes, compute when the RTO estimate will be sufciently accurate to prevent spurious retransmssion. (Hint: you may want to write a small script to do this.) 4. Will Bens TCP suffer spurious (premature) retransmssion? If no, explain why. If yes, compute when the RTO estimate will be sufciently accurate to prevent spurious retransmssion.
CPS 114: Homework 2 5. Go to packet 91. Why is a Dup ACK sent? 6. Why does the sender send packet 96? 7. Go to packet 119. What might cause the sender to send this packet? 8. Go to packet 425. Which host does an active close?
S10
9. Go to the Statistics menu, and follow the sub-menu TCP Stream Graph. Click the Time-Sequence Graph (tcptrace). Zoom this graph so that you can see 1-second time ticks. From this graph, can you tell how many times the TCP sender does slow start, and when each slow start phase nishes? 10. What (duplicate acks or timeout) is likely to trigger the retransmission around time 2.5s? 11. What is likely to limit the senders sending window size at time 2 (cwnd, or receiver advertise window)? 12. How many packets are likely to be lost between time 2s and 7s? Circle the correct answer. A. One B. Two C. Three D. > Three
13. Around time 9.5s, another retransmssion occurs. What is likely to trigger the retransmission? 14. When does the sender receive the ACK for the packet retransmitted at around time 9.5? 15. What limits the senders sending window size at time 12s? 16. Which congestion mode is the sender in at time 13s? 17. Can you estimate the senders congestion window size at time 14s? 18. Click the Round Trip Time Graph. Can you explain why the measured RTT values uctuate so much over time from what you learned from the Time-Sequence graph? 19. Similarly, Click the Throughput Graph. Can you explain why the TCP throughput uctuates a lot between 5-10 second, but stabilizes afterwards?
Figure 1: A three-node network topology. Figure 1 shows a simple network topology. Node A is sending a large le to Node D using TCP. Suppose each data packets size is 1K bytes and the ACK size is 40 bytes. The initial slow start threshold ssthresh is set to a very large value (i.e., innite). To help you answer the question, we have provided you a simulation script tcp-buffer.tcl. You do not need to run the simulation to answer the following questions, but the simulation will help you understand TCP dynamics and provide hints to the answers. You may follow the instructions in the le http://www.cs. duke.edu/courses/spring10/cps114/labs/ns2-instr.txt to add the simulator to your path and run the script. 1. What is the delay-bandwidth product of this TCP connection? 2. Suppose the router B keeps a buffer size of Buf . Let Buf = 100. What is the maximum TCP congestion window size before the TCP sender suffers from a packet loss? 3. What is the TCP senders congestion window size when it detects a packet loss after three duplicate acknowledgment? c 2010 Xiaowei Yang 2
CPS 114: Homework 2 4. What is the connections RTT when router Bs buffer is full? 5. Whats the TCP connections maximum throughput?
S10
6. Can the router buffer size be reduced so that the maximum TCP throughput remains the same? If so, whats the minimal router buffer size to keep the pipe full? 7. Is it advantageous to keep a large or small buffer? What will be the optimal router buffer size in this case?