TCP/IP Performance COMT 429. © Hans Kruse, Ohio University 2 Protocol Overview Ethernet, X.25, HDLC etc. IP ICMP ARP RARP (Auxiliary Services) TCP UDP.

Slides:



Advertisements
Similar presentations
Data and Computer Communications Eighth Edition by William Stallings Lecture slides by Lawrie Brown Chapter 20 – Transport Protocols.
Advertisements

Introduction 1 Lecture 13 Transport Layer (Transmission Control Protocol) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer.
1 Transport Protocols & TCP CSE 3213 Fall April 2015.
Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain Chapter 2 TCP/IP Fundamentals.
CSCI 4550/8556 Computer Networks
Intermediate TCP/IP TCP Operation.
Guide to TCP/IP, Third Edition
Transport Layer3-1 TCP. Transport Layer3-2 TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 r full duplex data: m bi-directional data flow in same connection.
1 Transport Layer Lecture 9 Imran Ahmed University of Management & Technology.
Winter 2008CS244a Handout #61 CS244a: An Introduction to Computer Networks Handout 6: The Transport Layer, Transmission Control Protocol (TCP), and User.
TCP: Transmission Control Protocol Overview Connection set-up and termination Interactive Bulk transfer Timers Improvements.
BZUPAGES.COM 1 User Datagram Protocol - UDP RFC 768, Protocol 17 Provides unreliable, connectionless on top of IP Minimal overhead, high performance –No.
Computer Networks 2 Lecture 2 TCP – I - Transport Protocols: TCP Segments, Flow control and Connection Setup.
1 TCP CSE May TCP Services Flow control Connection establishment and termination Congestion control 2.
School of Information Technologies TCP Congestion Control NETS3303/3603 Week 9.
Transport Layer 3-1 outline r TCP m segment structure m reliable data transfer m flow control m congestion control.
Transport Layer 3-1 Fast Retransmit r time-out period often relatively long: m long delay before resending lost packet r detect lost segments via duplicate.
TDC365 Spring 2001John Kristoff - DePaul University1 Internetworking Technologies Transmission Control Protocol (TCP)
Transport Layer 3-1 Outline r TCP m Congestion control m Flow control.
Transport Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
Transport Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
TDC375 Winter 03/04 John Kristoff - DePaul University 1 Network Protocols Transmission Control Protocol (TCP)
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Transport Protocols Slide 1 Transport Protocols.
1 K. Salah Module 6.1: TCP Flow and Congestion Control Connection establishment & Termination Flow Control Congestion Control QoS.
TCP. Learning objectives Reliable Transport in TCP TCP flow and Congestion Control.
EE 4272Spring, 2003 Chapter 17 Transport Protocols Connection-Oriented Transport Protocol  Reliable Network Service: Design Issues  Unreliable Network.
Gursharan Singh Tatla Transport Layer 16-May
TRANSPORT LAYER T.Najah Al-Subaie Kingdom of Saudi Arabia Prince Norah bint Abdul Rahman University College of Computer Since and Information System NET331.
Lect3..ppt - 09/12/04 CIS 4100 Systems Performance and Evaluation Lecture 3 by Zornitza Genova Prodanoff.
1 Transport Layer Computer Networks. 2 Where are we?
Data Transfer Case Study: TCP  Go-back N ARQ  32-bit sequence # indicates byte number in stream  transfers a byte stream, not fixed size user blocks.
IP and Errors IP Best Effort Datagrams can be: –Lost –Delayed –Duplicated –Delivered out of order –Corrupted.
COMT 4291 Communications Protocols and TCP/IP COMT 429.
Copyright © Lopamudra Roychoudhuri
3: Transport Layer3b-1 TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 r full duplex data: m bi-directional data flow in same connection m MSS: maximum.
TCOM 509 – Internet Protocols (TCP/IP) Lecture 04_b Transport Protocols - TCP Instructor: Dr. Li-Chuan Chen Date: 09/22/2003 Based in part upon slides.
1 Transport Protocols (continued) Relates to Lab 5. UDP and TCP.
TCP : Transmission Control Protocol Computer Network System Sirak Kaewjamnong.
26-TCP Dr. John P. Abraham Professor UTPA. TCP  Transmission control protocol, another transport layer protocol.  Reliable delivery  Tcp must compensate.
CS332, Ch. 26: TCP Victor Norman Calvin College 1.
SMUCSE 4344 transport layer. SMUCSE 4344 transport layer end-to-end protocols –transport code runs only on endpoint hosts encapsulates network communications.
Transport Layer Moving Segments. Transport Layer Protocols Provide a logical communication link between processes running on different hosts as if directly.
Chapter 12 Transmission Control Protocol (TCP)
CSE679: Computer Network Review r Review of the uncounted quiz r Computer network review.
Chapter 5 Peer-to-Peer Protocols and Data Link Layer PART I: Peer-to-Peer Protocols ARQ Protocols and Reliable Data Transfer Flow Control.
1 CS 4396 Computer Networks Lab TCP – Part II. 2 Flow Control Congestion Control Retransmission Timeout TCP:
Transport Layer3-1 Chapter 3 outline r 3.1 Transport-layer services r 3.2 Multiplexing and demultiplexing r 3.3 Connectionless transport: UDP r 3.4 Principles.
ECE 4110 – Internetwork Programming
Data Transfer Case Study: TCP  Go-back N ARQ  32-bit sequence # indicates byte number in stream  transfers a byte stream, not fixed size user blocks.
Guide to TCP/IP Fourth Edition
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Congestion Control 0.
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
UDP : User Datagram Protocol 백 일 우
Transmission Control Protocol (TCP) connection-oriented stream data transfer data sent as an unstructured stream of bytes reliability acknowledgements.
McGraw-Hill Chapter 23 Process-to-Process Delivery: UDP, TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
Transmission Control Protocol (TCP) TCP Flow Control and Congestion Control CS 60008: Internet Architecture and Protocols Department of CSE, IIT Kharagpur.
1 TCP ProtocolsLayer name DNSApplication TCP, UDPTransport IPInternet (Network ) WiFi, Ethernet Link (Physical)
Chapter 5 Peer-to-Peer Protocols and Data Link Layer Timing Recovery.
Chapter 3 Transport Layer
DMET 602: Networks and Media Lab
Chapter 3 outline 3.1 transport-layer services
Introduction to Networks
TCP.
Magda El Zarki Professor, ICS UC, Irvine
Transport Layer Unit 5.
Lecture 18 – More TCP & Congestion Control
Process-to-Process Delivery: UDP, TCP
Presentation transcript:

