Transmission Control Protocol (TCP) connection-oriented stream data transfer data sent as an unstructured stream of bytes reliability acknowledgements.

Slides:



Advertisements
Similar presentations
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Advertisements

© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 OSI Transport Layer Network Fundamentals – Chapter 4.
CSCI 4550/8556 Computer Networks
CS 6401 Transport Control Protocol Outline TCP objectives revisited TCP basics New algorithms for RTO calculation.
1 Transport Layer Lecture 9 Imran Ahmed University of Management & Technology.
1 CS492B Project #2 TCP Tutorial # Jin Hyun Ju.
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.
1 CS 4396 Computer Networks Lab Transmission Control Protocol (TCP) Part I.
CS551: Basic TCP Mechanisms Christos Papadopoulos (
BZUPAGES.COM 1 User Datagram Protocol - UDP RFC 768, Protocol 17 Provides unreliable, connectionless on top of IP Minimal overhead, high performance –No.
1 Reliable Byte-Stream (TCP) Outline Connection Establishment/Termination Sliding Window Revisited Flow Control Adaptive Timeout.
6-May-154/598N: Computer Networks End-to-End Protocols Underlying best-effort network –drop messages –re-orders messages –delivers duplicate copies of.
Computer Networks 2 Lecture 2 TCP – I - Transport Protocols: TCP Segments, Flow control and Connection Setup.
CSE Computer Networks Prof. Aaron Striegel Department of Computer Science & Engineering University of Notre Dame Lecture 14 – February 23, 2010.
Transport Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
Transport Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
Computer Networking Lecture 16 – More TCP
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Transport Protocols Slide 1 Transport Protocols.
TCP. Learning objectives Reliable Transport in TCP TCP flow and Congestion Control.
Transport Layer TCP and UDP IS250 Spring 2010
Spring 2002CS 4611 Reliable Byte-Stream (TCP) Outline Connection Establishment/Termination Sliding Window Revisited Flow Control Adaptive Timeout.
Gursharan Singh Tatla Transport Layer 16-May
1 Chapter Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
1 Transport Layer Computer Networks. 2 Where are we?
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.
Network Protocols: Design and Analysis Polly Huang EE NTU
TCP : Transmission Control Protocol Computer Network System Sirak Kaewjamnong.
TCP Lecture 13 November 13, TCP Background Transmission Control Protocol (TCP) TCP provides much of the functionality that IP lacks: reliable service.
SMUCSE 4344 transport layer. SMUCSE 4344 transport layer end-to-end protocols –transport code runs only on endpoint hosts encapsulates network communications.
ECE453 – Introduction to Computer Networks Lecture 14 – Transport Layer (I)
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.
The Transmission Control Protocol (TCP) Application Services (Telnet, FTP, , WWW) Reliable Stream Transport (TCP) Connectionless Packet Delivery.
Fall 2005 By: H. Veisi Computer networks course Olum-fonoon Babol Chapter 6 The Transport Layer.
1 Introduction to Computer Networks University of ilam Dr. Mozafar Bag-Mohammadi Transport Layer.
1 TCP: Reliable Transport Service. 2 Transmission Control Protocol (TCP) Major transport protocol used in Internet Heavily used Completely reliable transfer.
CSE679: Computer Network Review r Review of the uncounted quiz r Computer network review.
1 End-to-End Protocols (UDP, TCP, Connection Management)
Chapter 24 Transport Control Protocol (TCP) Layer 4 protocol Responsible for reliable end-to-end transmission Provides illusion of reliable network to.
Lecture 18 – More TCP & Congestion Control
Computer Networking Lecture 18 – More TCP & Congestion Control.
1 CS 4396 Computer Networks Lab TCP – Part II. 2 Flow Control Congestion Control Retransmission Timeout TCP:
© Jörg Liebeherr (modified by Malathi Veeraraghavan) 1 Overview Formats, Data Transfer, etc. Connection Management.
Transport Protocols.
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.
McGraw-Hill Chapter 23 Process-to-Process Delivery: UDP, TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1 End-to-End Protocols UDP TCP –Connection Establishment/Termination –Sliding Window Revisited –Flow Control –Congestion Control –Adaptive Timeout.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
11 CS716 Advanced Computer Networks By Dr. Amir Qayyum.
1 TCP ProtocolsLayer name DNSApplication TCP, UDPTransport IPInternet (Network ) WiFi, Ethernet Link (Physical)
1 Transmission Control Protocol (TCP) RFC: Introduction The TCP is intended to provide a reliable process-to-process communication service in a.
Two Transport Protocols Available Transmission Control Protocol (TCP) User Datagram Protocol (UDP) Provides unreliable transfer Requires minimal – Overhead.
3. END-TO-END PROTOCOLS (PART 1) Rocky K. C. Chang Department of Computing The Hong Kong Polytechnic University 22 March
Computer Networking Lecture 8 – TCP & Congestion Control.
Fast Retransmit For sliding windows flow control we waited for a timer to expire before beginning retransmission of a packet TCP uses an additional mechanism.
Introduction to Networks
5. End-to-end protocols (part 1)
TCP.
TCP - Part I Karim El Defrawy
TCP Overview Connection-oriented Byte-stream Full duplex
Lecture 18 – More TCP & Congestion Control
Reliable Byte-Stream (TCP)
State Transition Diagram
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
The Transmission Control Protocol (TCP)
Transport Protocols: TCP Segments, Flow control and Connection Setup
Introduction to Computer Networks
Transport Protocols: TCP Segments, Flow control and Connection Setup
Presentation transcript:

Transmission Control Protocol (TCP) connection-oriented stream data transfer data sent as an unstructured stream of bytes reliability acknowledgements and timeouts; allows devices to deal with lost, delayed, duplicate, or misordered packets efficient flow control when sending acknowledgements back to the source, the receiving TCP process indicates the highest sequence number it can receive without overflowing its internal buffers full duplex operation multiplexing

TCP Packet Format

Connection Establishment InitiatorReceiver Send SYN(seq=x) Recv SYN(seq=x) Send SYN(seq=y) ACK(x+1) Recv SYN (seq=y) ACK(x+1) Send ACK(y+1) Recv ACK(y+1)

TCP Sliding Window each packet includes both the acknowledgement number (which byte is expected next), and the window length (how much buffer space the packet sender has available) this allows for efficient use of bandwidth

Application Layer Protocols FTP. Moves files SNMP. Provides a mechanism for managing networks Telnet. Allows remote logins NFS, XDR. Enables file sharing RPC. Enables multiprocessing—allows a single program to run on multiple computers X Windows. Allows graphical applications to run remotely SMTP, POP, IMAP. Enable electronic mail DNS. Enables distributed directory services HTTP. Makes the World Wide Web work.

Overview TCP mechanisms Congestion control End-to-end (host based) Router-based

Introduction to TCP Communication abstraction: Reliable Ordered Point-to-point Byte-stream Protocol implemented entirely at the ends Assumes unreliable, non-sequenced delivery Fate sharing

TCP Reliability Mechanism SenderReceiver ack data lost ack

TCP Header Source portDestination port Sequence number Acknowledgement Advertised window Hdr len Flags 0 ChecksumUrgent pointer Options (variable) Data Flags: SYN FIN RESET PUSH URG ACK

TCP Mechanisms Connection establishment Sequence number selection Connection tear-down Round-trip estimation Window flow control

Connection Establishment AB Aseqn Bseqn ACK AB SYN SYN+ACK-A ACK-B A and B must agree on initial sequence number selection: Use 3-way handshake

Connection Setup

Sequence Number Selection Initial sequence number (ISN) selection Why not simply chose 0? Must avoid overlap with earlier incarnation Requirements for ISN selection Must operate correctly Without synchronized clocks Despite node failures

ISN and Quiet Time Use local clock to select ISN Clock wraparound must be greater than max segment lifetime (MSL) Upon startup, cannot assign sequence numbers for MSL seconds Can still have sequence number overlap If sequence number space not large enough for high- bandwidth connections

Connection Tear-down Normal termination Allow unilateral close Avoid sequence number overlap TCP must continue to receive data even after closing Cannot close connection immediately: what if a new connection restarts and uses same sequence number?

Tear-down Packet Exchange SenderReceiver FIN FIN-ACK FIN FIN-ACK Data write Data ack

Connection Tear-down

Detecting Half-open Connections

TIME-WAIT Assassination

Round-trip Time Estimation Wait at least one RTT before retransmitting Importance of accurate RTT estimators: Low RTT -> unneeded retransmissions High RTT -> poor throughput RTT estimator must adapt to change in RTT But not too fast, or too slow!

Initial Round-trip Estimator Round trip times exponentially averaged: New RTT =  (old RTT) + (1 -  ) (new sample) Recommended value for  : Retransmit timer set to  RTT, where  = 2 Every time timer expires, RTO exponentially backed-off

Retransmission Ambiguity AB ACK Sample RTT AB Original transmission retransmission Sample RTT Original transmission retransmission ACK

Karn’s Retransmission Timeout Estimator Accounts for retransmission ambiguity If a segment has been retransmitted: Don’t count RTT sample on ACKs for this segment Keep backed off time-out for next packet Reuse RTT estimate only after one successful transmission

Jacobson’s Retransmission Timeout Estimator Key observation: Using  RTT for timeout doesn’t work At high loads round trip variance is high Solution: If D denotes mean variation Timeout = RTT + 4D

Flow Control Fast sender can overrun receiver: Packet loss, unnecessary retransmissions Possible solutions: Sender transmits at pre-negotiated rate Sender limited to a window’s worth of unacknowledged data Flow control different from congestion control

Window Flow Control: Send Sent but not ackedNot yet sent window Sequence numbers Next to be sent

Window Flow Control: Receive Acked but not delivered to user Not yet acked Receive buffer Sequence numbers Gapwindow

TCP Extensions Implemented using TCP options Timestamp Protection from sequence number wraparound Large windows

Timestamp Extension Used to improve timeout mechanism by more accurate measurement of RTT When sending a packet, insert current timestamp into option Receiver echoes timestamp in ACK

Protection From Wraparound Wraparound time vs. Link speed: 1.5mbps: 6.4 hours 10mbps: 57 minutes 45mbps: 13 minutes 100mbps: 6 minutes 622mbps: 55 seconds 1.2gbps: 28 seconds Use timestamp to distinguish sequence number wraparound

Large Windows Apply scaling factor to advertised window Specifies how many bits window must be shifted to the left Scaling factor exchanged during connection setup