1 TCP: Reliable Transport Service. 2 Transmission Control Protocol (TCP) Major transport protocol used in Internet Heavily used Completely reliable transfer.

Slides:



Advertisements
Similar presentations
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets with Internet Applications, 4e By Douglas.
Advertisements

Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain Chapter 2 TCP/IP Fundamentals.
EE 4272Spring, 2003 Chapter 17 Transport Protocols Connection-Oriented Transport Protocol  Under Reliable Network Service  Design Issues  Under Unreliable.
CSCI 4550/8556 Computer Networks
Transmission Control Protocol (TCP)
Intermediate TCP/IP TCP Operation.
Guide to TCP/IP, Third Edition
IS333, Ch. 26: TCP Victor Norman Calvin College 1.
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.
1 TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
1 CS 4396 Computer Networks Lab Transmission Control Protocol (TCP) Part I.
TCP: Transmission Control Protocol Overview Connection set-up and termination Interactive Bulk transfer Timers Improvements.
EECC694 - Shaaban #1 lec #12 Spring Internet Transport Protocols Transmission Control Protocol (TCP):Transmission Control Protocol (TCP):
Copyright 1999, S.D. Personick. All Rights Reserved. Telecommunications Networking II Lecture 32 Transmission Control Protocol (TCP) Ref: Tanenbaum pp:
TDC365 Spring 2001John Kristoff - DePaul University1 Internetworking Technologies Transmission Control Protocol (TCP)
Spring 2000John Kristoff1 Transport Layer Computer Networks.
Autumn 2000John Kristoff1 Transport Layer Computer Networks.
CMPE 80N - Introduction to Networks and the Internet 1 CMPE 80N Spring 2003 Week 8 Introduction to Networks and the Internet.
TDC375 Winter 03/04 John Kristoff - DePaul University 1 Network Protocols Transmission Control Protocol (TCP)
Transport Layer3-1 Data Communication and Networks Lecture 7 Transport Protocols: TCP October 21, 2004.
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.
Ch 23 Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007.
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
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.
TRANSPORT LAYER T.Najah Al-Subaie Kingdom of Saudi Arabia Prince Norah bint Abdul Rahman University College of Computer Since and Information System NET331.
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.
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.
TCP Transport Control Protocol Information management 2 Groep T Leuven – Information department 2/35 Introduction UDP provides the connection.
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.
26-TCP Dr. John P. Abraham Professor UTPA. TCP  Transmission control protocol, another transport layer protocol.  Reliable delivery  Tcp must compensate.
University of the Western Cape Chapter 12: The Transport Layer.
SMUCSE 4344 transport layer. SMUCSE 4344 transport layer end-to-end protocols –transport code runs only on endpoint hosts encapsulates network communications.
Section 5: The Transport Layer. 5.2 CS Computer Networks John Mc Donald, Dept. of Computer Science, NUI Maynooth. Introduction In the previous section.
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.
Transport Layer Moving Segments. Transport Layer Protocols Provide a logical communication link between processes running on different hosts as if directly.
Transport Control Protocol (TCP) Features of TCP, packet loss and retransmission, adaptive retransmission, flow control, three way handshake, congestion.
Chapter 24 Transport Control Protocol (TCP) Layer 4 protocol Responsible for reliable end-to-end transmission Provides illusion of reliable network to.
Computer Networks23-1 PART 5 Transport Layer. Computer Networks23-2 Position of Transport Layer Responsible for the delivery of a message from one process.
ECE 4110 – Internetwork Programming
1 End-to-End Protocols User Datagram Protocol (UDP) Transmission Control Protocol(TCP)
4343 X2 – The Transport Layer Tanenbaum Ch.6.
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
1 Computer Communication & Networks Lecture 23 & 24 Transport Layer: UDP and TCP Waleed Ejaz
Data Communications and Networks Chapter 6 – IP, UDP and TCP ICT-BVF8.1- Data Communications and Network Trainer: Dr. Abbes Sebihi.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
CSEN 404 Transport Layer II Amr El Mougy Lamia AlBadrawy.
1 TCP ProtocolsLayer name DNSApplication TCP, UDPTransport IPInternet (Network ) WiFi, Ethernet Link (Physical)
Spring 2006 CPE : Transport Layer Overview2-1 Special Topics in Computer Engineering The Transport Layer in the Internet: Overview Some of these.
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
1 Chapter 24 Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
Introduction to Networks
Module 1 UDP & TCP.
Process-to-Process Delivery, TCP and UDP protocols
PART 5 Transport Layer Computer Networks.
Internet and Intranet Protocols and Applications
Dr. John P. Abraham Professor UTPA
Dr. John P. Abraham Professor UTPA
The Transmission Control Protocol (TCP)
Presentation transcript:

1 TCP: Reliable Transport Service

