Chapter 5 TCP Sliding Window

Slides:



Advertisements
Similar presentations
TCP Sliding Windows, Flow Control, and Congestion Control Lecture material taken from Computer Networks A Systems Approach, Fourth Ed.,Peterson and Davie,
Advertisements

Advanced Computer Networks : TCP Sliding Windows1 TCP Sliding Windows, Flow Control, and Congestion Control Lecture material taken from “Computer Networks.
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.
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.
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.
ECE 4450:427/527 - Computer Networks Spring 2015 Dr. Nghi Tran Department of Electrical & Computer Engineering Lecture 7.1: End-to-end Protocols Dr. Nghi.
 TCP connection set up  TCP connection tear-down  Sliding window revisited  Triggering transmission.
Fundamentals of Computer Networks ECE 478/578 Lecture #21: TCP Window Mechanism Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University.
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.
ACN: TCP Sliding Windows1 TCP Sliding Windows, with Flow Control, and Congestion Control Based on Peterson and Davie Textbook.
Advanced Computer Networks : TCP Sliding Windows1 TCP Sliding Windows, Flow Control, and Congestion Control Lecture material taken from “Computer Networks.
CSE 461: Sliding Windows & ARQ. Next Topic  We begin on the Transport layer  Focus  How do we send information reliably?  Topics  The Transport layer.
Spring 2003CS 4611 Reliable Byte-Stream (TCP) Outline Connection Establishment/Termination Sliding Window Revisited Flow Control Adaptive Timeout.
Spring 2002CS 4611 Reliable Byte-Stream (TCP) Outline Connection Establishment/Termination Sliding Window Revisited Flow Control Adaptive Timeout.
CS 356: Introduction to Computer Networks Lecture 16: Transmission Control Protocol (TCP) Xiaowei Yang
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Flow Control 0.
1 Introduction to Computer Networks University of ilam Dr. Mozafar Bag-Mohammadi Transport Layer.
23.1 Chapter 23 Process-to-Process Delivery: UDP, TCP, and SCTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
CSE679: Computer Network Review r Review of the uncounted quiz r Computer network review.
1 Reliable Byte-Stream (TCP) Outline Connection Establishment/Termination Sliding Window Revisited Flow Control Adaptive Timeout.
ECE 4110 – Internetwork Programming
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:
1 End-to-End Protocols UDP TCP –Connection Establishment/Termination –Sliding Window Revisited –Flow Control –Congestion Control –Adaptive Timeout.
CIS679: TCP and Multimedia r Review of last lecture r TCP and Multimedia.
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
09-Transport Layer: TCP Transport Layer.
Chapter 5 TCP Sequence Numbers & TCP Transmission Control
TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 full duplex data:
Chapter 3 outline 3.1 transport-layer services
Introduction to Networks
Transport Control Protocol
Process-to-Process Delivery, TCP and UDP protocols
Review: UDP demultiplexing TCP demultiplexing Multiplexing?
ECE 4450:427/527 - Computer Networks Spring 2017
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
CS4470 Computer Networking Protocols
Transport Control Protocol
5. End-to-end protocols (part 2)
TCP Sliding Windows, Flow Control, and Congestion Control
Reliable Byte-Stream (TCP)
Ilam University Dr. Mozafar Bag-Mohammadi
Transmission Control Protocol (TCP) Part II Neil Tang 11/21/2008
State Transition Diagram
CS4470 Computer Networking Protocols
Getting Connected (Chapter 2 Part 3)
Advanced Computer Networks
The University of Adelaide, School of Computer Science
Introduction to Computer Networks
Introduction to Computer Networks
Chapter 5 TCP Sliding Window
Introduction to Computer Networks
TCP Sliding Windows, Flow Control, and Congestion Control
November 26th, 2018 Prof. Ion Stoica
TCP Sliding Windows, Flow Control, and Congestion Control
Presentation transcript:

Chapter 5 TCP Sliding Window Networking CS 3470, Section 1

Sliding Window Remember this? What was it useful for?

Sliding Window Revisited TCP’s variant of the sliding window algorithm, which serves several purposes: (1) it guarantees the reliable delivery of data, (2) it ensures that data is delivered in order, and (3) it enforces flow control between the sender and the receiver. (Same as Chapter 2 for (1) and (2), but adds flow control.)

