1 TCP III - Error Control TCP Error Control. 2 ARQ Error Control Two types of errors: –Lost packets –Damaged packets Most Error Control techniques are.

Slides:



Advertisements
Similar presentations
Flow control Connection management TCP, UDP
Advertisements

1 Transport Protocols & TCP CSE 3213 Fall April 2015.
NET0183 Networks and Communications Lecture 28 TCP: a transport layer protocol... the story continues... Sagan halda áfram 8/25/20091 NET0183 Networks.
1 CS492B Project #2 TCP Tutorial # Jin Hyun Ju.
Data link control. Data Link Control –Flow Control how much data may sent –Error Control How can error be detected and corrected.
Flow and Error Control. Flow Control Flow control coordinates the amount of data that can be sent before receiving acknowledgement It is one of the most.
1 TCP - Part II. 2 What is Flow/Congestion/Error Control ? Flow Control: Algorithms to prevent that the sender overruns the receiver with information.
1 TCP CSE May TCP Services Flow control Connection establishment and termination Congestion control 2.
Chapter 12 TCP Traffic Control Chapter 12 TCP Traffic Control.
Congestion Dr. Abdulaziz Almulhem. Almulhem©20012 Congestion It occurs when network resources are becoming scarce High demand Over utilized Offered load.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 13 Introduction to Computer Networks.
Congestion Avoidance and Control CSCI 780, Fall 2005.
1 K. Salah Module 6.1: TCP Flow and Congestion Control Connection establishment & Termination Flow Control Congestion Control QoS.
TCP: flow and congestion control. Flow Control Flow Control is a technique for speed-matching of transmitter and receiver. Flow control ensures that a.
COMT 4291 Communications Protocols and TCP/IP COMT 429.
TCP Timers Chia-tai Tsai Introduction The 7 Timers for each Connection Connection-Establishment Timer Establish a new connection.
CS 4396 Computer Networks Lab
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
Chapter 11: Flow Control – can occur at layer 2 (data link) and at layer 4 (transport)  You saw the need in the most recent assignment.  Data packets.
1 Transport Protocols (continued) Relates to Lab 5. UDP and TCP.
Chapter 12 Transmission Control Protocol (TCP)
Chapter 5 Peer-to-Peer Protocols and Data Link Layer PART I: Peer-to-Peer Protocols ARQ Protocols and Reliable Data Transfer Flow Control.
1 Transport Layer Lecture 10 Imran Ahmed University of Management & Technology.
Malathi Veeraraghavan Originals by Jörg Liebeherr 1 Error Control Congestion Control Timers.
Copyright © Lopamudra Roychoudhuri
1 TCP - Part II Relates to Lab 5. This is an extended module that covers TCP data transport, and flow control, congestion control, and error control in.
Chapter 3: Channel Coding (part 3). Automatic repeat request (ARQ) protocols ▫Used in combination with error detection/correction ▫Block of data with.
CS640: Introduction to Computer Networks Aditya Akella Lecture 15 TCP – III Reliability and Implementation Issues.
Computer Networking Lecture 18 – More TCP & Congestion Control.
Lab The network simulator ns The network simulator ns Allows us to watch evolution of parameters like cwnd and ssthresh Allows us to watch evolution of.
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 TCP - Part II Relates to Lab 5. This is an extended module that covers TCP data transport, and flow control, congestion control, and error control in.
1 TCP - Part II. 2 What is Flow/Congestion/Error Control ? Flow Control: Algorithms to prevent that the sender overruns the receiver with information.
1 Computer Networks Congestion Avoidance. 2 Recall TCP Sliding Window Operation.
ECE 4110 – Internetwork Programming
TCP - Part II Relates to Lab 5. This is an extended module that covers TCP data transport, and flow control, congestion control, and error control in TCP.
TCP Timeout and Retransmission
TCP Congestion Control 컴퓨터공학과 인공지능 연구실 서 영우. TCP congestion control2 Contents 1. Introduction 2. Slow-start 3. Congestion avoidance 4. Fast retransmit.
Transport Layer: Sliding Window Reliability
Data Link Layer Flow and Error Control. Flow Control Flow Control Flow Control Specifies the amount of data can be transmitted by sender before receiving.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Principles of reliable data transfer 0.
Retransmission. Automatic Repeat reQuest (ARQ) 2 Time Packet ACK Timeout Automatic Repeat Request –Receiver sends acknowledgment (ACK) when it receives.
CSCI 465 D ata Communications and Networks Lecture 11 Martin van Bommel CSCI 465 Data Communications & Networks 1.
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.
DATA LINK CONTROL. DATA LINK LAYER RESPONSIBILTIES  FRAMING  ERROR CONTROL  FLOW CONTROL.
Computer Networking Lecture 16 – Reliable Transport.
NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS ( NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS (PRACTICAL PART) Tutorial 4 : Chapter 7 Data & computer.
Data Link Layer.
TCP - Part II.
TCP - Part II Relates to Lab 5. This is an extended module that covers TCP flow control, congestion control, and error control in TCP.
Data Link Layer Flow Control.
David Wetherall Spring 2000
TCP - Part III TCP Timers Selective Acknowledgements.
TCP Wrap-up TCP Timers Selective Acknowledgements.
Data Link Layer What does it do?
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 - Part II Suman Banerjee CS 640, UW-Madison
Chapter 5 Peer-to-Peer Protocols and Data Link Layer
CS4470 Computer Networking Protocols
CS4470 Computer Networking Protocols
CS640: Introduction to Computer Networks
Lecture 18 – More TCP & Congestion Control
TCP III - Error Control TCP Error Control.
Chapter 5 Peer-to-Peer Protocols and Data Link Layer
Lecture 4 Peer-to-Peer Protocols and Data Link Layer
TCP: Transmission Control Protocol Part II : Protocol Mechanisms
Presentation transcript:

1 TCP III - Error Control TCP Error Control

2 ARQ Error Control Two types of errors: –Lost packets –Damaged packets Most Error Control techniques are based on: 1. Error Detection Scheme (Parity checks, CRC). 2. Retransmission Scheme. Error control schemes that involve error detection and retransmission of lost or corrupted packets are referred to as Automatic Repeat Request (ARQ) error control.

3 Background: ARQ Error Control The most common ARQ retransmission schemes: –Stop-and-Wait ARQ –Go-Back-N ARQ –Selective Repeat ARQ The protocol for sending ACKs in all ARQ protocols are based on the sliding window flow control scheme TCP uses a version of the Go-Back-N Protocol

4 Background: Go-Back-N ARQ Packet 0 Go-Back-N sends cumulative acknowledgments A B Packet 1 ACK 1 Packet 3Packet 4Packet 2Packet 3 Packets 2,3,4,5 are retransmitted ACK 2 Packet 2 loss Packet 5Packet 4 ACK 1 Timeout for Packet 2 ACK 3ACK 4ACK 5 Packet 5 ACK 6

5 Retransmissions in TCP A TCP sender retransmits a segment when it assumes that the segment has been lost: 1.No ACK has been received and a timeout occurs 2.Multiple ACKs have been received for the same segment

6 Receiving duplicate ACKs If three or more duplicate ACKs are received in a row, the TCP sender believes that a segment has been lost. Then TCP performs a retransmission of what seems to be the missing segment, without waiting for a timeout to happen. This can fix losses of single segments

7 Retransmission Timer TCP sender maintains one retransmission timer for each connection When the timer reaches the retransmission timeout (RTO) value, the sender retransmits the first segment that has not been acknowledged The timer is started when 1.When a packet with payload is transmitted and timer is not running 2.When an ACK arrives that acknowledges new data, 3.When a segment is retransmitted The timer is stopped when –All segments are acknowledged

8 How to set the timer Retransmission Timer: –The setting of the retransmission timer is crucial for good performance of TCP –Timeout value too small  results in unnecessary retransmissions –Timeout value too large  long waiting time before a retransmission can be issued –A problem is that the delays in the network are not fixed –Therefore, the retransmission timers must be adaptive

9 Setting the value of RTO: The RTO value is set based on round-trip time (RTT) measurements that each TCP performs Each TCP connection measures the time difference between the transmission of a segment and the receipt of the corresponding ACK There is only one measurement ongoing at any time (i.e., measurements do not overlap) Figure on the right shows three RTT measurements

10 Setting the RTO value RTO is calculated based on the RTT measurements –Uses an exponential moving average to calculate estimators for delay (srtt) and variance of delay (rttvar) from The RTT measurements are smoothed by the following estimators srtt and rttvar: srtt n+1 =  RTT + (1-  ) srtt n rttvar n+1 =  ( | RTT - srtt n | ) + (1-  ) rttvar n RTO n+1 = srtt n rttvar n+1 –The gains are set to  =1/4 and  =1/8

11 Setting the RTO value (cont’d) Initial value for RTO: –Sender should set the initial value of RTO to RTO 0 = 3 seconds RTO calculation after first RTT measurements arrived srtt 1 = RTT rttvar 1 = RTT / 2 RTO 1 = srtt rttvar n+1 When a timeout occurs, the RTO value is doubled RTO n+1 = max ( 2 RTO n, 64) seconds This is called an exponential backoff

12 Karn’s Algorithm Karn’s Algorithm: Don’t update RTT on any segments that have been retransmitted Restart RTT measurements only after an ACK is received for a segment that is not retransmitted If an ACK for a retransmitted segment is received, the sender cannot tell if the ACK belongs to the original or the retransmission.  RTT measurements is ambiguous in this case

13 RTO Calculation: Example

14 TCP Retransmission Timer Retransmission Timer: –The setting of the retransmission timer is crucial for efficiency –Timeout value too small  results in unnecessary retransmissions –Timeout value too large  long waiting time before a retransmission can be issued –A problem is that the delays in the network are not fixed –Therefore, the retransmission timers must be adaptive

15 Round-Trip Time Measurements The retransmission mechanism of TCP is adaptive The retransmission timers are set based on round-trip time (RTT) measurements that TCP performs The RTT is based on time difference between segment transmission and ACK But: TCP does not ACK each segment Each connection has only one timer

16 Round-Trip Time Measurements Retransmission timer is set to a Retransmission Timeout (RTO) value. RTO is calculated based on the RTT measurements. The RTT measurements are smoothed by the following estimators srtt and rttvar: srtt n+1 =  RTT + (1-  ) srtt n rttvar n+1 =  ( | RTT - srtt n+1 | ) + (1-  ) rttvar n RTO n+1 = srtt n rttvar n+1 The gains are set to  =1/4 and  =1/8 srtt 0 = 0 sec, rttvar 0 = 3 sec, Also: RTO 1 = srtt rttvar 1

17 Karn’s Algorithm If an ACK for a retransmitted segment is received, the sender cannot tell if the ACK belongs to the original or the retransmission. Karn’s Algorithm: Don’t update srtt on any segments that have been retransmitted. Each time when TCP retransmits, it sets: RTO n+1 = max ( 2 RTO n, 64) (exponential backoff)

18 Measuring TCP Retransmission Timers Transfer file from Argon to neonn Unplug Ethernet of Argon cable in the middle of file transfer

19 Interpreting the Measurements The interval between retransmission attempts in seconds is: 1.03, 3, 6, 12, 24, 48, 64, 64, 64, 64, 64, 64, 64. Time between retrans- missions is doubled each time (Exponential Backoff Algorithm) Timer is not increased beyond 64 seconds TCP gives up after 13th attempt and 9 minutes.