TCP/IP Performance COMT 429

© Hans Kruse, Ohio University 2 Protocol Overview Ethernet, X.25, HDLC etc. IP ICMP ARP RARP (Auxiliary Services) TCP UDP HTTP (WWW) Remote Login File Transfer ATM

© Hans Kruse, Ohio University 3 Connection Types in TCP/IP Data Link Layer and Physical Network Network Layer Transport Layer TCP: Connection Oriented UDP: Connection-less Connection-less Depends on the network

© Hans Kruse, Ohio University 4 Real Networks Include many different types of circuits –Different speeds –Some LAN, some Wide-Area connections Rely on routers to connect the different sub- networks Routers are not expected to have detailed knowledge about the traffic flows they are handling

© Hans Kruse, Ohio University 5 Network Knowledge and Lack Thereof End Systems –Know the applications they are running –Often know the network capacity they would like to have –Do not know the actual network capacity available –Do not know the “competition”, i.e. other network users’ traffic

© Hans Kruse, Ohio University 6 Network Knowledge and Lack Thereof Routers –Know the capacity of the links they are attached to –Do not know much about the network farther away from them –Do not know the complete path taken by the packets handled in the router –Do not know (from the network traffic itself) what the applications’ needs are

© Hans Kruse, Ohio University 7 Routers Must cope with packet flows that may exceed the available capacity on their outbound route –Short-term this indicates randomness in the traffic and we need to deal with it –If the overload persists long-term we call it congestion, and we would like for it to go away Routers use queues to handle the short-term variations Long-term overload??

