CSE331: Introduction to Networks and Security Lecture 4 Fall 2002.

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.
Assume that a file is transferred from a node A to a node B. The file has been fragmented in 5 frames. Frame 0 is corrupted, the ACK of frame 1 is corrupted,
Data link control. Data Link Control –Flow Control how much data may sent –Error Control How can error be detected and corrected.
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.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 11 Data Link Control and Protocols.
Spring 2002CS 4611 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
Chapter 2 Designing Reliable Protocols Professor Rick Han University of Colorado at Boulder
CSE331: Introduction to Networks and Security Lecture 5 Fall 2002.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 13 Introduction to Computer Networks.
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.
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 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.
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.
CSE 461 University of Washington1 Topic The sliding window algorithm – Pipelining and reliability – Building on Stop-and-Wait Yeah! Network.
Go-Back-N ARQ  packets transmitted continuously (when available) without waiting for ACK, up to N outstanding, unACK’ed packets  a logically different.
Data Link Control Protocols
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.
14-Oct-15Computer Networks1 Reliable Transmission.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Data Link Layer Part I – Designing Issues and Elementary.
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.
Spring 2001CS 5851 Outline Building Blocks Shannon’s Theorem Encoding 11. Physical Layer.
Transport Layer: Sliding Window Reliability
Lecture Focus: Data Communications and Networking  Data Link Layer  Data Link Control Lecture 22 CSCS 311.
CS 453 Computer Networks Lecture 11 Layer 2 – Data Link Layer Protocols.
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.
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.
DATA LINK CONTROL. DATA LINK LAYER RESPONSIBILTIES  FRAMING  ERROR CONTROL  FLOW CONTROL.
Computer Networking Lecture 16 – Reliable Transport.
NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS ( NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS (PRACTICAL PART) Tutorial 4 : Chapter 7 Data & computer.
CS380 Int. to Comp. Networks Data Link Networks - Part II1 Reliable Transmission How to fix corrupted frames. –Error correcting codes too expensive –Should.
Computer Communication & Networks
Reliable Transmission
Data Link Layer Flow Control.
Data Link Layer - 3 Dr. Sanjay P. Ahuja, Ph.D.
Part III Datalink Layer 10.
Getting Connected (Chapter 2 Part 3)
B. R. Chandavarkar CSE Dept., NITK Surathkal
Instructor Mazhar Hussain
Introduction of Transport Protocols
Flow Control.
ECE 4450:427/527 - Computer Networks Spring 2017
Chapter 5 Peer-to-Peer Protocols and Data Link Layer
Getting Connected (Chapter 2 Part 3)
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
Chapter 5 Peer-to-Peer Protocols and Data Link Layer
Lecture 4 Peer-to-Peer Protocols and Data Link Layer
TCP Sliding Windows, Flow Control, and Congestion Control
Error detection: Outline
TCP Sliding Windows, Flow Control, and Congestion Control
Presentation transcript:

CSE331: Introduction to Networks and Security Lecture 4 Fall 2002

CSE331 Fall Announcements HW1 is due today HW2 on the web site – due next Friday Project 1 will be handed out next Friday –Form groups of two or three –Mail group members to Aditya –If you can’t find a partner, mail Aditya –Groups should be formed before project is handed out

CSE331 Fall Recap Link-layer protocols –Frame transmission –Error detection (CRC)

CSE331 Fall Today: Reliable Transmission Now we can detect errors… What do we do when we find one? Corrupt frames must be discarded. Need to recover these lost frames.

CSE331 Fall Fundamental mechanisms Acknowledgments (ACK) –Small control frame (little data) –When sender gets an ACK, recipient has successfully gotten a frame Timeouts –If sender doesn’t get an ACK after “reasonable” time it retransmits the original General strategy called Automatic Repeat Request (ARQ)

CSE331 Fall Stop-and-Wait Simplest scheme –After transmitting one frame, sender waits for an ACK –If the ACK doesn’t arrive, sender retransmits

CSE331 Fall Stop-and-Wait scenario 1 SenderReceiver Time Timeout frame ACK Everything works

CSE331 Fall Stop-and-Wait scenario 2 SenderReceiver Time Timeout ACK Timeout frame Original frame Lost & Resent

CSE331 Fall Stop-and-Wait scenario 3 SenderReceiver Time Timeout ACK Timeout frame ACK ACK Lost

CSE331 Fall Stop-and-Wait scenario 4 SenderReceiver Time Timeout ACK Timeout frame ACK Timeout too short

CSE331 Fall Sequence numbers SenderReceiver Time Timeout ACK 0 Timeout frame 0 ACK 0 Add a 1-bit sequence number so receiver can detect repeated frames.

CSE331 Fall Stop-and-Wait Inefficient use of link’s capacity Sends 1 frame per RTT Example: –10Mbs Link –16ms RTT –Delay x Bandwidth product is about 20KB –Frame size of 1K yields about 5% link capacity

CSE331 Fall More efficient solution SenderReceiver Time Sender ready to transmit N+1 st frame just as 1 st ACK arrives. N = delay x bandwidth frame size

CSE331 Fall Sliding Window Algorithm Sender assigns a sequence number to each frame: SeqNum –For now, assume SeqNum can grow infinitely Send Window Size (SWS) –Upper bound on # of unacknowledged frames sender can transmit Last ACK Received (LAR) –Sequence number of last ACK Last Frame Sent (LFS)

CSE331 Fall Sender Invariant LFS – LAR  SWS Associates timeout with each frame sent –Retransmits if no ACK received before timout When ACK arrives, increase LAR –Means another frame can be sent LARLFS  SWS Sender’s frames SeqNum

CSE331 Fall Receiver Receive Window Size (RWS) –Number of out-of-order frames it will accept Largest Acceptable Frame (LAF) Largest Frame Received (LFR) LAF – LFR  RWS LFRLAF  RWS Receiver’s frames SeqNum

CSE331 Fall Receiver Algorithm When packet numbered SeqNum arrives –If (SeqNum  LFR) or (SeqNum > LAF) discard –Else accept the packet Define: SeqNumToAck –Largest unACK’ed sequence # s.t. all earlier frames have been accepted Receiver sends ACK(SeqNumToAck) LFR = SeqNumToAck Laf = LFR + RWS

CSE331 Fall Example Sliding Window Protocol 1234 LAR SWS = RWS = 3 SenderReceiver 1234 LFR Sender begins sending frames 1,2,3 with appropriate timers

CSE331 Fall Example Sliding Window Protocol 1234 LAR SWS = RWS = 3 SenderReceiver 1234 LFR 1 Receiver gets frame 1 SeqNumToAck = 1 Receiver sends ACK(1) LFR = 1 LAF = LFR + RWS LFR

CSE331 Fall Example Sliding Window Protocol 1234 LAR SWS = RWS = 3 SenderReceiver LFR While ACK(1) is in transit, frame 2 is lost and frame 3 is accepted. 3

CSE331 Fall Example Sliding Window Protocol 1234 LAR SWS = RWS = 3 SenderReceiver LFR SeqNumToAck = 1 Receiver sends another Ack(1) message. 3 1

CSE331 Fall Example Sliding Window Protocol 1234 LAR SWS = RWS = 3 SenderReceiver LFR Sender gets ACK(1). Sets LAR = 1 Increases LFS to 4 3 1

CSE331 Fall Example Sliding Window Protocol 1234 LAR SWS = RWS = 3 SenderReceiver LFR Sender transmits frame 4 and then the timer for frame 2 expires, so it resends

CSE331 Fall Example Sliding Window Protocol 1234 LAR SWS = RWS = 3 SenderReceiver LFR Sender gets ACK(1) again—ignores it Receiver gets frame 4 SeqNumToAck = 1 Receiver sends ACK(1) 1 4

CSE331 Fall Example Sliding Window Protocol 1234 LAR SWS = RWS = 3 SenderReceiver LFR Receiver gets frame 2 SeqNumToAck = 4 Receiver sends ACK(4) 1 42 LFR = 4 LAF = LFR + RWS 567 4

CSE331 Fall Example Sliding Window Protocol 1234 LAR SWS = RWS = 3 SenderReceiver LFR Sender gets ACK(1) again—ignores it. Sender gets ACK(4) Sets LAR = 4 Increases LFS 567

CSE331 Fall Variants on Sliding Window Receiver doesn’t transmit redundant ACKs Receiver transmits selective ACKS –ACK indicates exactly which frames have been accepted

CSE331 Fall Window Sizes If RTT x Bandwidth product is known then SWS = RTT x Bandwidth / Framesize Receive window size: –1 = no buffering of out-of-order frames –RWS = SWS buffers as many as can be in flight –Note that RWS > SWS is not sensible

CSE331 Fall Finite Sequence Numbers Recall that for Stop-and-Wait we needed two sequence numbers. How many do we need for Sliding Window? Suppose SWS=RWS –How many sequence numbers should there be? –Is SWS + 1 sufficient?

CSE331 Fall Sufficient MaxSeqNum Frame i’s sequence num is i%MaxSeqNum Assuming SWS = RWS SWS < (MaxSeqNum + 1)/2 Why? –Consider case where all the ACKS are lost. –Suppose SWS = RWS = 3 –MaxSeqNum = 5 (sequence numbers = 0,1,2,3,4) is insufficient

CSE331 Fall Roles of Sliding Window Algorithm Reliable delivery –It provides an efficient retransmission protocol for dealing with errors In-order delivery –The receiver buffers frames and delivers them in sequence number order Flow control –It sends ACKs back to give hints to sender –More sophisticate version could give # of frames the receiver has room for—throttles the sender.

CSE331 Fall Sliding window in practice TCP (Transmission Control Protocol) –Transportation layer protocol –Uses sliding window algorithm –More complex because it’s used in an Internetwork – not over a direct link –Bandwidth x delay not known –Dynamically changes timeouts –Larger buffers for in-order delivery