TDC375 Winter 03/04 John Kristoff - DePaul University 1 Network Protocols Transmission Control Protocol (TCP)

Slides:



Advertisements
Similar presentations
Introduction 1 Lecture 13 Transport Layer (Transmission Control Protocol) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer.
Advertisements

1 Transport Protocols & TCP CSE 3213 Fall April 2015.
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets with Internet Applications, 4e By Douglas.
CSCI 4550/8556 Computer Networks
Transmission Control Protocol (TCP)
Guide to TCP/IP, Third Edition
NET0183 Networks and Communications Lecture 28 TCP: a transport layer protocol... the story continues... Sagan halda áfram 8/25/20091 NET0183 Networks.
Chapter 12 Transport protocols. Outline 12.1 introduction 12.2 TCP/IP protocol suite.
1 TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Winter 2008CS244a Handout #61 CS244a: An Introduction to Computer Networks Handout 6: The Transport Layer, Transmission Control Protocol (TCP), and User.
Provides a reliable unicast end-to-end byte stream over an unreliable internetwork.
BZUPAGES.COM 1 User Datagram Protocol - UDP RFC 768, Protocol 17 Provides unreliable, connectionless on top of IP Minimal overhead, high performance –No.
1 TCP CSE May TCP Services Flow control Connection establishment and termination Congestion control 2.
- Reliable Stream Transport Service
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)
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
Autumn 2000John Kristoff1 Transport Layer Computer Networks.
Computer Networks Transport Layer. Topics F Introduction  F Connection Issues F 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.
What Can IP Do? Deliver datagrams to hosts – The IP address in a datagram header identify a host IP treats a computer as an endpoint of communication Best.
1 Chapter Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
1 Transport Layer Computer Networks. 2 Where are we?
COMT 4291 Communications Protocols and TCP/IP COMT 429.
Copyright © Lopamudra Roychoudhuri
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.
SMUCSE 4344 transport layer. SMUCSE 4344 transport layer end-to-end protocols –transport code runs only on endpoint hosts encapsulates network communications.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 2.5 Internetworking Chapter 25 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
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)
1 TCP: Reliable Transport Service. 2 Transmission Control Protocol (TCP) Major transport protocol used in Internet Heavily used Completely reliable transfer.
Copyright © Lopamudra Roychoudhuri
Chapter 24 Transport Control Protocol (TCP) Layer 4 protocol Responsible for reliable end-to-end transmission Provides illusion of reliable network to.
Computer Networking Lecture 18 – More TCP & Congestion Control.
TCP: Transmission Control Protocol Part II : Protocol Mechanisms Computer Network System Sirak Kaewjamnong Semester 1st, 2004.
1 CS 4396 Computer Networks Lab TCP – Part II. 2 Flow Control Congestion Control Retransmission Timeout TCP:
1 TCP Timeout And Retransmission Chapter 21 TCP sets a timeout when it sends data and if data is not acknowledged before timeout expires it retransmits.
1 Computer Networks Congestion Avoidance. 2 Recall TCP Sliding Window Operation.
ECE 4110 – Internetwork Programming
TCP Timeout and Retransmission
TCP continued. Discussion – TCP Throughput TCP will most likely generate the saw tooth type of traffic. – A rough estimate is that the congestion window.
1 End-to-End Protocols User Datagram Protocol (UDP) Transmission Control Protocol(TCP)
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
Transport Layer3-1 Transport Layer If you are going through Hell Keep going.
Data Communications and Networks Chapter 6 – IP, UDP and TCP ICT-BVF8.1- Data Communications and Network Trainer: Dr. Abbes Sebihi.
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)
Two Transport Protocols Available Transmission Control Protocol (TCP) User Datagram Protocol (UDP) Provides unreliable transfer Requires minimal – Overhead.
Karn’s Algorithm Do not use measured RTT to update SRTT and SDEV Calculate backoff RTO when a retransmission occurs Use backoff RTO for segments until.
3. END-TO-END PROTOCOLS (PART 1) Rocky K. C. Chang Department of Computing The Hong Kong Polytechnic University 22 March
1 Chapter 24 Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
TCP - Part II Relates to Lab 5. This is an extended module that covers TCP flow control, congestion control, and error control in TCP.
Instructor Materials Chapter 9: Transport Layer
Introduction to Networks
Module 1 UDP & TCP.
Computer Networks Bhushan Trivedi, Director, MCA Programme, at the GLS Institute of Computer Technology, Ahmadabad.
Transport Layer Unit 5.
Chapter 5 TCP Transmission Control
TCP - Part II Relates to Lab 5. This is an extended module that covers TCP flow control, congestion control, and error control in TCP.
TCP: Transmission Control Protocol Part II : Protocol Mechanisms
Presentation transcript:

