Transport Layer: Sliding Window Reliability

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.
Introduction 1 Lecture 13 Transport Layer (Transmission Control Protocol) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer.
Transport Layer3-1 TCP. Transport Layer3-2 TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 r full duplex data: m bi-directional data flow in same connection.
Transport Layer3-1 Summary of Reliable Data Transfer Checksums help us detect errors ACKs and NAKs help us deal with errors If ACK/NAK has errors sender.
EEC-484/584 Computer Networks Lecture 12 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Chapter 3 outline 3.1 transport-layer services
EEC-484/584 Computer Networks Lecture 14 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Spring 2002CS 4611 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
EEC-484/584 Computer Networks Lecture 12 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Chapter 2 Designing Reliable Protocols Professor Rick Han University of Colorado at Boulder
Transport Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
EEC-484/584 Computer Networks Lecture 14 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Transport Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
EE 122: Error detection and reliable transmission Ion Stoica September 16, 2002.
1 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
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.
Spring 2004 EE4272 Direct Link Networks (I) Hardware Building Blocks (nodes & links) 5 Issues before Exchanging Packets  Encoding  Framing  Error Detection.
Spring 2003CS 4611 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
2: Application Layer 1 1DT066 Distributed Information System Chapter 3 Transport Layer.
3-1 Transport services and protocols r provide logical communication between app processes running on different hosts r transport protocols run in end.
Networking. Protocol Stack Generally speaking, sending an message is equivalent to copying a file from sender to receiver.
1 Reliable Data Transfer. 2 r Problem: Reliability  Want an abstraction of a reliable link even though packets can be corrupted or get lost r Solution:
18-Aug-154/598N: Computer Networks Overview Direct link networks –Error detection - Section 2.4 –Reliable transmission - Section 2.5.
Principles of Reliable Data Transfer. Reliable Delivery Making sure that the packets sent by the sender are correctly and reliably received by the receiver.
CSE 461 University of Washington1 Topic The sliding window algorithm – Pipelining and reliability – Building on Stop-and-Wait Yeah! Network.
Transport Layer1 Reliable Transfer Ram Dantu (compiled from various text books)
ECE 4450:427/527 - Computer Networks Spring 2015 Dr. Nghi Tran Department of Electrical & Computer Engineering Lecture 5.3: Reliable Transmission Dr. Nghi.
14-Oct-15Computer Networks1 Reliable Transmission.
3: Transport Layer3b-1 TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 r full duplex data: m bi-directional data flow in same connection m MSS: maximum.
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
Transport Layer Moving Segments. Transport Layer Protocols Provide a logical communication link between processes running on different hosts as if directly.
1 Introduction to Computer Networks University of ilam Dr. Mozafar Bag-Mohammadi Transport Layer.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 15.
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.
Link Layer Dr. Mozafar Bag-Mohammadi Ilam University.
Spring 2001CS 5851 Outline Building Blocks Shannon’s Theorem Encoding 11. Physical Layer.
Retransmission. Automatic Repeat reQuest (ARQ) 2 Time Packet ACK Timeout Automatic Repeat Request –Receiver sends acknowledgment (ACK) when it receives.
Transport Layer3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April 2009.
1 Direct Link Networks: Reliable Transmission Sections 2.5.
IT 424 Networks2 IT 424 Networks2 Ack.: Slides are adapted from the slides of the book: “Computer Networking” – J. Kurose, K. Ross Chapter 3: Transport.
Transport Layer3-1 Transport Layer If you are going through Hell Keep going.
CSE331: Introduction to Networks and Security Lecture 4 Fall 2002.
CSEN 404 Transport Layer II Amr El Mougy Lamia AlBadrawy.
Computer Networking Lecture 16 – Reliable Transport.
1 COMP 431 Internet Services & Protocols The Transport Layer Pipelined Transport Protocols Jasleen Kaur March 29, 2016.
CS380 Int. to Comp. Networks Data Link Networks - Part II1 Reliable Transmission How to fix corrupted frames. –Error correcting codes too expensive –Should.
Chapter 3: The Data Link Layer –to achieve reliable, efficient communication between two physically connected machines. –Design issues: services interface.
9. Principles of Reliable Data Transport – Part 1
Reliable Transmission
Introduction to Networks
Transport Layer: Sliding Window Reliability
Review: UDP demultiplexing TCP demultiplexing Multiplexing?
Introduction of Transport Protocols
ECE 4450:427/527 - Computer Networks Spring 2017
Transport Layer Our goals:
Transport Layer Our goals:
Reliable transmission
Point-to-Point Links Outline Encoding Framing Error Detection
CSS432 (Link Level Protocols) Reliable Transmission Textbook Ch 2.5
TCP Sliding Windows, Flow Control, and Congestion Control
Advanced Computer Networks
Getting Connected (Chapter 2 Part 3)
The Transport Layer Reliability
Transport Layer Outline Intro to transport UDP
TCP Sliding Windows, Flow Control, and Congestion Control
Error detection: Outline
TCP Sliding Windows, Flow Control, and Congestion Control
Presentation transcript:

Transport Layer: Sliding Window Reliability Outline RTT estimation using EWMA Stop and Wait Sliding Window Algorithms CS 640

