







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Material Type: Notes; Professor: Sengupta; Class: Comptr Netwrks/Distrbutd Procs; Subject: Computer Science; University: SUNY Institute of Technology at Utica-Rome; Term: Unknown 1989;
Typology: Study notes
1 / 13
This page cannot be seen from the preview
Don't miss anything!
TCP. An introduction http://www.ssfnet.org/Exchange/tcp/ tcpTutorialNotes.html#TO Basics. Connection-oriented, end-to-end (port-to-port) protocol at the Transport layer. ● Reliable byte-stream service. ● Full-duplex (byte-stream both ways) ● Includes flow-control mechanism to limit transmission from sender to receiver ● MSS = Maximum Segment Size in bytes ● Also implements congestion control ● TCP communication via sockets at each end. Each socket is (IP_address, port_number).
Stream service: TCP groups data into segments, and then send segments down to IP for transfer. What should be optimal segment size? Reliability: TCP attaches sequence numbers to its generated segments. The receiver TCP sends ACKs based on segments received correctly. Flow-control: Receiver TCP sends the current seq. # with the latest ACK and indicates volume of receiver segment window to receive segments (to be received) ensuring that buffer overflow and time-outs at the other end do not occur. Multiplexing: Single host may support many different flows with different (address, port) pairs multiplexed on each individual socket-socket pair. Logical Connections: For each (sender, receiver) TCP- flow, the maintained data structure includes: Sender Socket Receiver Socket TCP flow Multiple flows to same destination
Lets consider now TCP related issues.
Towards getting TCP to work optimally We are marked by a unique High Performance Computing (HPC) Environment where the Internet (and internets) run. ■The Internet is being optimized for an environment like millions of users behind slow-speed vehicles thousands of high-bandwidth servers serving millions of such slow-speed drivers ■Single high-speed to high-speed flows get little commercial attention. What's on the Internet? ● Well over 90% of it is TCP ● Most flows are less than 30 packets long TCP Throughput Limit # ● Delivered bps <= available bandwidth (unused bandwidth on slowest speed link determines your delivered throughput) Things You Can Do ●Throw out your low speed interfaces and networks! ● Make sure Routes and DNS report high-speed interaces
A TCPTune type system should be looked into for your operation. Example. A TCP Stack Tuner for Windows (the one identified here is for Win98) http://moat.nlanr.net/Software/TCPtune ● Makes sure high performance parameters are set ● Many such utilities for modems, e.g. DunTweak, but they reduce performance on high speed networks ● Path Performance: Latency vs. Bandwidth The highest bandwidth path is not always the highest throughput path! ●Consider using a Windowed Ping for performance measure. This sends windows full of ICMP Echo or UDP Port unreachable packets ♦ shows packet throughput and loss under varying load (evidently more than normal ping) TCP and its support evolution TCP, RFC793, Sep 1981 4.3 BSD-Reno, June 1990 (thought it’d be a gamble to use this when proposed; hence, the prefix after Reno, Nevada) Path MTU Discovery, RFC1191, Nov 1990 (Discover the minimum of Max Transmission Unit on the end-to-end path & reduce packets to
this size) Window Scale, PAWS, RFC1323, May 1992 (TCP Option 3 for window size expansion (from 16 to 32 bits) that would be supplied only with the SYN segment. PAWS is Protection Against Warped Sequence in dealing with Time-stamps) SACK, RFC2018, Oct 1996 (Selective ACK option for TCP. Check RFC. All commercial TCP implementations support SACK) NewReno, RFC 2582, April 1999 (This is widely implemented. This is about TCP response on “partial ACKs” and how to do fast transmit and fast recover even when several packets are not accounted for) More on the way! TCP/Reno ● Most modern TCP's are "Reno" based ● Reno defined (refined) four key mechanisms ** Slow Start ** Congestion Avoidance ** Fast Retransmit ** Fast Recovery
With an MSS of 1500 bytes, TCP throughput will have an upper bound of about 8.3 Mbps! And no, that is not a window size limitation, but rather one based on TCP's ability to detect and recover from congestion (loss). With 9000 byte frames, TCP throughput could reach about 50 Mbps. Things You Can Do ● Use only large MTU interfaces/routers/links ● Never reduce the MTU (or bandwidth) on the path between each/every host and the WAN ● Make sure your TCP uses Path MTU Discovery ● Compare your throughput to Treno Treno ● http://www.psc.edu/networking/treno_info.html ● Treno tells you what a good TCP should be able to achieve (Bulk Transfer Capacity) ● Easy 10 second test, no server require % treno xx.yy.zz.ww MTU=8166 MTU=4352 MTU=2002 MTU= .......... Replies were from [xx.yy.zz.ww] Average rate: 63470.5 kbp/s (55241 pkts in + 87 lost = 0.16%) in 10.03 s Equilibrium rate: 63851.9 kbp/s (54475 pkts in + 86 lost = 0.16%) in 9.828s Path properties: min RTT was 8.77 ms, path MTU was 1440 bytes XXX Calibration checks are still under construction, use -v
TCP Connection Establishment ● Three-way handshake SYN SYN + ACK ACK Things You Can Do ● Check your TCP for high performance features ● "Do the math" i.e. know what kind of throughput and loss to expect for your situation ● Look for sources of loss ● Watch out for duplex problems (late collisions?) "Do The Math" ● Calculate needed peak window in bytes. Note that is twice the window needed to fill just barely fill the link … Wb = 2RTTRb (Rb is the desired data rate in Bytes per second) ● Calculate needed window in packets.... Wp = Wb/MSS ● Calculate needed window scale.... Ws= ln2(Wb/64k) E.g. if Wb = 100kB, Ws= ● Calculate needed packet rate....
■ Cwnd During Slowstart ● cwnd increased by one for every new ACK ● cwnd doubles every round trip time ● cwnd is reset to zero after a loss Slowstart and Congestion Avoidance should be attempted together. In fact, that’s the rationale for Slowstart.