© Hans Kruse, Ohio University 8 Applications Should and often can adapt to the available capacity Should be fair in their use of resources, or Should identify themselves as high-capacity users (and compensate the network operator accordingly) Need information about the network and the capacity is can deliver

© Hans Kruse, Ohio University 9 In the ideal case Use a control protocol to communicate this information between applications and “the network” –Standard procedure in circuit switched and virtual circuit networks Telephone network Frame Relay and ATM –Increases overall complexity –Can provide a wide range of services really well

© Hans Kruse, Ohio University 10 The case of the Internet Successful because a transparent network encourages application development and deployment Because the network elements are simple –Reasonably low complexity –Great flexibility –Not much capability to communicate network information to applications

© Hans Kruse, Ohio University 11 Performance Issues Long term –Increase complexity and add QoS protocol layers –Throw capacity at the network faster than applications require it (good luck...) Short term –Implicit communication of congestion in the TCP protocol –Network performs many different functions, some better than others

© Hans Kruse, Ohio University 12 Application View Network attachment over which I dispatch my packets -- known Intermediate network –Contains many links and queues Application sees an overall “latency”, or delay between packet dispatch and receipt More precisely, applications can discover Round Trip Times

© Hans Kruse, Ohio University 13 Sliding Window 123M … 123M … 123M … Idle Time One “Cycle”

© Hans Kruse, Ohio University 14 In practice How is the sliding window mechanism used in TCP What control do we have over performance parameters Starting with a quick TCP review...

© Hans Kruse, Ohio University 15 UDP Header Source PortDestination Port Length Checksum

© Hans Kruse, Ohio University 16 TCP Header Source PortDestination Port Sequence Number Acknowledgement Number Window (flow cntrl)misc Flags ChecksumUrgent Options

© Hans Kruse, Ohio University 17 TCP Connection Setup “Three-Way Handshake” –Send SYN packet –Wait for peer to return a SYN/ACK packet –Acknowledge the SYN/ACK packet

© Hans Kruse, Ohio University 18 TCP Connection Termination Send a FIN packet Wait to receive acknowledgement of FIN

© Hans Kruse, Ohio University 19 TCP Data Exchange Sequence Numbers - Sliding Window –Arbitrary initial setting –Labels the first byte of the segment Acknowledgements –Indicate the next byte the receiver is looking for, all previous bytes have been received.

© Hans Kruse, Ohio University 20 TCP Segment Size Originally Unlimited –IP fragments segments that are too large –Turned out to be very inefficient SYN packet can carry the MSS (Maximum Segment Size) option –Must be approved in the SYN/ACK –Default used if the option is not present

© Hans Kruse, Ohio University 21 TCP Sliding Window Operation Sender Receiver snd.unasnd.nxt snd.una +snd.wnd rcv.nxt +rcv.wnd snd.wnd (local to the Sender) rcv.wnd (Must tell the sender this value)

© Hans Kruse, Ohio University 22 Slow Start Congestion Control Idle Time Window doubles in each “cycle” Note: recent TCP amendments permit more than 1 initial segment

© Hans Kruse, Ohio University 23 The Congestion Collapse Problem Original TCP specs used the window for flow control, and retransmission after 2 round trip times Congestion of a link causes the timers to “go off” before an ack can be returned The network goes into steady state congestion where every segment is transmitted about three times

© Hans Kruse, Ohio University 24 Congestion Issues Slow Start - New Connection –Set send window to n*MSS (n <= 4) –Increase the window by MSS for each ack received –Exponential increase in send window size What is the limit? –Window size reached before full utilization –Path is overloaded and an intermediate router discards one or more packets

© Hans Kruse, Ohio University 25 Congestion Issues cont... Packet loss –may occur due to actual errors or congestion –TCP equates loss with congestion Congestion Avoidance, Timer Back-Off –Reduce send window to 1/2 of previous size for each retransmit (exponential back-off) –After a segment is retransmitted, set the new RTO timer for that segment to 2*RTO, up to a hard upper bound (2*MSL, Maximum Segment Life) (RTO = Retransmit Time-Out)