Transport layer functions Transport protocol defines the pattern/sequence for end hosts sending packets Transport has to deal with a number of things Multiplexing/demultiplexing – ports and message queues Error detection within packets - checksums Reliable, in order delivery of packets - Today Flow control – Today Connection management - TBD Congestion control – TBD We’re moving toward understanding TCP CS 640

Methods of Reliability Packets can be lost and/or corrupted during transmission Bit level errors due to noise Loss due to congestion Use checksums to detect bit level errors Internet Checksum is optionally used to detect errors in UDP Uses 16 bits to encode one’s complement sum of data + headers When bit level errors are detected, packets are dropped Build reliability into the transmission protocol Using acknowledgements and timeouts to signal lost or corrupt frame CS 640

Acknowledgements & Timeouts An acknowledgement (ACK) is a packet sent by one host in response to a packet it has received Making a packet an ACK is simply a matter of changing a field in the transport header Data can be piggybacked in ACKs A timeout is a signal that an ACK to a packet that was sent has not yet been received within a specified timeframe A timeout triggers a retransmission of the original packet from the sender How are timers set? CS 640

Acknowledgements & Timeouts CS 640

Propagation Delay Propagation delay is defined as the delay between transmission and receipt of packets between hosts Propagation delay can be used to estimate timeout period How can propagation delay be measured? What else must be considered in the measurement? CS 640

Exponentially weighted moving average RTT estimation EWMA was original algorithm for TCP Measure SampleRTT for each packet/ACK pair Compute weighted average of RTT EstRTT = a x EstimatedRTT + b x 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 x EstRTT CS 640

Stop-and-Wait Process Sender Receiver Sender doesn’t send next packet until he’s sure receiver has last packet The packet/Ack sequence enables reliability Sequence numbers help avoid problem of duplicate packets Problem: keeping the pipe full Example 1.5Mbps link x 45ms RTT = 67.5Kb (8KB) 1KB frames imples 1/8th link utilization CS 640

Solution: Pipelining via Sliding Window Allow multiple outstanding (un-ACKed) frames Upper bound on un-ACKed frames, called window Sender Receiver T ime … CS 640

Buffering on Sender and Receiver Sender needs to buffer data so that if data is lost, it can be resent Receiver needs to buffer data so that if data is received out of order, it can be held until all packets are received Flow control How can we prevent sender overflowing receiver’s buffer? Receiver tells sender its buffer size during connection setup How can we insure reliability in pipelined transmissions? Go-Back-N Send all N unACKed packets when a loss is signaled Inefficient Selective repeat Only send specifically unACKed packets A bit trickier to implement CS 640

Sliding Window: Sender Assign sequence number to each frame (SeqNum) Maintain three state variables: send window size (SWS) last acknowledgment received (LAR) last frame sent (LFS) Maintain invariant: LFS - LAR <= SWS Advance LAR when ACK arrives Buffer up to SWS frames £ SWS LAR LFS … CS 640

Sliding Window: Receiver Maintain three state variables receive window size (RWS) largest frame acceptable (LFA) last frame received (LFR) Maintain invariant: LFA - LFR <= RWS Frame SeqNum arrives: if LFR < SeqNum < = LFA accept if SeqNum < = LFR or SeqNum > LFA discarded Send cumulative ACKs – send ACK for largest frame such that all frames less than this have been received £ RWS LFR LFA … CS 640

Sequence Number Space SeqNum field is finite; sequence numbers wrap around Sequence number space must be larger then number of outstanding frames SWS <= MaxSeqNum-1 is not sufficient suppose 3-bit SeqNum field (0..7) SWS=RWS=7 sender transmit frames 0..6 arrive successfully, but ACKs lost sender retransmits 0..6 receiver expecting 7, 0..5, but receives the original incarnation of 0..5 SWS < (MaxSeqNum+1)/2 is correct rule Intuitively, SeqNum “slides” between two halves of sequence number space CS 640

Another Pipelining Possibility: Concurrent Logical Channels Multiplex 8 logical channels over a single link Run stop-and-wait on each logical channel Maintain three state bits per channel channel busy current sequence number out next sequence number in Header: 3-bit channel num, 1-bit sequence num 4-bits total same as sliding window protocol Separates reliability from order CS 640

Stop & wait sequence numbers Sender Receiver Sender Receiver Sender Receiver Frame 0 Frame 0 Frame 0 imeout imeout ACK 0 T T ACK 0 ACK 0 Frame 0 Frame 1 Frame 0 imeout imeout T ACK 0 ACK 1 ACK 0 T Frame 0 (c) (d) ACK 0 (e) Simple sequence numbers enable the client to discard duplicate copies of the same frame Stop & wait allows one outstanding frame, requires two distinct sequence numbers CS 640

Sliding Window Example Sender Receiver 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 A3 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 4 5 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 A4 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 2 3 4 5 6 7 8 9 10 11 12 13 14 CS 640

Sliding Window Summary Sliding window is best known algorithm in networking First role is to enable reliable delivery of packets Timeouts and acknowledgements Second role is to enable in order delivery of packets Receiver doesn’t pass data up to app until it has packets in order Third role is to enable flow control Prevents server from overflowing receiver’s buffer CS 640