TCP Course Outline Internet Engineering by Jorg Liebeherr, University of Virginia (1999) http://iec.caida.org/courses/liebeherr99 very good slides on TCP... 9:00-10:30 Introductory Material - Internet Protocol Stack/Layers - End to end argument - Duties of the Transport Layer - Reliability - Connection Establishment - Mux/demux - Congestion control - TCP Packet Format - TCP state machine - Loss detection - Timers - RTO calculation - Flow control - Congestion control (Slowstart, Cong Avoidance) - Fast retransmit/Fast Recovery - Security guarantees - Lab Tools - Netperf application - tcpdump: packet traces - tcptrace: analyze traces - xplot: plot traces 10:30-11:00 Break 11:00-12:00 Lab I - This lab will consist of about 5-7 different packet traces of TCP connections. Students will analyze each trace. 1. Find the RTT for the connection. 2. Find the average bandwidth achieved. 3. Estimate the available bandwidth. 4. Attempt to identify TCP problems in this connection. - Here is a list of traces I plan to use: 1. Incorrect RTO calculation results in many retransmits. 2. Reno with +1/8 bug results in periodic timeouts. 3. Reno under heavy loss fails 3 dupacks and times out. 4. BW*delay > 64 kB results in under-utilization. 5. BW limited due to packet loss. 6. BW is low due to small packet size. 7. Something interesting about an http1.1 or req/response. 12:00-1:00 Lunch 1:00-1:30 Discussion of Exercises - Introduce new concepts to fix problems - Reno problems ==> SACK, NewReno - 16 bit Window ==> WinScale - Timers ==> Timestamp option (but not good?) - Packet sizes ==> Path MTU - Packet Loss ==> ECN - also RFC2414 larger initial window 1:30-2:00 Kernel TCP architecture - Probably use linux? - ways into and out of the stack 2:00-3:30 Lab II These exercises are probably grad level exercises and each tries to touch on an interesting research problem. As such, they might be hard and they might be open-ended. The goal is to do/learn as much as possible in the time available. At the end of the lab, each group may display a graph of interesting results and give a short summary of what they did. - In this lab, students will break up into groups of 3. - Each group will choose one of the traces from Lab I to work on. - For each trace in Lab I, a test setup will be used to create the behavior. The test setup will consist of a sender, a router, and a receiver. Sender/Receiver use Linux; router use FreeBSD with dummynet (to create bottlenecks, delay, etc) or AltQ (for RED/ECN). Here is the assignment for each group: 1. Timer problems A. Find and repair timer problem in Linux sender. B. Modify dummynet to inject variable delay. C. Examine performance of TCP RTO calculation under different conditions. 2. Reno timeouts due to multiple loss A. Configure the kernel to compare Reno, SACK, and NewReno under identical conditions B. Vary the rate of packet loss and compare how each of the three versions responds. Plot a graph of BW vs. packet loss for each case. (Use a log-log plot). 3. 3 dupacks check. A. Modify the kernel to reduce the 3 dupacks check in the case where cwnd is small. B. Modify the kernel to send one new packet per dupack in order to increase the number of dupacks available. C. Any other solutions you can think of? D. Compare the results of each of the solutions via trace examination. E. Compare the results of each solution numerically by measuring the bandwidth of each as a function of packet loss. Plot on a log-log scale. 4. Window too small. A. Modify application to use larger socket buffers. B. Measure and plot performance (bandwidth) as a function of socket buffer size. Is there a disadvantage to using too large of a socket buffer? C. Now use Netperf in request/response mode, with a block size of 100kB. In this mode, TCP is always in slowstart. D. Take a packet trace and examine the performance. E. Consider mechanisms to improve slowstart performance. - Burst solution: skip slowstart completely after initial SS - Pacing solution: implement pacing to establish ACK clocking 5. Effects of packet loss A. Vary the rate of packet loss and record how TCP responds. Plot a graph of BW vs. packet loss for each case. (Use a log-log plot). B. Turn on RED in AltQ. Vary the bottleneck BW and measure the resulting packet loss. (This can be done using TCP stats on the sender/receiver). Plot loss as a function of BW. C. Same tests using multiple connections; explore fairness and RED parameter tuning. Look for the pathological case Victor described. 6. Kevin will come up with an interesting PMTU exercise. 7. Need to come up with something good here, too. 3:30-5:00 Analysis of TCP Performance; New developments Performance: - 1/sqrt(p) formula for CA - UMass calculation including timeouts - Slowstart analysis Fairness: New R&D: - Rate-halving algorithm - Autotuning - Shared congestion state (RFC2140?) - Equation based and Rate based cong. control - CM WG - RMRG and RMT