CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.

Slides:



Advertisements
Similar presentations
Simulation-based Comparison of Tahoe, Reno, and SACK TCP Kevin Fall & Sally Floyd Presented: Heather Heiman September 10, 2002.
Advertisements

Different TCP Flavors CSCI 780, Fall TCP Congestion Control Slow-start Congestion Avoidance Congestion Recovery Tahoe, Reno, New-Reno SACK.
TCP: Transmission Control Protocol Overview Connection set-up and termination Interactive Bulk transfer Timers Improvements.
Transport Layer – TCP (Part1) Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
1 TCP - Part II. 2 What is Flow/Congestion/Error Control ? Flow Control: Algorithms to prevent that the sender overruns the receiver with information.
School of Information Technologies TCP Congestion Control NETS3303/3603 Week 9.
Transport Layer 3-1 Fast Retransmit r time-out period often relatively long: m long delay before resending lost packet r detect lost segments via duplicate.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
Transport Layer3-1 Congestion Control. Transport Layer3-2 Principles of Congestion Control Congestion: r informally: “too many sources sending too much.
CSEE W4140 Networking Laboratory Lecture 7: TCP flow control and congestion control Jong Yul Kim
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
1 Spring Semester 2007, Dept. of Computer Science, Technion Internet Networking recitation #7 TCP New Reno Vs. Reno.
1 Lecture 9: TCP and Congestion Control Slides adapted from: Congestion slides for Computer Networks: A Systems Approach (Peterson and Davis) Chapter 3.
TDC375 Winter 03/04 John Kristoff - DePaul University 1 Network Protocols Transmission Control Protocol (TCP)
1 Internet Networking Spring 2004 Tutorial 10 TCP NewReno.
Networks : TCP Congestion Control1 TCP Congestion Control.
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Transport Protocols Slide 1 Transport Protocols.
Advanced Computer Networks: TCP Congestion Control 1 TCP Congestion Control Lecture material taken from “Computer Networks A Systems Approach”, Fourth.
CMPE 257 Spring CMPE 257: Wireless and Mobile Networking Spring 2005 E2E Protocols (point-to-point)
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.
Copyright © Lopamudra Roychoudhuri
Computer & Information Sciences University of Delaware
1 Transport Protocols (continued) Relates to Lab 5. UDP and TCP.
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.
TCP CS 168 Discussion Week 6 Many thanks to past EE 122 GSIs.
SELECTIVE ACKNOWLEDGEMENT (SACK) DUPLICATE SELECTIVE ACKNOWLEDGMENT
1 TCP: Reliable Transport Service. 2 Transmission Control Protocol (TCP) Major transport protocol used in Internet Heavily used Completely reliable transfer.
TCP: Transmission Control Protocol Overview Connection set-up and termination Interactive Bulk transfer Timers Improvements.
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.
Lecture 9 – More TCP & Congestion Control
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.
CS640: Introduction to Computer Networks Aditya Akella Lecture 15 TCP – III Reliability and Implementation Issues.
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.
TCP OVER ADHOC NETWORK. TCP Basics TCP (Transmission Control Protocol) was designed to provide reliable end-to-end delivery of data over unreliable networks.
Internet Networking recitation #11
ECE 4110 – Internetwork Programming
TCP Timeout and Retransmission
TCP Congestion Control 컴퓨터공학과 인공지능 연구실 서 영우. TCP congestion control2 Contents 1. Introduction 2. Slow-start 3. Congestion avoidance 4. Fast retransmit.
Fall 2004FSU CIS 5930 Internet Protocols1 TCP – Data Exchange Reading: Section 24.4.
Transport Layer3-1 Chapter 3 outline r 3.1 Transport-layer services r 3.2 Multiplexing and demultiplexing r 3.3 Connectionless transport: UDP r 3.4 Principles.
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)
Malathi Veeraraghavan Originals by Jörg Liebeherr 1 Congestion Control TCP implements congestion control at the sender –This control is intended to reduce.
TCP Selective Acknowledgement Options
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.
Chapter 6 TCP Congestion Control
Introduction to Networks
COMP 431 Internet Services & Protocols
Introduction to Congestion Control
Hojun Lee TCP enhancements Hojun Lee 11/8/2018.
Precept 2: TCP Congestion Control Review
TCP - Part II Relates to Lab 5. This is an extended module that covers TCP flow control, congestion control, and error control in TCP.
Lecture 19 – TCP Performance
TCP - Part II Suman Banerjee CS 640, UW-Madison
CS640: Introduction to Computer Networks
CS4470 Computer Networking Protocols
Transport Layer: Congestion Control
TCP flow and congestion control
TCP: Transmission Control Protocol Part II : Protocol Mechanisms
Presentation transcript:

CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina

3/17/20052 Midterm Exam Grade Before adjustment Graduate: Avg 10, Highest 12.5 Undergrad: Avg 12.4, Highest 18 After adjustment Graduate: +5 to everyone Undergrad: +2 to everyone

3/17/20053 Final Exam Guide Problems similar to those in midterm exam Will have one more programming problem that asks you to debug a piece of code In each section, the one who makes most progress in final exam compared to midterm exam grade will get 2 bonus points!

3/17/20054 Bulk Data Flow With bulk of data to send, it is desired that sender is allowed to transmit multiple packets before it stops and waits for acknowledgment However, cannot keep sending without pause, otherwise receiver may run out of buffer Use sliding window protocol to control data flow