2 Transmission Control Protocol (TCP) Major transport protocol used in Internet Heavily used Completely reliable transfer

3 TCP Features Connection-oriented service Point-to-point Full-duplex communication Stream interface Stream divided into segments for transmission Each segment encapsulated in IP datagram Uses protocol ports to identify applications

4 TCP Feature Summary TCP provides a completely reliable (no data duplication or loss), connection-oriented, full- duplex stream transport service that allows two application programs to form a connection, send data in either direction, and then terminate the connection.

5 End-to-End Protocol

6 Apparent Contradiction IP offers best-effort (unreliable) delivery TCP uses IP TCP provides completely reliable transfer How is this possible?

7 Achieving Reliability Reliable connection startup Reliable data transmission Graceful connection shutdown

8 Reliable Data Transmission Positive acknowledgment –Receiver returns short message when data arrives –Called acknowledgment Retransmission –Sender starts timer whenever message is transmitted –If timer expires before acknowledgment arrives, sender retransmits message

9 Illustration Of Retransmission

10 How Long Should TCP Wait Before Retransmitting? Time for acknowledgment to arrive depends on –Distance to destination –Current traffic conditions Multiple connections can be open simultaneously Traffic conditions change rapidly

11 Important Point The delay required for data to reach a destination and an acknowledgment to return depends on traffic in the internet as well as the distance to the destination. Because it allows multiple application programs to communicate with multiple destinations concurrently, TCP must handle a variety of delays that can change rapidly.

12 Solving The Retransmission Problem Keep estimate of round trip time on each connection Use current estimate to set retransmission timer Known as adaptive retransmission Key to TCP’s success

13 Illustration Of Adaptive Retransmission Timeout depends on current round-trip estimate

14 TCP Flow Control Receiver –Advertises available buffer space –Called window Sender –Can send up to entire window before ack arrives

15 Window Advertisement Each acknowledgment carries new window information –Called window advertisement –Can be zero (called closed window) Interpretation: have received up through X, and can take Y more octets

16 Illustration Of Window Advertisement A TCP acknowledgement specifies the sequence number of the next octet that the receiver expects to receive

17 Startup And Shutdown Connection startup –Must be reliable Connection shutdown –Must be graceful Difficult

18 Why Startup And Shutdown Are Difficult Segments can be –Lost –Duplicated –Delayed –Delivered out of order –Either side can crash –Either side can reboot Need to avoid duplicate shutdown message from affecting later connection

19 TCP’s Solution For Startup/Shutdown Uses three-message exchange Known as 3-way handshake Necessary and sufficient for –Unambiguous, reliable startup –Unambiguous, graceful shutdown SYN used for startup FIN used for shutdown

20 Connection Establishment – Three- way Handshake Active participant (client) Passive participant (server) SYN, SequenceNum = x ACK, Acknowledgment =y+1 Acknowledgment =x+1 SYN+ACK, SequenceNum=y,

21 Closing a TCP Connection

22 TCP Segment Format All TCP segments have same format –Data –Acknowledgment –SYN (startup) –FIN (shutdown) Segment divided into two parts –Header –Payload area (zero or more bytes of data)

23 TCP Segment Format (continued) Header contains –Protocol port numbers to identify Sending application Receiving application –Code bits to specify items such as SYN FIN ACK –Fields for window advertisement, acknowledgment, etc.

24 Illustration Of TCP Segment Sequence number specifies where in stream outgoing data belongs Acknowledgment number refers to incoming data Few segments contain options

25 Checksum = 1s complement sum of the 1s complement of 4-bit quantities. 1s complement of 1111, 0000, 1100, 0101, 1000 is 0000, 1111, 0011, 1010, s complement sum: = = (carry) = = = (carry) = 0101 Ans: Checksum = 0101 Checksum - One Example

26 Flow Control And Congestion Receiver advertises window that specifies how many additional bytes it can accept Window size of zero means sender must not send normal data (ACKs and urgent data allowed) Sender chooses effective window smaller than receiver’s advertised window if congestion detected –Allowed_window = min(receiver_advertisement, congestion_window) –Congestion window is reduced by half for every loss – multiplicative decrease

27 TCP Congestion Control When CongWin is below Threshold, sender in slow- start phase, window grows exponentially. When CongWin is above Threshold, sender is in congestion-avoidance phase, window grows linearly. When timeout occurs, Threshold set to CongWin/2 and CongWin is set to 1 MSS (Maximum Segment Size). When a triple duplicate ACK occurs, Threshold set to CongWin/2 and CongWin set to Threshold. Additive Increase Multiplicative Decrease (AIMD)

28 TCP Congestion Control Q: When should the exponential increase switch to linear? A: When CongestionWindow gets to 1/2 of its value before timeout. Implementation: Variable Threshold At loss event, Threshold is set to 1/2 of CongWin just before loss event From Tanenbaum’s book, fourth edition, pp. 550