Advanced Computer Networks

Slides:



Advertisements
Similar presentations
CSCI-1680 Transport Layer II Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti Rodrigo Fonseca.
Advertisements

1 Computer Networks: A Systems Approach, 5e Larry L. Peterson and Bruce S. Davie Chapter 5 End-to-End Protocols Copyright © 2010, Elsevier Inc. All rights.
COT 4600 Operating Systems Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 3:00-4:00 PM.
Slide Set 13: TCP. In this set.... TCP Connection Termination TCP State Transition Diagram Flow Control How does TCP control its sliding window ?
CS 6401 Transport Control Protocol Outline TCP objectives revisited TCP basics New algorithms for RTO calculation.
Computer Networks Chapter 5: End-to-End Protocols
1 Chapter 5 End-to-End Protocols Outline 5.1 UDP 5.2 TCP 5.3 Remote Procedure Call.
1 Computer Networks: A Systems Approach, 5e Larry L. Peterson and Bruce S. Davie Chapter 5 End-to-End Protocols Copyright © 2010, Elsevier Inc. All rights.
8. Transport Protocol and UDP 8.1 Transport protocol : End-to-end protocol –IP: Host to host packet delivery –Transport: Process to process communication.
CSS432: End-to-End Protocols 1 CSS432 End-to-End Protocols Textbook Ch5.1 – 5.2 Professor: Munehiro Fukuda.
Reliable Byte-Stream (TCP)
1 Reliable Byte-Stream (TCP) Outline Connection Establishment/Termination Sliding Window Revisited Flow Control Adaptive Timeout.
6-May-154/598N: Computer Networks End-to-End Protocols Underlying best-effort network –drop messages –re-orders messages –delivers duplicate copies of.
CSE Computer Networks Prof. Aaron Striegel Department of Computer Science & Engineering University of Notre Dame Lecture 14 – February 23, 2010.
TCP 4/15/2017.
 TCP connection set up  TCP connection tear-down  Sliding window revisited  Triggering transmission.
Computer Networks: TCP Congestion Control 1 TCP Congestion Control Lecture material taken from “Computer Networks A Systems Approach”, Fourth Edition,Peterson.
Fundamentals of Computer Networks ECE 478/578 Lecture #21: TCP Window Mechanism Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University.
Computer Networks: TCP Congestion Control 1 TCP Congestion Control Lecture material taken from “Computer Networks A Systems Approach”, Third Ed.,Peterson.
CSE 124 Networked Services Fall 2009 B. S. Manoj, Ph.D 10/20/20091CSE 124 Networked Services Fall 2009 Some.
Networks : TCP Congestion Control1 TCP Congestion Control.
Spring 2003CS 4611 Reliable Byte-Stream (TCP) Outline Connection Establishment/Termination Sliding Window Revisited Flow Control Adaptive Timeout.
Advanced Computer Networks: TCP Congestion Control 1 TCP Congestion Control Lecture material taken from “Computer Networks A Systems Approach”, Fourth.
Spring 2002CS 4611 Reliable Byte-Stream (TCP) Outline Connection Establishment/Termination Sliding Window Revisited Flow Control Adaptive Timeout.
1 #6 in Mid-Term  Most answered:  many users thru the same bottleneck -> increased queueing delay -> increased e2e latency  Possible reasons behind.
CS 356: Introduction to Computer Networks Lecture 16: Transmission Control Protocol (TCP) Xiaowei Yang
The Transport Layer: TCP and UDP Chap 2. Basic Philosophy of TCP/IP  Simple core, complex edge  Edge can be hosts, edge routers, network boundaries,
1 Internet Engineering University of ilam Dr. Mozafar Bag-Mohammadi Transport Layer.
1 Lecture 14 High-speed TCP connections Wraparound Keeping the pipeline full Estimating RTT Fairness of TCP congestion control Internet resource allocation.
1 Introduction to Computer Networks University of ilam Dr. Mozafar Bag-Mohammadi Transport Layer.
CSE Computer Networks Prof. Aaron Striegel Department of Computer Science & Engineering University of Notre Dame Lecture 14 – February 23, 2010.
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 Reliable Byte-Stream (TCP) Outline Connection Establishment/Termination Sliding Window Revisited Flow Control Adaptive Timeout.
Spring 2008CPE Computer Networks1 Reliable Byte-Stream (TCP) Outline Connection Establishment/Termination Sliding Window Revisited Flow Control.
1 Reliable Byte-Stream (TCP) Outline Connection Establishment/Termination Sliding Window Revisited Flow Control Adaptive Timeout.
Ilam University Dr. Mozafar Bag-Mohammadi 1 Transport Layer.
TCP Flow Control – an illustration of distributed system thinking David E. Culler CS162 – Operating Systems and Systems Programming
CSE/EE 461 Sliding Windows and ARQ. 2 Last Time We finished up the Network layer –Internetworks (IP) –Routing (DV/RIP, LS/OSPF) It was all about routing:
EE 122: Transport Protocols Kevin Lai October 16, 2002.
1 End-to-End Protocols UDP TCP –Connection Establishment/Termination –Sliding Window Revisited –Flow Control –Congestion Control –Adaptive Timeout.
Univ. of TehranIntroduction to Computer Network1 An Introduction Computer Networks An Introduction to Computer Networks University of Tehran Dept. of EE.
Advanced Computer Networks
3. END-TO-END PROTOCOLS (PART 2) Rocky K. C. Chang Department of Computing The Hong Kong Polytechnic University 22 March
Chapter 5 TCP Sequence Numbers & TCP Transmission Control
Transport Control Protocol
Computer Networks Bhushan Trivedi, Director, MCA Programme, at the GLS Institute of Computer Technology, Ahmadabad.
Chapter 5 TCP Sliding Window
ECE544: Communication Networks-II Spring 2010
Internet routing Problem: Route from any node to any other node
Chapter 5 TCP Transmission Control
The University of Adelaide, School of Computer Science
The University of Adelaide, School of Computer Science
TCP Overview Connection-oriented Byte-stream Full duplex
Transport Control Protocol
5. End-to-end protocols (part 2)
TCP Tutorial - Part III -
Reliable Byte-Stream (TCP)
Ilam University Dr. Mozafar Bag-Mohammadi
Transmission Control Protocol (TCP) Part II Neil Tang 11/21/2008
State Transition Diagram
If both sources send full windows, we may get congestion collapse
CSS432 End-to-End Protocols Textbook Ch5.1 – 5.2
The University of Adelaide, School of Computer Science
CSS432 UDP and TCP Textbook Ch5.1 – 5.2
Introduction to Computer Networks
Transport Layer: Congestion Control
Chapter 5 TCP Sliding Window
Introduction to Computer Networks
TCP: Transmission Control Protocol Part II : Protocol Mechanisms
Presentation transcript:

Advanced Computer Networks CS716 Advanced Computer Networks By Dr. Amir Qayyum 1

Lecture No. 32

TCP Flow Control Issues Problem: app. delivers tiny pieces of data to TCP e.g. telnet in character mode Each piece sent as segment, returned as ACK Very inefficient Solutions Delay transmission to accumulate more data Nagle’s algorithm Send first piece Accumulate data until first piece ACK’d Send accumulated data and restart accumulation Not ideal for some traffic, e.g. mouse motion

TCP Flow Control Issues Problem: slow application reads data in tiny pieces Receiver advertises tiny window Sender fills tiny window Known as silly window syndrome Solution: due to Clark Advertise window opening only when MSS or ½ of buffer is available Sender delays sending until window is MSS or ½ of receiver’s buffer (estimated) Overridden by using PUSH

TCP Flow Control Math Send buffer size: MaxSendBuffer Receive buffer size: MaxRcvBuffer Receiving side LastByteRcvd - LastByteRead < = MaxRcvBuffer AdvertisedWindow = MaxRcvBuffer - (NextByteExpected - NextByteRead) Sending side LastByteSent - LastByteAcked < = AdvertisedWindow EffectiveWindow = AdvertisedWindow - (LastByteSent - LastByteAcked) LastByteWritten - LastByteAcked < = MaxSendBuffer block sender if (LastByteWritten - LastByteAcked) + y > MaxSenderBuffer Always send ACK in response to arriving data segment Persist when AdvertisedWindow = 0

TCP Bit Allocation Limitations Sequence numbers vs packet lifetime Assumed that IP packets live less than 60s Can we send 232 (4G) bytes in 60 seconds ? Only need a data rate of 573 Mbps! Less than an STS-12 line... (less than Gigabit Ethernet) Advertised window vs delay-bandwidth Only 16 bits (64kB) for advertised window For cross-country RTT of 100 milliseconds, adequate for a mere 5.24 Mbps!

Protection Against Wrap Around 32-bit SequenceNum Bandwidth Time Until Wrap Around T1 (1.5 Mbps) 6.4 hours Ethernet (10 Mbps) 57 minutes T3 (45 Mbps) 13 minutes FDDI (100 Mbps) 6 minutes STS-3 (155 Mbps) 4 minutes STS-12 (622 Mbps) 55 seconds STS-24 (1.2 Gbps) 28 seconds

Keeping the Pipe Full 16-bit AdvertisedWindow Bandwidth Delay x Bandwidth Product T1 (1.5 Mbps) 18KB Ethernet (10 Mbps) 122KB T3 (45 Mbps) 549KB FDDI (100 Mbps) 1.2MB STS-3 (155 Mbps) 1.8MB STS-12 (622 Mbps) 7.4MB STS-24 (1.2 Gbps) 14.8MB

Adaptive Retransmission Algorithm Original algorithm used only RTT estimate Theory: measure RTT for each segment + its ACK Estimate RTT Timeout is 2 × RTT to allow for variations

Adaptive Retransmission Algorithm Practice Use exponential moving average ( = 0.8 to 0.9) Estimate =  × estimate + (1 - ) measurement Measured RTT depends on  time

Adaptive Retransmission Algorithm Problem: it did not handle variations well Ambiguity for retransmitted packets: was ACK in response to first, second, etc. transmission ? Measured RTT time transmission retransmission RTT ? ? ?

Adaptive Retransmission (Original Algorithm) Measure SampleRTT for each segment/ACK pair Compute weighted average of RTT EstRTT = a × EstRTT + b × SampleRTT where a + b = 1 a between 0.8 and 0.9 b between 0.1 and 0.2 Set timeout based on EstRTT TimeOut = 2 × EstRTT

Karn/Partridge Algorithm Sender Receiver Sender Receiver Original transmission Original transmission TT TT ACK Retransmission SampleR SampleR Retransmission ACK Do not sample RTT when retransmitting Double timeout (RTT estimate) after each retransmission Still did not handle variations well Did not solve network congestion problems as desired

Jacobson/Karels Algorithm Estimate variance of RTT Calculate mean interpacket RTT deviation as an approximation of variance (Diff = RTT_estimate – measurement) RTT_estimate = a x RTT_estimate + (1 - a ) × measurement Using another exponential moving average Deviation = β x |RTT_estimate - measurement| + (1 - β) deviation β = 0.25, α = 0.875 in RTT_estimate

Jacobson/Karels Algorithm Use variance estimate as component of RTT estimate next_RTT (timeout) = RTT_estimate + 4 × deviation Protects against high jitter Algorithm only as good as clock granularity(500ms on Unix) Accurate timeout mechanism important to congestion control