3/17/20055 Sliding Window Protocol Receiver advertises a window to notify sender how much data it can send Window closes as left edge moves to right When data is sent and acknowledged Window opens as right edge moves to right When receiving process reads acknowledged data and freeing up space in TCP receive buffer Window shrinks as right edge moves to left (discouraged)

3/17/20056 Sliding Window … offered window (advertised by receiver) usable window sent, not ACKed acknowledged sent and can send ASAP can’t send until window moves

3/17/20057 TCP Options A variable-length list of optional information for TCP segments Some options defined in TCP include End of option list No operation Maximum segment size Window scale factor Timestamp Selective acknowledgment

3/17/20058 TCP SACK Permitted and SACK Option When establishing a connection, either end can use SACK permitted option to let the other end know that it can accept SACK option When some segment is lost, can use SACK option to acknowledge received bytes to avoid redundant retransmission

3/17/20059 TCP SACK Option Examples Assume left window edge is 5000 and sender sends a burst of 8 segments, each containing 500 data bytes Case 1: first 4 segments are received but the last 4 are dropped receiver will return a normal TCP ACK segment acknowledging sequence number 7000, with no SACK option

3/17/ TCP SACK Option Examples Case 2: first segment is dropped but the remaining 7 are received Upon receiving each of the last seven packets, receiver will return a TCP ACK segment that acknowledges sequence number 5000 and contains a SACK option specifying one block of queued data Triggering SegmentACKLeft EdgeRight Edge 5000 (lost)

3/17/ TCP SACK Option Examples Case 3: 2nd, 4th, 6th, and 8th (last) segments are dropped receiver ACKs the first packet normally, and the 3rd, 5th, and 7th packets trigger SACK options Triggering SegmentACK1st Block2nd Block3rd Block Left RightLeft RightLeft Right (lost) (lost) (lost) (lost)

3/17/ TCP PUSH Flag Sender uses PUSH flag to notify receiver to pass all data it has to the receiving process Some cases where PUSH is set Send buffer is emptied by sending this segment This segment is final data segment

3/17/ Urgent Mode One end notifies the other end that some “urgent data” is in data stream What action to take is up to receiver Two fields in TCP header needs to be set URG flag set to 1 Urgent pointer set to a positive offset that is added to ISN to get seq# of last byte of urgent data

3/17/ TCP Timeout and Retransmission TCP handles lost data segments and acknowledgments by setting a timeout when it sends data If data isn’t acknowledged when timeout expires, TCP retransmits data Two implementation issues to consider How to determine timeout interval How frequently to retransmit data

3/17/ Round-Trip Time Measurement RTT changes over time due to route changes and network traffic changes TCP should track RTT changes and modify its timeout accordingly R   R+(1-  )M, where  =0.9 RTO = R , where  =2

3/17/ Improved RTT Measurement Previous approach can’t keep up with wide fluctuations in RTT and may cause unnecessary retransmissions Err = M-A A  A+gErr, where g=0.125 D  D+h(|Err|-D), where h=0.25 RTO = A+4D

3/17/ Karn’s Algorithm When receiving an ACK after retransmission, TCP can’t tell this ACK is for original transmission or for retransmission Hence can’t update RTT estimators using received ACK when a timeout and retransmission occur

3/17/ TCP Congestion Control Assume packet loss is largely due to congestion Two indications of packet loss: timeout and receipt of duplicate ACKs When congestion occurs, slow down transmission rate, and gradually come back if congestion is relieved Use two algorithms Slow start Congestion avoidance

3/17/ Slow Start The rate at which new packets should be injected into network is the rate at which acknowledgments are returned Use a congestion window (cwnd) in sender’s TCP Initialized to one segment when new connection is established Increased by one segment each time an ACK is received until packet loss occurs: exponential increase Congestion window is flow control by sender while advertised window is flow control by receiver

3/17/ Congestion Avoidance Use a slow start threshold (ssthresh) When receiving 3 dup ACKs, cwnd is cut in half, and window grows linearly 3 dup ACKs indicates network capable of delivering some segments When timeout occurs, cwnd instead set to 1 MSS, and window first grows exponentially until reach ssthresh, then grows linearly Timeout before 3 dup ACKs implies severe congestion

3/17/ Congestion Control Algorithm When cwnd is below ssthresh, sender in slow- start phase, window grows exponentially When cwnd is above ssthresh, sender is in congestion-avoidance phase, window grows linearly When a triple duplicate ACK occurs, ssthresh set to cwnd/2 and cwnd set to ssthresh When timeout occurs, ssthresh set to cwnd/2 and cwnd is set to 1 MSS

3/17/ Fast Retransmit and Fast Recovery Used when receiving 3 dup ACKs Receiving 3 dup ACKs means data can still flow, so no need to reduce rate abruptly Fast retransmit: when receiving 3 dup ACKs, retransmit without waiting for retransmission timeout Fast recovery: perform congestion avoidance, not slow start

3/17/ Repacketization When TCP times out and retransmits, it does not have to retransmit the identical segment again Instead, TCP is allowed to send a bigger segment (not exceeding MSS) to increase performance Because TCP identifies data by byte number, not segment number

3/17/ Next Class TCP persist and keepalive timers Other TCP options Read TI Ch. 22, 23, 24