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

Slides:



Advertisements
Similar presentations
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets, 5e By Douglas E. Comer Lecture PowerPoints.
Advertisements

Internet Applications Theory & Applications. Internet Application - Ibrahim Otieno SCI/ICT Building 2 nd Floor.
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.
IS333, Ch. 26: TCP Victor Norman Calvin College 1.
Chapter 7 – Transport Layer Protocols
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.
- Reliable Stream Transport Service
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets with Internet Applications, 4e By Douglas.
TDC365 Spring 2001John Kristoff - DePaul University1 Internetworking Technologies Transmission Control Protocol (TCP)
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets with Internet Applications, 4e By Douglas.
Autumn 2000John Kristoff1 Transport Layer Computer Networks.
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets with Internet Applications, 4e By Douglas.
TDC375 Winter 03/04 John Kristoff - DePaul University 1 Network Protocols Transmission Control Protocol (TCP)
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets with Internet Applications, 4e By Douglas.
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets with Internet Applications, 4e By Douglas.
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets with Internet Applications, 4e By Douglas.
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.
WXES2106 Network Technology Semester /2005 Chapter 8 Intermediate TCP CCNA2: Module 10.
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets with Internet Applications, 4e By Douglas.
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.
Process-to-Process Delivery:
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 Chapter Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
1 Transport Layer Computer Networks. 2 Where are we?
IP and Errors IP Best Effort Datagrams can be: –Lost –Delayed –Duplicated –Delivered out of order –Corrupted.
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 : 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.
CS332, Ch. 26: TCP Victor Norman Calvin College 1.
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.
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.
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets, 5e By Douglas E. Comer Lecture PowerPoints.
The Transmission Control Protocol (TCP) Application Services (Telnet, FTP, , WWW) Reliable Stream Transport (TCP) Connectionless Packet Delivery.
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.
Copyright 2008 Kenneth M. Chipps Ph.D. Controlling Flow Last Update
Chapter 24 Transport Control Protocol (TCP) Layer 4 protocol Responsible for reliable end-to-end transmission Provides illusion of reliable network to.
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets, 5e By Douglas E. Comer Lecture PowerPoints.
TCP: Transmission Control Protocol Part II : Protocol Mechanisms Computer Network System Sirak Kaewjamnong Semester 1st, 2004.
Transmission Control Protocol (TCP) BSAD 146 Dave Novak Sources: Network+ Guide to Networks, Dean 2013.
The Internet Book. Chapter 16 3 A Packet Switching System Can Be Overrun Packet switching allows multiple computers to communicate without delay. –Requires.
TCP Congestion Control 컴퓨터공학과 인공지능 연구실 서 영우. TCP congestion control2 Contents 1. Introduction 2. Slow-start 3. Congestion avoidance 4. Fast retransmit.
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.
1 Computer Communication & Networks Lecture 23 & 24 Transport Layer: UDP and TCP Waleed Ejaz
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)
1 Chapter 24 Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
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.
Module 1 UDP & TCP.
Computer Networks and Internets, 5e By Douglas E. Comer
Dr. John P. Abraham Professor UTPA
Dr. John P. Abraham Professor UTPA
COMPUTER NETWORKS CS610 Lecture-35 Hammad Khalid Khan.
The Transmission Control Protocol (TCP)
Process-to-Process Delivery: UDP, TCP
Presentation transcript:

© 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,

© 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 Buffers, Flow Control, And Windows Three-Way Handshake Congestion Control TCP Segment Format

© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved 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 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 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 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 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 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 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 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 Example of retransmissions

© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved 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 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 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 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 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 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 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 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 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 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