© Hans Kruse, Ohio University 26 Congestion Issues cont... Slow Start - After retransmission –Exponential slow-start up to 1/2 of the original window size –Increase the window by MSS for each send window ack’ed without loss –Linear increase in send window size

© Hans Kruse, Ohio University 27 What can we control Vendors –TCP implementation needs to follow most recent guidelines –TCP window size should be configurable Users –Control the TCP window –For each application (rare) –For the entire workstation (more likely)

© Hans Kruse, Ohio University 28 Tuning, cont. Network Administrator –Router Queues In Out In Out In Out In Out

© Hans Kruse, Ohio University 29 Optional Slides on TCP window operation

© Hans Kruse, Ohio University 30 Example... Sender Receiver Received and acked; not yet picked up by client Available receive window space Sent but no ack received yet Next segment to send Available window for further sends

© Hans Kruse, Ohio University 31 Segment Dispatch Dispatch segment to IP Set RTO (Retransmit Time Out) timer –Proportional to the Round Trip Time (RTT) Sender Sent but no ack received yet Next segment to send Available window for further sends

© Hans Kruse, Ohio University 32 Segment Receipt with Pickup Send Ack segment with Ack=2001 Window = 4000 Receiver Received and picked up by client Available receive window space

© Hans Kruse, Ohio University 33 Segment Receipt w/o Pickup Send Ack packet with Ack = 2001 Window = 3500 Receiver Received and picked up by client Available receive window space Received but not picked up by client

© Hans Kruse, Ohio University 34 Acknowledgement Receipt Seg received with Ack=2001, Win=3500 –Left window edge to 2001 –Right window edge to 5501 Sender before after 5501

© Hans Kruse, Ohio University 35 Segment Receipt After Segment Loss Send a “duplicate” acknowledgement –Send Ack packet with Ack = 2001 –Window = 3500 Receiver Received and picked up by client Received but not picked up by client Last segment received Missing segment

© Hans Kruse, Ohio University 36 Retransmission Highest Ack Number received is 2001 –Duplicate Ack=2001 may have been received RTO timer for segment 2001 expires and 2001 is retransmitted –Trigger congestion avoidance algorithm –We really want to avoid this because RTO is large Sender

© Hans Kruse, Ohio University 37 Retransmit Timing and Window Size - Single Error BDP (Bandwidth Delay Product) –Ethernet: 1ms * 10Mbps = 1250 bytes –Satcom T1: 500ms * 1.5Mbps = 94 kbytes Assume window size = BDP –RTO > 2*RTT –“Recovery Ack” after retransmit needs 1 RTT –Channel idles for length of RTO (“drained pipe”)

© Hans Kruse, Ohio University 38 Retransmission Timer Implementation Running estimate (based on Acks) of –Average RTT –RTT variance factor Exclude retransmissions Set RTO to RTT times RTT variance factor (with a hard upper bound) –Around 2 RTT for lightly loaded links –As high as 16 RTT for congested links

© Hans Kruse, Ohio University 39 Window Scaling 16 bit window field in the TCP header allows a maximum of 64 kbytes for the window. RFC 1323 defines the window scaling option: –Syn segment suggests a “scaling” factor –Ack/Syn approves –All window advertisements are scaled by that factor prior to use in TCP

© Hans Kruse, Ohio University 40 Window Scaling cont... Large windows cause an adjunct problem: sequence number reuse –RFC 1323 limits the window to about 1Gbyte to fit within the sequence number space –OC-12 will use all sequence numbers in about 28 sec. –Segements can “live” in the network for 120 sec

© Hans Kruse, Ohio University 41 Fast Retransmit Duplicate Ack=2001 have been received Re-send segment 2001 before RTO expires –“Guess” that 2001 was lost –Wait for >=3 dup acks (segements could just have arrived out-of-order) –Enter congestion avoidance with allowance for duplicate acks Sender

© Hans Kruse, Ohio University 42 Selective Acknowledgement Enabled during Syn and Syn/Ack Receiver send segment with –Ack = 2001, Window = 3500 –SACK option: block start=2501, end=2600 Receiver Last segment received Missing Segment