TDC375 Winter 03/04 John Kristoff - DePaul University 1 Network Protocols Transmission Control Protocol (TCP)

TDC375 Winter 03/04 John Kristoff - DePaul University 1 IP review IP provides just enough connected-ness Global addressing Hop-by-hop routing IP over everything Ethernet, ATM, X.25, fiber, etc. Minimizes network state Unreliable datagram forwarding

TDC375 Winter 03/04 John Kristoff - DePaul University 1 TCP key features Sequencing Byte-stream delivery Connection-oriented Reliability Flow-control Congestion avoidance

TDC375 Winter 03/04 John Kristoff - DePaul University 1 TCP feature summary Provides a completely reliable (no data duplication or loss), connection-oriented, full-duplex byte stream transport service that allows two application programs to form a connection, send data in either direction simultaneously and then terminate the connection.

TDC375 Winter 03/04 John Kristoff - DePaul University 1 Apparent contradiction IP offers best effort (unreliable) delivery TCP uses IP TCP provides completely reliable transfer How is this possible?

TDC375 Winter 03/04 John Kristoff - DePaul University 1 Achieving reliability Reliable connection start-up Reliable data transfer Sender starts a timer Receiver sends ACK when data arrives Sender retransmits if timer expires before ACK is returned Reliable connection shutdown

TDC375 Winter 03/04 John Kristoff - DePaul University 1 Reliability illustrated

TDC375 Winter 03/04 John Kristoff - DePaul University 1 When do you retransmit? The time for an ACK to return depends on: Distance between endpoints (propagation delay) Network traffic conditions (congestion) End system conditions (CPU, buffers) Packets can be lost, damaged or fragmented Network traffic conditions can change rapidly

TDC375 Winter 03/04 John Kristoff - DePaul University 1 Solving retransmission problem Keep running average of round trip time (RTT) Current average determines retransmission timer This is known as adaptive retransmission This is key to TCP's success How does each RTT sample affect the average? What weight to you give each sample? Higher weight means timer changes quickly Lower weight means timer changes slowly

TDC375 Winter 03/04 John Kristoff - DePaul University 1 Adaptive retransmission illustrated

TDC375 Winter 03/04 John Kristoff - DePaul University 1 Flow control Match the sending rate with allowable receiver rate TCP uses a sliding window Receiver advertises available buffer space Also known as the window Sender can transmit a full window without receiving an ACK for that transmitted data Ideally the window size allows pipe to remain full

TDC375 Winter 03/04 John Kristoff - DePaul University 1 Window size advertisement Each ACK carries receiver's current window size Called the window advertisement If zero, window is closed, no data can be sent Interpretation of window advertisement: Receiver: I can accept X octets or less unless I tell you otherwise

TDC375 Winter 03/04 John Kristoff - DePaul University 1 Window size illustrated

TDC375 Winter 03/04 John Kristoff - DePaul University 1 Window size: another picture

TDC375 Winter 03/04 John Kristoff - DePaul University 1 Byte stream sequencing Each segment carries a sequence number Sequencing helps ensure in order delivery TCP sequence numbers are fixed at 32 bits Byte stream is not limited to 2 32 bytes Sequence number space can wrap Each side has an initial sequence number (ISN) Exchanged during connection establishment Receiver ACKs cumulative octets (bytes)

TDC375 Winter 03/04 John Kristoff - DePaul University 1 TCP segment illustrated

TDC375 Winter 03/04 John Kristoff - DePaul University 1 Application multiplexing OS independent identifier for a network process Each application assigned a unique 16-bit integer Called a port number Server applications Use standard, well-known port numbers Usually low numbered port numbers Clients Obtain unused number from protocol software Usually uses high numbered port numbers