Sliding Window Revisited Rather than having fixed-size sliding window, receiver advertises a window size to the sender AdvertisedWindow field in TCP header Sender is limited to having no more than AdvertisedWindow bytes of unACK’ed data at any given time Receiver selects this value based on amount of memory allocated to connection

Sliding Window Revisited Sender side LastByteAcked <= LastByteSent LastByteSent <= LastByteWritten Sender Receiver

Sliding Window Revisited Receiver side Less intuitive because of the problem of out-of- order delivery Sender Receiver

Sliding Window Revisited Receiver side LastByteRead < NextByteExpected NextByteExpected <= LastByteRcvd +1 Sender Receiver

TCP Flow Control - Receiver Receiver throttles the sender by advertising a window that is no larger than the amount of data it can buffer Receiver advertises following window size: AdvertisedWindow = MaxRcvBuffer – ((NextByteExpected -1) – LastByteRead) Represents amount of free space remaining in its buffer

TCP Flow Control - Receiver Size of AdvertisedWindow depends on how fast local application process is consuming data Window shrinks when NextByteExpected moves ahead faster than LastByteRead Window stays open when NextByteExpected moves at same rate of LastByteRead

TCP Flow Control - Sender TCP on sender must adhere to the advertised window it gets from the receiver. Must ensure that LastByteSent – LastByteAcked <= AdvertisedWindow

TCP Flow Control - Sender EffectiveWindow is amount of data that it can still send EffectiveWindow = AdvertisedWindow – (LastByteSent – LastByteAcked) Must be > 0 to send any data

TCP Flow Control - Sender TCP will block sending process if it tries to send more data than what fits in the effective window What happens when AdvertisedWindow is 0, and sender is not allowed to send any more segments?

Sequence Number SequenceNum field contains the sequence number for the first byte of data carried in segment Important for ??

Sequence Number SequenceNum field contains the sequence number for the first byte of data carried in segment Important for Detecting dropped packets Detecting out of order packets Flow control

simple telnet scenario TCP seq. #’s and ACKs Seq. #’s: byte stream “number” of first byte in segment’s data ACKs: seq # of next byte expected from other side cumulative ACK Q: how receiver handles out-of-order segments A: TCP spec doesn’t say, - up to implementer Host A Host B User types ‘C’ Seq=42, ACK=79, data = ‘C’ host ACKs receipt of ‘C’, echoes back ‘C’ Seq=79, ACK=43, data = ‘C’ host ACKs receipt of echoed ‘C’ Seq=43, ACK=80 time simple telnet scenario

Protecting against Wraparound Relevance of the 32-bit sequence number space The sequence number used on a given connection might wraparound A byte with sequence number x could be sent at one time, and then at a later time another byte with the same sequence number x could be sent

Protecting against Wraparound Packets cannot survive in the Internet for longer than the TCP Maximum Segment Lifetime (MSL), which is 120 sec We need to make sure that the sequence number does not wrap around within a 120-second period of time Depends on how fast data can be transmitted over the Internet

Protecting against Wraparound How many bytes of transferred data does the 32-bit sequence number represent?

Protecting against Wraparound How many bytes of transferred data does the 32-bit sequence number represent? 232 bytes are represented 4 GB of data can be sent!

Protecting against Wraparound Time until 32-bit sequence number space wraps around. TCP extension is used to extend sequence number space

Figuring out Wraparound Time 232 B / bandwidth (in Bytes) How long for wraparound on 2.5Gbps network (OC-48)? Convert bandwidth to Bytes 2.5 Gbps / 8 = 0.3125 GBps * 109 = 312,500,000 Bps 232 B / 312,500,000 Bps = 14 sec (Can also use 230 instead of 109)

Keeping the Pipe Full 16-bit AdvertisedWindow field must be big enough to allow the sender to keep the pipe full If the receiver has enough buffer space The window needs to be opened far enough to allow a full delay × bandwidth product’s worth of data Assuming an RTT of 100 ms (typical cross- country connection in US)

Required window size for 100-ms RTT. Keeping the Pipe Full Required window size for 100-ms RTT. Uh oh – 16 bit field only allows us to advertise a window of 64KB (216 = 65536 B = 64KB) TCP extension is used to extend AdvertisedWindow