We think you have liked this presentation. If you wish to download it, please recommend it to your friends in any social system. Share buttons are a little bit lower. Thank you!
Presentation is loading. Please wait.
Published byEdgar Dicker
Modified about 1 year ago
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets with Internet Applications, 4e By Douglas E. Comer Lecture PowerPoints By Lami Kaya, LKaya@ieee.org
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.2 Chapter 25 TCP: Reliable Transport Service
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.3 Topics Covered 25.1 Introduction 25.2 The Need For Reliable Transport 25.3 The Transmission Control Protocol 25.4 The Service TCP Provides To Applications 25.5 End-To-End Service And Datagrams 25.6 Achieving Reliability 25.7 Packet Loss And Retransmission 25.8 Adaptive Retransmission 25.9 Comparison Of Retransmission Times 25.10 Buffers, Flow Control, And Windows 25.11 Three-Way Handshake 25.12 Congestion Control 25.13 TCP Segment Format
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.4 25.1 Introduction This chapter examines TCP, the major transport protocol in TCP/IP explains how the protocol provides reliable delivery TCP uses the unreliable datagram service offered by IP –But it provides a reliable data delivery service to applications TCP must compensate for loss or delay in an internet to provide efficient data transfer –without overloading the underlying NWs and routers
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.5 25.2 The Need For Reliable Transport Programmers would like conventional reliability techniques –when creating applications for the Internet SW in the internet must provide the same semantics as a conventional computer system SW must guarantee prompt and reliable communication –data must be delivered in exactly the same order that the data was sent –and there must be no loss or duplication
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.6 25.3 The Transmission Control Protocol Reliability is the responsibility of a transport protocol Applications interact with a transport service to send and receive data In the TCP/IP suite, the Transmission Control Protocol (TCP) provides reliable transport service
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.7 25.4 The Service TCP Provides To Applications TCP has seven major features: Connection Orientation Point-To-Point Communication –Each TCP connection has exactly two endpoints Complete Reliability –Data will be delivered exactly as it was sent –No data missing or out of order Full Duplex Communication –TCP can buffer outgoing and incoming data in both directions
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.8 25.4 The Service TCP Provides To Applications (cont) Stream Interface –an application sends a continuous sequence of octets –TCP does not provide a notion of records Reliable Connection Startup –TCP requires that when two applications create a connection, both must agree to the new connection, avoiding duplicates Graceful Connection Shutdown –TCP guarantees to deliver all the data reliably before closing the connection
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.9 25.5 End-To-End Service And Datagrams TCP is called an end-to-end protocol –because it provides a connection directly from an application on one computer to an application on a remote computer The connections provided by TCP –called “virtual connections" because they are achieved in SW The concept is shown in Fig.25.1 The underlying internet system does not provide HW or SW support for connections Each TCP message is encapsulated in an IP datagram
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.10
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.11 25.6 Achieving Reliability The major problems are: –unreliable delivery by the underlying communication system –and computer reboot Any message can be lost, duplicated, delayed, or delivered out of order –Messages must be unambiguous, or the protocol will accept duplicate messages from the old connection Two application programs establish a connection and then one of the computers is rebooted? –the computer that reboots has no knowledge of the connection, –the computer that did not reboot considers the connection valid
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.12 25.7 Packet Loss And Retransmission How does TCP achieve reliability? Most important techniques is using retransmission (RET) –When TCP receives data it sends an acknowledgement (ACK) –Whenever it sends data TCP starts a timer –If the timer expires before an ACK arrives the sender RETs the data How long should TCP wait before a RET? –ACKs on a LAN are expected to arrive within a few milliseconds –Waiting too long leaves the NW idle, effect throughput –RET on a long-distance satellite connection is not suitable TCP faces a more difficult challenge –congestion may causes delays along a given path to change rapidly
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.13 Fig. 25.2 Example of retransmissions
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.14 25.8 Adaptive Retransmission (1) TCP monitors current delay on each connection –adapts the RET timer for changing conditions How can TCP monitor internet delays? –TCP cannot know the exact delays for an internet at all times –Instead, TCP estimates round-trip delay for each connection –As it sends data packets and receives ACKs, TCP generates a sequence of round-trip estimates and uses a statistical function to produce a weighted average –In addition to a weighted average TCP keeps an estimate of the variance
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.15 25.8 Adaptive Retransmission (2) TCP adaptive RET works well: –Using the variance helps TCP react quickly when delay increases following a burst of packets –Using a weighted average helps TCP reset the RET timer if the delay returns to a lower value after a temporary burst –When the delay remains constant TCP adjusts the RET timeout to a value that is slightly longer than the mean round-trip delay –When delays start to vary TCP adjusts the RET timeout to a value greater than the mean to accommodate peaks
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.16 25.9 Comparison Of Retransmission Times How adaptive RET helps TCP maximize throughput? –consider a case of packet loss on two connections that have different round-trip delays Figure 25.3 illustrates traffic on two such connections. As the figure shows, TCP sets the RET timeout to be slightly longer than the mean round-trip delay –If the delay is large TCP uses a large retransmission timeout –If the delay is small TCP uses a small timeout. The goal is to wait long enough to determine that a packet was lost –without waiting longer than necessary
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.17
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.18 25.10 Buffers, Flow Control, And Windows (1) Each end allocates a buffer –and sends the size of the buffer to the other end As data arrives, the receiver sends ACKs –which also specify the remaining buffer size The amount of buffer space available at any time –called the “window” A notification that specifies the size –called a “window advertisement” (WA)
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.19 25.10 Buffers, Flow Control, And Windows (2) A receiver sends a WA with each ACK –If the receiver can read the data as quickly as it arrives a receiver will send a positive WA along with each ACK –If the sender operates faster than the receiver incoming data will eventually fill the receiver's buffer causing the receiver to advertise a zero window –A sender that receives a zero WA must stop sending until the receiver again advertises a positive window size Figure 25.4 illustrates window advertisements
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.20
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.21 25.11 Three-Way Handshake (1) To guarantee that connections are established or terminated reliably –TCP uses 3-way handshake, in which three messages are exchanged 3-way exchange is necessary and sufficient to ensure unambiguous agreement –despite packet loss, duplication, and delay TCP uses the term “synchronization” (SYN) segment –to describe messages in a 3-way handshake used to create a connection The term “finish” (FIN) segment –to describe messages in a 3-way handshake used to close a connection Figure 25.5 illustrates the 3-way handshake for a closure
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.22
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.23 25.11 Three-Way Handshake (2) Like other messages –TCP retransmits lost SYN or FIN segments Handshake guarantees that TCP will not open or close a connection until both ends have interacted Each end should generate a random sequence number If a new TCP connection after a reboot –TCP chooses a new random number –Each end of a connection begins with a new sequence number To avoid problems of duplicate or delayed packets
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.24 25.12 Congestion Control (1) TCP uses packet loss as a measure of congestion –responds to congestion by reducing the rate at which it RET data TCP does not compute an exact transmission rate –Bases its transmission rate on buffers –Therefore, the receiver advertises a window size TCP imposes a restriction on the window size Congestion control takes over when a message is lost Instead of RET enough data to fill the receiver's buffer – TCP begins by sending a single message If the ACK arrives –TCP doubles the amount of data being sent –and sends two additional messages
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.25 25.12 Congestion Control (2) If ACK arrive for those two –TCP sends four more, and so on The exponential increase continues –until TCP is sending half of the receiver's WA, at which time TCP slows down the rate –Increase the window size linearly (as long as no congestion) Congestion control responds well to increased traffic By backing-off quickly –TCP is able to alleviate congestion TCP avoids adding RETs to a congested internet If all TCPs follow the standard –the congestion control scheme means that all senders back-off when congestion occurs, and thereby avoid congestion collapse
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.26 25.13 TCP Segment Format TCP uses a single format for all messages, –including messages that carry data, –those that carry ACKs, –and messages that are part of the 3-way handshake used to create or terminate a connection TCP uses the term “segment” to refer to a “message” Figure 25.6 illustrates the TCP segment format
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.27
Chapter 24 Transport Control Protocol (TCP) Layer 4 protocol Responsible for reliable end-to-end transmission Provides illusion of reliable network to.
TCP Lecture 13 November 13, TCP Background Transmission Control Protocol (TCP) TCP provides much of the functionality that IP lacks: reliable service.
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets, 5e By Douglas E. Comer Lecture PowerPoints.
Transport Control Protocol (TCP) Features of TCP, packet loss and retransmission, adaptive retransmission, flow control, three way handshake, congestion.
1 TCP: Reliable Transport Service. 2 Transmission Control Protocol (TCP) Major transport protocol used in Internet Heavily used Completely reliable transfer.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 2.5 Internetworking Chapter 25 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
NET0183 Networks and Communications Lecture 28 TCP: a transport layer protocol... the story continues... Sagan halda áfram 8/25/20091 NET0183 Networks.
1 Chapter 24 Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
1 Chapter Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
CSCI 4550/8556 Computer Networks Comer, Chapter 24: TCP: Reliable Transport Service.
NET0183 Networks and Communications Lectures 26 and 27 TCP: a transport layer protocol 8/25/20091 NET0183 Networks and Communications by Dr Andy Brooks.
1 Transport Layer Computer Networks. 2 Where are we?
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Transport Protocols Slide 1 Transport Protocols.
1 End-to-End Protocols User Datagram Protocol (UDP) Transmission Control Protocol(TCP)
TDC365 Spring 2001John Kristoff - DePaul University1 Internetworking Technologies Transmission Control Protocol (TCP)
SMUCSE 4344 transport layer. SMUCSE 4344 transport layer end-to-end protocols –transport code runs only on endpoint hosts encapsulates network communications.
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets with Internet Applications, 4e By Douglas.
The Transmission Control Protocol (TCP) Application Services (Telnet, FTP, , WWW) Reliable Stream Transport (TCP) Connectionless Packet Delivery.
26-TCP Dr. John P. Abraham Professor UTPA. TCP Transmission control protocol, another transport layer protocol. Reliable delivery Tcp must compensate.
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.
University of the Western Cape Chapter 12: The Transport Layer.
Transmission Control Protocol (TCP) Recall, UDP is a connectionless unreliable datagram transport service IP, the Network Layer, also only provides a connectionless.
IP and Errors IP Best Effort Datagrams can be: –Lost –Delayed –Duplicated –Delivered out of order –Corrupted.
Transmission Control Protocol (TCP) BSAD 146 Dave Novak Sources: Network+ Guide to Networks, Dean 2013.
TCP (Part 1) - Reliable Stream Transport Service D.E. Comer “Internetworking with TCP/IP: Principles, Protocols and Architectures”, Ch. 13, Prentice Hall,
Section 5: The Transport Layer. 5.2 CS Computer Networks John Mc Donald, Dept. of Computer Science, NUI Maynooth. Introduction In the previous section.
1 Computer Communication & Networks Lecture 23 & 24 Transport Layer: UDP and TCP Waleed Ejaz
TDC375 Winter 03/04 John Kristoff - DePaul University 1 Network Protocols Transmission Control Protocol (TCP)
Guide to TCP/IP, Third Edition Chapter 5: Transport Layer TCP/IP Protocols.
1 K. Salah Module 6.1: TCP Flow and Congestion Control Connection establishment & Termination Flow Control Congestion Control QoS.
IS333, Ch. 26: TCP Victor Norman Calvin College 1.
Transmission Control Protocol (TCP) TCP Flow Control and Congestion Control CS 60008: Internet Architecture and Protocols Department of CSE, IIT Kharagpur.
TELE202 Lecture 14 TCP/UDP (2) 1 Lecturer Dr Z. Huang Overview ¥Last Lecture »TCP/UDP (1) »Source: chapter 17 ¥This Lecture »TCP/UDP (2) »Source: chapter.
1 TCP ProtocolsLayer name DNSApplication TCP, UDPTransport IPInternet (Network ) WiFi, Ethernet Link (Physical)
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.
Gursharan Singh Tatla Transport Layer 16-May
Internet Applications Theory & Applications. Internet Application - Ibrahim Otieno SCI/ICT Building 2 nd Floor.
Autumn 2000John Kristoff1 Transport Layer Computer Networks.
CS332, Ch. 26: TCP Victor Norman Calvin College 1.
© 2017 SlidePlayer.com Inc. All rights reserved.