TDC375 Winter 03/04 John Kristoff - DePaul University 1 TCP connection start-up The three-way handshake used Servers use a passive open Application sits waiting on an open port Clients use an active open Application requests a connection to server Initial sequence number (ISN) exchange is the primary goal Other parameters/options can also be exchanged e.g. Window scale, maximum segment size, etc.

TDC375 Winter 03/04 John Kristoff - DePaul University 1 3-way handshake illustrated

TDC375 Winter 03/04 John Kristoff - DePaul University 1 Connection shutdown illustrated

TDC375 Winter 03/04 John Kristoff - DePaul University 1 Congestion principles Flow control Matching the sending and receiving rates Congestion control Active response to network overload conditions End hosts cannot control congestion per se Network devices (routers) do this Congestion avoidance Cautionary response to presumed conditions TCP does this

TDC375 Winter 03/04 John Kristoff - DePaul University 1 TCP congestion control Recall sliding window (advertised window) Receiver based control of sending rate Congestion window is sender based control Sender transmits min(cwnd, advertised window) This value is the transmission window TCP sender infers network conditions and adjusts

TDC375 Winter 03/04 John Kristoff - DePaul University 1 TCP retransmission TCP starts timer after sending a segment If ACK returns, reset timer If time-out occurs, retransmit and increase timer This is a back-off process Can't retransmit forever, need some upper bound Eventually TCP would give up Maximum time-out must be at least 60 seconds

TDC375 Winter 03/04 John Kristoff - DePaul University 1 Estimating round trip time (RTT) TCP measures RTT for which to calculate timers If ACKs return quickly, timers should be short If loss occurs, recovery happens quickly If ACKs return slowly, timers should be long If delays occur, retransmits not sent needlessly Keep a smoothed running average of RTT Smoothed RTT used to adjust retransmit timer Karn's algorith says ignore ACKs of retransmits

TDC375 Winter 03/04 John Kristoff - DePaul University 1 TCP slow start Recall that min(cwnd,awnd) = transmission window Rather than sending a full window at start-up... Initialize cwnd to 1 maximum segment size (MSS) Increase cwnd by 1 MSS for every ACK returned Obviously don't go past advertised window! This can actually be quite fast, exponential!

TDC375 Winter 03/04 John Kristoff - DePaul University 1 TCP slow start illustrated

TDC375 Winter 03/04 John Kristoff - DePaul University 1 TCP congestion avoidance If a retransmission timer expires, slow down Set slow start threshold = transmission window x ½ This is sshthresh Set cwnd back to 1 MSS Transmit min(cwnd, advertised window) as usual Do slow start until transmission window = sshtresh Thereafter, increase cwnd by 1/cwnd per ACK Linear increase instead of exponential

TDC375 Winter 03/04 John Kristoff - DePaul University 1 Congestion avoidance illustrated

TDC375 Winter 03/04 John Kristoff - DePaul University 1 Duplicate ACKs Recall ACKs acknowledge cumulative octets TCP receiver sends an immediate ACK if it receives an out-of-order segment This is a duplicate ACK This dupe ACK informs the sender and tells it what sequence number the receiver expected Its unclear whether dupe ACKs indicate loss or simply packet re-ordering on the network But, multiple duplicate ACKs probably indicate loss

TDC375 Winter 03/04 John Kristoff - DePaul University 1 TCP fast retransmit If sender gets >=3 dupe ACKs, assume loss Immediately retransmit, don't wait for timer to expire Goto fast recovery

TDC375 Winter 03/04 John Kristoff - DePaul University 1 TCP fast recovery Duplicate ACKs indicate data is still flowing If there was a loss event, it was probably temporary Go directly to congestion avoidance Not all the way into slow start! Don't want to start off with just a 1 MSS window This is the fast recovery algorithm Minus a few minor details

TDC375 Winter 03/04 John Kristoff - DePaul University 1 Other TCP stuff Selective ACK (SACK) option Window scale option Timestamp option Persist timer (window probes) Silly window syndrome Keepalive timer Nagle algorithm