Selective Repeat.

Slides:



Advertisements
Similar presentations
Chapter 3 The Data Link Layer.
Advertisements

The Data Link Layer Chapter 3. Data Link Layer Design Issues Services Provided to the Network Layer Framing Error Control Flow Control.
Sliding window protocols:  Window: subset of consecutive frames  only frames in window can be sent.
Network Operations & administration CS 4592 Lecture 15 Instructor: Ibrahim Tariq.
11-1 FRAMING The data link layer needs to pack bits into frames, so that each frame is distinguishable from another. Our postal system practices a type.
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 We want to minimize the amount of error correcting and detecting we need to do.
Go-Back-N Improve Stop-and-Wait by not waiting!
Chapter 11 Data Link Control
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.
11-5 NOISY CHANNELS Although the Stop-and-Wait Protocol gives us an idea of how to add flow control to its predecessor, noiseless channels are nonexistent.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 11 Data Link Control and Protocols.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 13 Introduction to the Transport.
11.1 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Cs4411 – Operating Systems Practicum November 4, 2011 Zhiyuan Teo Supplementary lecture 4.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 13 Introduction to Computer Networks.
20101 The Data Link Layer Chapter Design Issues Controls communication between 2 machines directly connected by “wire”-like link Services Provided.
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:
Principles of Reliable Data Transfer. Reliable Delivery Making sure that the packets sent by the sender are correctly and reliably received by the receiver.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
11.1 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Data Link Layer We have now discussed the prevalent shared channel technologies  Ethernet/IEEE  Wireless LANs (802.11) We have now covered chapters.
Cyclic Code. Linear Block Code Hamming Code is a Linear Block Code. Linear Block Code means that the codeword is generated by multiplying the message.
11.1 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Computer Networks Module 3: Data Link Layer (Framing) Dr. Vikram Shete St. Francis Institute of Technology.
Chapter 11 Data Link Control
Copyright © Lopamudra Roychoudhuri
11.1 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Midterm Review. Physical Layer Physical layer design goal: send out bits as fast as possible with acceptable low error ratio C=B*log(1+S/N) – C is the.
Lecture Focus: Data Communications and Networking  Data Link Layer  Data Link Control Lecture 22 CSCS 311.
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.
Data Link Layer. Data link layer The communication between two machines that can directly communicate with each other. Basic property – If bit A is sent.
Part III. Data Link Layer Chapter 11. Data Link Control COMP 3270 Computer Networks Computing Science Thompson Rivers University.
Midterm Review. Physical Layer Physical layer design goal: send out bits as fast as possible with acceptable low error ratio C=B*log(1+S/N) – C is the.
Chi-Cheng Lin, Winona State University CS412 Introduction to Computer Networking & Telecommunication Data Link Layer Part II – Sliding Window Protocols.
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.
Data Link Layer.
Chapter 3: The Data Link Layer –to achieve reliable, efficient communication between two physically connected machines. –Design issues: services interface.
Computer Communication & Networks
2.10 Flow and Error Control Before that ...
Reliable Transmission
Data Link Layer Flow Control.
Data Link Layer - 3 Dr. Sanjay P. Ahuja, Ph.D.
March 21, 2001 Recall we have talked about the Sliding Window Protocol for Flow Control Review this protocol A window of size I can contain at most I.
Part III Datalink Layer 10.
Chapter 11 Data Link Control
Net 221D : Computer Networks Fundamentals
6 Transport Layer Computer Networks Tutun Juhana
Instructor Mazhar Hussain
Data Link Layer What does it do?
Data Link Layer.
Introduction of Transport Protocols
Flow Control.
Data Link Layer: Data Link Control
Introduction to the Transport Layer
Chapter 23 Introduction To Transport Layer
Flow and Error Control.
Overview Jaringan Komputer (2)
Transport Layer Our goals:
CS4470 Computer Networking Protocols
Selective repeat Protocol
Sliding Window Protocol
Chapter 11 Data Link Control
Getting Connected (Chapter 2 Part 3)
9: Pipelined Protocols and RTT
The Transport Layer Reliability
Presentation transcript:

Selective Repeat

Selective Repeat (Protocol 5) Further optimization. Receiver has a window greater than 1. Don’t discard frames simply because some earlier frames was damaged. 7/26/2019 5:37:56 PM

Selective Repeat Note: assuming the sequence number is the frame ID. Sender. while (1) { If network layer got data, if current window not full yet, read data, send to physical layer with the current frame ID. Start timer. Increment frame ID by one. If got ACKm, if m is outside the window, don’t do anything. If m is inside the window, consider all frames in the window with frame ID less than the m acked. Forward window to m. If timeout for frame m, resend m. } Receiver Get frame from the physical layer. If it is within the receiver window and hasn’t been received before, fill in the slot, and forward the beginning of the receiver window if necessary. Deliver to the network layer all frames between the beginning of the old receiver window and the new receiver window – 1, inclusive. Send ACK (Expc = the beginning of the current receiver window). Note: assuming the sequence number is the frame ID. 7/26/2019 5:37:56 PM

The Timer Each packet in the sender’s window should have a timer. If the window contains F0,F1,F2,F3. Could it happen that the when the timer for F0 expires, the timer for F1 has not expired yet? Yes, if you do not send the frames one-by-one. Could it happen that the timer for F1 expires but the timer for F0 has not? Yes, if F0 has been retransmitted before. 7/26/2019 5:37:56 PM

Sequence Number If the sequence number field is 3 bits, how large should the sender/receiver window be? Should the receiver has a different window size than the sender? No, larger --- makes no sense, the sender is not going to send that many outstanding frames, smaller --- wrong, because the receiver will discard such packets. Window size should be 4. 7/26/2019 5:37:56 PM

Sequence Number For 0 to be in my window again, I must have forwarded to 5. When I forwarded to 5, I must have got 4. I got 4 because the sender sent 4. The sender sent 4 only if it got ACK for 0. 7/26/2019 5:37:56 PM

Sequence Number A proof. Let the sequence number be log_2{N} bits. Let the window size be W, where W <= N/2. Suppose the receiver gets a frame with sequence number m. He thinks it is for frame x. Could he actually receive frame x-N (with the same seq#)? No. Because when x is in his window, the window has forwarded to x-W+1, at least. So he has got x-W. The sender has sent x-W. The sender will do so only if it has got ACK for x-2W+1. If W <=N/2, the sender must have got ACK for x-N. 7/26/2019 5:37:56 PM

Selective Repeat 7/26/2019 5:37:56 PM

Piggybacking Considered only one direction. Bidirection. Piggybacking Combining ACK with data When no data? Wait some time and ACK anyway. Internet. PPP. 7/26/2019 5:37:56 PM

Framing How does the receiver know where is the start and where is the end of a frame? Counter. Tell the receiver how many bytes there are in this frame. Problems? The counter part could be corrupted and you are done.

Flag Bytes Add special bytes to the beginning and the end of the frame. Problems? What if the data contains the flag bytes? Add ESC byte to each flag or ESC in the data. Stuffing.