CSE 461 University of Washington1 Topic The sliding window algorithm – Pipelining and reliability – Building on Stop-and-Wait Yeah! Network.

Slides:



Advertisements
Similar presentations
Introduction 1 Lecture 13 Transport Layer (Transmission Control Protocol) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer.
Advertisements

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.
Data Communications and Computer Networks Chapter 3 CS 3830 Lecture 16 Omar Meqdadi Department of Computer Science and Software Engineering University.
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.
Week 9 TCP9-1 Week 9 TCP 3 outline r 3.5 Connection-oriented transport: TCP m segment structure m reliable data transfer m flow control m connection management.
Transport Layer3-1 Homework r Chapter 2#10,13-18 r Due Wed September 17.
Go-Back-N Improve Stop-and-Wait by not waiting!
Flow and Error Control. Flow Control Flow control coordinates the amount of data that can be sent before receiving acknowledgement It is one of the most.
Chapter 3 outline 3.1 transport-layer services
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.
Transport Layer Transport Layer: TCP. Transport Layer 3-2 TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 r full duplex data: m bi-directional.
Transport Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
Transport Layer3-1 Reliable Data Transfer. Transport Layer3-2 Principles of Reliable data transfer r important in app., transport, link layers r top-10.
Announcement Project 2 out –Much harder than project 1, start early! Homework 2 due next Tu.
CSE 461: Sliding Windows & ARQ. Next Topic  We begin on the Transport layer  Focus  How do we send information reliably?  Topics  The Transport layer.
Transport Layer3-1 Data Communication and Networks Lecture 7 Transport Protocols: TCP October 21, 2004.
Announcement Homework 1 graded Homework 2 out –Due in a week, 1/30 Project 2 problems –Minet can only compile w/ old version of gcc (2.96). –Only tlab-login.
2: Application Layer 1 1DT066 Distributed Information System Chapter 3 Transport Layer.
20101 The Data Link Layer Chapter Design Issues Controls communication between 2 machines directly connected by “wire”-like link Services Provided.
Networking. Protocol Stack Generally speaking, sending an message is equivalent to copying a file from sender to receiver.
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.
Go-Back-N ARQ  packets transmitted continuously (when available) without waiting for ACK, up to N outstanding, unACK’ed packets  a logically different.
Network LayerII-1 RSC Part III: Transport Layer 3. TCP Redes y Servicios de Comunicaciones Universidad Carlos III de Madrid These slides are, mainly, part.
Transport Layer1 Reliable Transfer Ram Dantu (compiled from various text books)
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
ECE 4450:427/527 - Computer Networks Spring 2015 Dr. Nghi Tran Department of Electrical & Computer Engineering Lecture 5.3: Reliable Transmission Dr. Nghi.
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.
TCOM 509 – Internet Protocols (TCP/IP) Lecture 04_b Transport Protocols - TCP Instructor: Dr. Li-Chuan Chen Date: 09/22/2003 Based in part upon slides.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Data Link Layer Part I – Designing Issues and Elementary.
15-1 Last time □ Reliable Data Transfer ♦ Provide rdt over unreliable network layer ♦ FSM model ♦ rdt 1.0: rdt over reliable channels ♦ rdt 2.0: rdt over.
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.
rdt2.2: a NAK-free protocol
Transport Layer3-1 rdt2.1: sender, handles garbled ACK/NAKs Wait for call 0 from above sndpkt = make_pkt(0, data, checksum) udt_send(sndpkt) rdt_send(data)
CSE 461 University of Washington1 Where we are in the Course Finishing off the Link Layer! – Builds on the physical layer to transfer frames over connected.
Copyright © Lopamudra Roychoudhuri
11.1 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
TCP: Transmission Control Protocol Part II : Protocol Mechanisms Computer Network System Sirak Kaewjamnong Semester 1st, 2004.
Transport Layer3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April 2009.
Transport Layer: Sliding Window Reliability
11.1 Flow and Error Control Flow Control Error Control.
Data Link Layer Flow and Error Control. Flow Control Flow Control Flow Control Specifies the amount of data can be transmitted by sender before receiving.
Retransmission. Automatic Repeat reQuest (ARQ) 2 Time Packet ACK Timeout Automatic Repeat Request –Receiver sends acknowledgment (ACK) when it receives.
9: Pipelined Protocols and RTT Transport Layer 3-1 Slides adapted from: J.F Kurose and K.W. Ross,
1 Flow&Error Control R. Supakorn. 2 Flow Control Flow control refers to a set of procedure used to restrict the amount of data that the sender can send.
Transport Layer3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April 2009.
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 Direct Link Networks: Reliable Transmission Sections 2.5.
Transport Layer3-1 Transport Layer If you are going through Hell Keep going.
CSE331: Introduction to Networks and Security Lecture 4 Fall 2002.
Chi-Cheng Lin, Winona State University CS412 Introduction to Computer Networking & Telecommunication Data Link Layer Part II – Sliding Window Protocols.
1 The utopia protocol  Unrealistic assumptions: –processing time ignored –infinite buffer space available –simplex: data transmitted in one direction.
CSEN 404 Transport Layer II Amr El Mougy Lamia AlBadrawy.
DATA LINK CONTROL. DATA LINK LAYER RESPONSIBILTIES  FRAMING  ERROR CONTROL  FLOW CONTROL.
Computer Networking Lecture 16 – Reliable Transport.
1 COMP 431 Internet Services & Protocols The Transport Layer Pipelined Transport Protocols Jasleen Kaur March 29, 2016.
NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS ( NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS (PRACTICAL PART) Tutorial 4 : Chapter 7 Data & computer.
Chapter 3: The Data Link Layer –to achieve reliable, efficient communication between two physically connected machines. –Design issues: services interface.
Introduction to Networks
Introduction of Transport Protocols
TCP - Part II Relates to Lab 5. This is an extended module that covers TCP flow control, congestion control, and error control in TCP.
Overview Jaringan Komputer (2)
Chapter 5 Peer-to-Peer Protocols and Data Link Layer
9: Pipelined Protocols and RTT
The Transport Layer Reliability
Chapter 5 Peer-to-Peer Protocols and Data Link Layer
Presentation transcript:

CSE 461 University of Washington1 Topic The sliding window algorithm – Pipelining and reliability – Building on Stop-and-Wait Yeah! Network

CSE 461 University of Washington2 Recall ARQ with one message at a time is Stop-and-Wait (normal case below) Frame 0 ACK 0 Timeout Time SenderReceiver Frame 1 ACK 1

CSE 461 University of Washington3 Limitation of Stop-and-Wait It allows only a single message to be outstanding from the sender: – Fine for LAN (only one frame fit) – Not efficient for network paths with BD >> 1 packet

CSE 461 University of Washington4 Limitation of Stop-and-Wait (2) Example: R=1 Mbps, D = 50 ms – RTT (Round Trip Time) = 2D = 100 ms – How many packets/sec? – What if R=10 Mbps?

CSE 461 University of Washington5 Sliding Window Generalization of stop-and-wait – Allows W packets to be outstanding – Can send W packets per RTT (=2D) – Pipelining improves performance – Need W=2BD to fill network path

CSE 461 University of Washington6 Sliding Window (2) What W will use the network capacity? Ex: R=1 Mbps, D = 50 ms Ex: What if R=10 Mbps?

CSE 461 University of Washington7 Sliding Window (3) Ex: R=1 Mbps, D = 50 ms – 2BD = 10 6 b/sec x sec = 100 kbit – W = 2BD = 10 packets of 1250 bytes Ex: What if R=10 Mbps? – 2BD = 1000 kbit – W = 2BD = 100 packets of 1250 bytes

CSE 461 University of Washington8 Sliding Window Protocol Many variations, depending on how buffers, acknowledgements, and retransmissions are handled Go-Back-N » – Simplest version, can be inefficient Selective Repeat » – More complex, better performance

CSE 461 University of Washington9 Sliding Window – Sender Sender buffers up to W segments until they are acknowledged – LFS= LAST FRAME SENT, LAR= LAST ACK REC ’ D – Sends while LFS – LAR ≤ W LARLFS W=5 Acked Unacked 3.. Unavailable Available seq. number Sliding Window

CSE 461 University of Washington10 Sliding Window – Sender (2) Transport accepts another segment of data from the Application... – Transport sends it (as LFS–LAR  5) LARLFS W=5 Acked Unacked 3.. Unavailable seq. number 4

CSE 461 University of Washington11 Sliding Window – Sender (3) Next higher ACK arrives from peer… – Window advances, buffer is freed – LFS–LAR  4 (can send one more) LARLFS W=5 Acked 3.. Unavail. Available seq. number.. 2 Unacked

CSE 461 University of Washington12 Sliding Window – Go-Back-N Receiver keeps only a single packet buffer for the next segment – State variable, LAS = LAST ACK SENT On receive: – If seq. number is LAS+1, accept and pass it to app, update LAS, send ACK – Otherwise discard (as out of order)

CSE 461 University of Washington13 Sliding Window – Selective Repeat Receiver passes data to app in order, and buffers out-of-order segments to reduce retransmissions ACK conveys highest in-order segment, plus hints about out-of-order segments TCP uses a selective repeat design; we’ll see the details later

CSE 461 University of Washington14 Sliding Window – Selective Repeat (2) Buffers W segments, keeps state variable, LAS = LAST ACK SENT On receive: – Buffer segments [LAS+1, LAS+W] – Pass up to app in-order segments from LAS+1, and update LAS – Send ACK for LAS regardless

CSE 461 University of Washington15 Sliding Window – Retransmissions Go-Back-N sender uses a single timer to detect losses – On timeout, resends buffered packets starting at LAR+1 Selective Repeat sender uses a timer per unacked segment to detect losses – On timeout for segment, resend it – Hope to resend fewer segments

CSE 461 University of Washington16 Sequence Numbers Need more than 0/1 for Stop-and-Wait … – But how many? For Selective Repeat, need W numbers for packets, plus W for acks of earlier packets – 2W seq. numbers – Fewer for Go-Back-N (W+1) Typically implement seq. number with an N- bit counter that wraps around at 2 N —1 – E.g., N=8: …, 253, 254, 255, 0, 1, 2, 3, …

CSE 461 University of Washington17 Sequence Time Plot Time Seq. Number Acks (at Receiver) Delay (=RTT/2) Transmissions (at Sender)

CSE 461 University of Washington18 Sequence Time Plot (2) Time Seq. Number Go-Back-N scenario

CSE 461 University of Washington19 Sequence Time Plot (3) Time Seq. Number Loss Timeout Retransmissions

CSE 461 University of Washington20 Topic Adding flow control to the sliding window algorithm – To slow the over-enthusiastic sender Please slow down! Network

CSE 461 University of Washington21 Problem Sliding window uses pipelining to keep the network busy – What if the receiver is overloaded? Streaming video Big IronWee Mobile Arg …

CSE 461 University of Washington22 Sliding Window – Receiver Consider receiver with W buffers – LAS= LAST ACK SENT, app pulls in-order data from buffer with recv() call LAS W=5 Finished 3.. Too high seq. number 5555 Acceptable Sliding Window

CSE 461 University of Washington23 Sliding Window – Receiver (2) Suppose the next two segments arrive but app does not call recv() LAS W=5 Finished 3.. Too high Acceptable seq. number 5555

CSE 461 University of Washington24 Sliding Window – Receiver (3) Suppose the next two segments arrive but app does not call recv() – LAS rises, but we can’t slide window! LAS W=5 Finished 3.. Too high Acceptable seq. number Acked

CSE 461 University of Washington25 Sliding Window – Receiver (4) If further segments arrive (even in order) we can fill the buffer – Must drop segments until app recvs! LAS W=5 Finished 3.. Too high Nothing Acceptable seq. number Acked 4 44

CSE 461 University of Washington26 Sliding Window – Receiver (5) App recv() takes two segments – Window slides (phew) LAS W=5 Finished 3.. Too high Acceptable seq. number Acked

CSE 461 University of Washington27 Flow Control Avoid loss at receiver by telling sender the available buffer space – WIN =#Acceptable, not W (from LAS) LAS W=5 Finished 3.. Too high Acceptable seq. number Acked

CSE 461 University of Washington28 Flow Control (2) Sender uses the lower of the sliding window and flow control window ( WIN ) as the effective window size LAS WIN=3 Finished 3.. Too high seq. number Acked

CSE 461 University of Washington29 Flow Control (3) TCP-style example – SEQ / ACK sliding window – Flow control with WIN – SEQ + length < ACK + WIN – 4KB buffer at receiver – Circular buffer of bytes