Project 3 Flow and congestion control

Slides:



Advertisements
Similar presentations
TCP Variants.
Advertisements

1 Transport Protocols & TCP CSE 3213 Fall April 2015.
1 TCP - Part II. 2 What is Flow/Congestion/Error Control ? Flow Control: Algorithms to prevent that the sender overruns the receiver with information.
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.
Transport Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
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 Internet Networking Spring 2002 Tutorial 10 TCP NewReno.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
1 Chapter 3 Transport Layer. 2 Chapter 3 outline 3.1 Transport-layer services 3.2 Multiplexing and demultiplexing 3.3 Connectionless transport: UDP 3.4.
1 Internet Networking Spring 2004 Tutorial 10 TCP NewReno.
Computer Networks Transport Layer. Topics F Introduction  F Connection Issues F TCP.
Error Checking continued. Network Layers in Action Each layer in the OSI Model will add header information that pertains to that specific protocol. On.
TCP: flow and congestion control. Flow Control Flow Control is a technique for speed-matching of transmitter and receiver. Flow control ensures that a.
CS 4396 Computer Networks Lab
1 Transport Layer Lecture 10 Imran Ahmed University of Management & Technology.
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.
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
Transport Layer 3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March
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 - 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.
CS640: Introduction to Computer Networks Aditya Akella Lecture 15 TCP – III Reliability and Implementation Issues.
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.
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.
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 Congestion Control 컴퓨터공학과 인공지능 연구실 서 영우. TCP congestion control2 Contents 1. Introduction 2. Slow-start 3. Congestion avoidance 4. Fast retransmit.
Transport Layer: Sliding Window Reliability
Fall 2004FSU CIS 5930 Internet Protocols1 TCP – Data Exchange Reading: Section 24.4.
Transmission Control Protocol (TCP) TCP Flow Control and Congestion Control CS 60008: Internet Architecture and Protocols Department of CSE, IIT Kharagpur.
CSEN 404 Transport Layer II Amr El Mougy Lamia AlBadrawy.
Computer Networking Lecture 16 – Reliable Transport.
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.
Reliable Transmission
TCP Lecture 4.
CS450 – Introduction to Networking Lecture 19 – Congestion Control (2)
Chapter 3 outline 3.1 transport-layer services
Introduction to Networks
Transmission Control Protocol (TCP)
TCP.
TCP.
Chapter 6: Transport Layer (Part I)
Introduction of Transport Protocols
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.
TCP Sequence Number Plots
Lecture 19 – TCP Performance
Overview Jaringan Komputer (2)
TCP - Part II Suman Banerjee CS 640, UW-Madison
CS640: Introduction to Computer Networks
Lecture 18 – More TCP & Congestion Control
Getting Connected (Chapter 2 Part 3)
The Transmission Control Protocol (TCP)
The Transport Layer Reliability
TCP III - Error Control TCP Error Control.
Transport Protocols: TCP Segments, Flow control and Connection Setup
Transport Layer: Congestion Control
Chapter 3 outline 3.1 Transport-layer services
Transport Protocols: TCP Segments, Flow control and Connection Setup
TCP flow and congestion control
TCP: Transmission Control Protocol Part II : Protocol Mechanisms
Error Checking continued
Presentation transcript:

Project 3 Flow and congestion control 15-441 Spring 2010 Recitation #10

Context – Project 3 Bit torrent-like file transfer app Checkpoints Use UDP to understand the challenges in transport protocol design and implementation Checkpoints #1: Generate WHOHAS queries and IHAVE replies (due today!) #2: Download a chunk using stop and wait #3: Add flow control #4: Add congestion control

Why do we need flow control Stop and wait Don’t transmit a new packet until you get an ACK Limited performance 1 packet per RTT Pkt 0 ACK 0 Pkt 0 ACK 0 Pkt 1 ACK 1

Sliding window - idea Enough in-flight packets to “hide” the RTT Have a buffer of packets on each side Advance window when sender and receiver agree packets at the beginning have been received Common case Receiver: send cumulative ACK, slide window Sender: slide window, send next packet

Sliding window - visualization Sender Receiver Max ACK received Next seqnum Next expected Max acceptable … … … … Sender window Receiver window Sent & Acked Sent Not Acked Received & Acked Acceptable Packet OK to Send Not Usable Not Usable

Sliding window – reliability Lost packet (with cumulative ACKs) When detecting a missing packet, the receiver sends an ACK with the sequence number of the last correctly ordered packet If the sender timeouts while waiting for an ACK, it will retransmit Accommodating out of order packets The sender waits for 3 duplicate ACKs before retransmitting

Sliding window – implementation Sender keeps 3 pointers LastPacketAcked, LastPacketSent, LastPacketAvailable Ensure invariants LastPacketAcked <= LastPacketSent LastPacketSent <= LastPacketAvailable LastPacketAvailable-LastPacketAcked <= WindowSize Simplify by ignoring receiver issues: he can always process whatever he gets

Sliding window – testing Use assert statements to ensure invariants Inject some losses to test loss behavior Write time-stamped packet sequence numbers and ACKs to a file and plot them

Sliding window – testing fast retrans Retransmission X Duplicate Acks Sequence No Packets Acks Time

Congestion control Adapt to the network conditions by changing your window size Losses assumed to be due to congestion, so throttle back the sender when you see one Implement: Slow start Congestion Avoidance Fast retransmit

Slow start Start with window of size 1 (SW=1) and define the slow start threshold to be 64 (ssthresh=64) Now, upon: ACK received: SW++ Loss detected: ssthresh = max(SW/2,2), SW=1 SW = ssthresh: move into congestion avoidance

Congestion avoidance Upon ACK received: Upon loss detected: SW+=(1/SW) (increases by ~1 every RTT) Upon loss detected: ssthresh = max(SW/2,2), SW=1 Revert back to slow start Detecting losses Retransmission timeout 3 duplicate ACKs received (fast retransmit)

Estimating RTT – Karn’s algorithm Estimated RTT (ERRT), based on the observed RTT (ORTT) ERTT (i+1) = α * ERTT(i) + ( 1-α ) * ORTT (i) α typically = 0.875 Retransmit timer set to 2 * ERTT, increase backoff on retransmission Ignore any ORTTs from packets with retransmissions – prevents situations where you are stuck with a erroneously low RTT (http://www.opalsoft.net/qos/TCP-10.htm)

Congestion avoidance - testing Plot the window size as a function of time for a given flow Congestion Window Cut Congestion Window and Rate Time Packet loss + retransmit Grabbing back Bandwidth

Congestion avoidance - testing Write time-stamped sequence nos. and ACKS Window size increases by 1 every RTT. Sequence No Packets Acks Time

Fast recovery (optional) When a loss is detected, don’t go back to slow start, leverage the outstanding packets: Wait to receive SW/2 ACKs Set SW = max(SW/2,2) and resume congestion avoidance

Fast recovery (optional) Sent for each dupack after W/2 dupacks arrive Sequence No X Packets Acks Time

Selective ACKs (optional) Instead of having the sequence no. of the packet you last received in order send a bitmask of all received packets Enables faster retransmissions

Without selective ACKs X X X Now what? - timeout X Sequence No Packets Acks Time

With selective ACKs (optional) Now what? – send retransmissions as soon as detected X X X X Sequence No Packets Acks Time