Lecture Focus: Data Communications and Networking  Data Link Layer  Data Link Control Lecture 22 CSCS 311.

Slides:



Advertisements
Similar presentations
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 14 Introduction to Computer Networks.
Advertisements

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,
11.1 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
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.
ELEN 602 Lecture 5 Review of last lecture –Error Detection -- parity/CRC etc. Automatic Retransmission Request (ARQ) Reading: Chap
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.
11.1 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Lect11.ppt - 03/15/05 CDA 6505 Network Architecture and Client/Server Computing Lecture 11 Link-Level Flow and Error Control by Zornitza Genova Prodanoff.
Link-Level Flow and Error Control
15 - Winter 2006 ECE ECE 766 Computer Interfacing and Protocols 1 Data Link Control Physical layer is only responsible for data transmission Data link.
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.
11.1 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
11.1 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
11.1 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Data Link Control and Protocols.
11.1 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
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.
Error/Flow Control Modeling (ARQ Modeling). Modeling of Go Back N.
Computer Networks Module 3: Data Link Layer (Framing) Dr. Vikram Shete St. Francis Institute of Technology.
Chapter 11 Data Link Control
11.1 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Data Link and Flow Control Networks and Protocols Prepared by: TGK First Prepared on: Last Modified on: Quality checked by: Copyright 2009 Asia Pacific.
Chapter 3: Channel Coding (part 3). Automatic repeat request (ARQ) protocols ▫Used in combination with error detection/correction ▫Block of data with.
11.1 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
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.
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.
Chapter 11 Data Link Control.
1 Direct Link Networks: Reliable Transmission Sections 2.5.
CSCI 465 D ata Communications and Networks Lecture 11 Martin van Bommel CSCI 465 Data Communications & Networks 1.
Part III. Data Link Layer Chapter 11. Data Link Control COMP 3270 Computer Networks Computing Science Thompson Rivers University.
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.
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.
Powerpoint Templates Data Communication Muhammad Waseem Iqbal Lec # 15.
Computer Communication & Networks
2.10 Flow and Error Control Before that ...
Data Link Layer Flow Control.
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
UNIT 4 Data Link Control Line Discipline Flow Control Error Control
Chapter 23 Introduction To Transport Layer
Chapter 11 Data Link Control
6 Transport Layer Computer Networks Tutun Juhana
Instructor Mazhar Hussain
Chapter 3 Data Link Layer.
Flow Control.
Flow and Error Control.
Overview Jaringan Komputer (2)
Selective repeat Protocol
Sliding Window Protocol
Chapter 11 Data Link Control
Presentation transcript:

Lecture Focus: Data Communications and Networking  Data Link Layer  Data Link Control Lecture 22 CSCS 311

Data Link Control PROTOCOLS For Noiseless Channel For Noisy Channel Simplest Stop-and-Wait Stop-and-Wait ARQ Go-Back-N ARQ Selective Repeat ARQ    Today’s Discussion

Data Link Control PROTOCOLS: NOISY CHANNELS Go-Back-N ARQ Protocol  It is very useful that a task is begun before the previous task has ended.This is known as pipelining.  There is no pipelining in Stop-and-Wait ARQ because we need to wait for a frame to reach the destination and be acknowledged before the next frame can be sent.  Pipelining does apply to other two Noisy channel protocols:  Several frames can be sent before we receive news about the previous frames.  Pipelining improves the efficiency of the transmission. Pipelining

Data Link Control PROTOCOLS: NOISY CHANNELS Go-Back-N ARQ Protocol  To improve the efficiency of transmission, multiple frames must be in transition while waiting for acknowledgment.  We want to keep the channel busy while the sender is waiting for acknowledgment.  In Go-Back-N ARQ protocol:  We can send several frames before receiving acknowledgments.  We keep a copy of these frames until the acknowledgments arrive.

Data Link Control PROTOCOLS: NOISY CHANNELS Go-Back-N ARQ Protocol  Frames from a sender station are numbered sequentially.  As we need to include the sequence number of each frame in the header, we need to set a limit.  If the header of the frame allows m bits for the sequence number, the sequence numbers range from 0 to 2 m - 1.  For example, if m is 4, the only sequence numbers are 0 through 15 inclusive.  We can repeat the sequence. So the sequence numbers are: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,...  In other words, the sequence numbers are modulo-2 m. Sequence Numbers

Data Link Control PROTOCOLS: NOISY CHANNELS Go-Back-N ARQ Protocol Sliding Window  Sliding window defines the range of sequence numbers.  The sender and receiver need to deal with only part of the possible sequence numbers:  The range which is the concern of the sender is called the send sliding window.  The range that is the concern of the receiver is called the receive sliding window.

Data Link Control PROTOCOLS: NOISY CHANNELS Go-Back-N ARQ Protocol Sliding Window Send sliding window  Send window is an imaginary box covering the sequence numbers of the data frames which can be in transit.  In each window position, some of these sequence numbers define the frames that have been sent; others define those that can be sent.  The maximum size of the window is 2 m – 1.  Window size may be fixed and set to the maximum value, but some protocols may have a variable window size.

Data Link Control PROTOCOLS: NOISY CHANNELS Go-Back-N ARQ Protocol Sliding Window Send sliding window  Figure below shows a sliding window of size 15 (m = 4). Send window before sliding

Data Link Control PROTOCOLS: NOISY CHANNELS Go-Back-N ARQ Protocol Sliding Window  The window at any time divides the possible sequence numbers into four regions: 1.First region, from the far left to the left wall of the window, defines the sequence numbers belonging to frames already acknowledged.  Sender does not worry about these frames and keeps no copies of them. 2.Second region defines the range of sequence numbers belonging to the frames that are sent and have an unknown status.  Sender needs to wait to find out if these frames have been received or were lost. We call these outstanding frames. 3.Third range defines the range of sequence numbers for frames that can be sent;however, the corresponding data packets have not yet been received from the network layer. 4.Fourth region defines sequence numbers that cannot be used until the window slides.

Data Link Control PROTOCOLS: NOISY CHANNELS Go-Back-N ARQ Protocol Sliding Window  Three variables define window size and location at any time:  S f (send window, the first outstanding frame)  Sequence number of the first (oldest) outstanding frame.  S n (send window, the next frame to be sent)  Sequence number that will be assigned to the next frame to be sent.  S size (send window, size).  Defines the size of the window

Data Link Control PROTOCOLS: NOISY CHANNELS Go-Back-N ARQ Protocol Sliding Window  Figure below shows how a send window can slide one or more slots to the right when an acknowledgment arrives from the other end.  The acknowledgments in this protocol are cumulative, meaning that more than one frame can be acknowledged by an ACK frame.  In this figure, frames 0, 1, and 2 are acknowledged, so the window has slid to the right three slots.  Note that the value of S f is 3 because frame 3 is now the first outstanding frame. The send window can slide one or more slots when a valid acknowledgment arrives.

Data Link Control PROTOCOLS: NOISY CHANNELS Go-Back-N ARQ Protocol Sliding Window Send window after sliding

Data Link Control PROTOCOLS: NOISY CHANNELS Go-Back-N ARQ Protocol Sliding Window Receive sliding window  The receive window makes sure that the correct data frames are received and that the correct acknowledgments are sent.  The size of the receive window is always 1.  The receiver is always looking for the arrival of a specific frame.  Any frame arriving out of order is discarded and needs to be resent.  Figure below shows the receive window. The receive window has one single variable Rn. Window slides when a correct frame has arrived; sliding occurs one slot at a time.

Data Link Control PROTOCOLS: NOISY CHANNELS Go-Back-N ARQ Protocol Sliding Window Receive sliding window Receive window after sliding Receive window

Data Link Control PROTOCOLS: NOISY CHANNELS Go-Back-N ARQ Protocol Sliding Window Receive sliding window  Sequence numbers to the left of the window belong to the frames already received and acknowledged.  Sequence numbers to the right of this window define the frames that cannot be received.  Any received frame with a sequence number in these two regions is discarded.  Only a frame with a sequence number matching the value of R n is accepted and acknowledged.  The receive window also slides, but only one slot at a time.  When a correct frame is received (and a frame is received only one at a time), the window slides.

Data Link Control PROTOCOLS: NOISY CHANNELS Go-Back-N ARQ Protocol Sliding Window Receive sliding window Timers  Although there can be a timer for each frame that is sent, in this protocol we use only one.  The reason is that the timer for the first outstanding frame always expires first; we send all outstanding frames when this timer expires. Acknowledgment  The receiver sends a positive acknowledgment if a frame has arrived safe and sound and in order.  If a frame is damaged or is received out of order, receiver is silent and will discard all subsequent frames until it receives the one it is expecting.  The silence of the receiver causes the timer of the unacknowledged frame at the sender site to expire. This causes the sender to go back and resend all frames, beginning with the one with the expired timer.  The receiver does not have to acknowledge each frame received. It can send one cumulative acknowledgment for several frames.

Data Link Control PROTOCOLS: NOISY CHANNELS Go-Back-N ARQ Protocol Sliding Window Receive sliding window Resending a Frame  When the timer expires, the sender resends all outstanding frames.  Example:  Suppose the sender has already sent frame 6, but the timer for frame 3 expires.  This means that frame 3 has not been acknowledged.  The sender goes back and sends frames 3, 4,5, and 6 again.  That is why the protocol is called Go-Back-N ARQ.

Data Link Control PROTOCOLS: NOISY CHANNELS Go-Back-N ARQ Protocol Sliding Window Sender sliding window

Data Link Control PROTOCOLS: NOISY CHANNELS Go-Back-N ARQ Protocol Sliding Window Receiver sliding window

Data Link Control PROTOCOLS: NOISY CHANNELS Go-Back-N ARQ Protocol Sliding Window Normal Operation

Data Link Control PROTOCOLS: NOISY CHANNELS Go-Back-N ARQ Protocol Lost Frame

Data Link Control PROTOCOLS: NOISY CHANNELS Go-Back-N ARQ Protocol Sender Window Size Size of the sender window must be < 2 m. Size of the receiver window is always 1.

Data Link Control PROTOCOLS: NOISY CHANNELS Go-Back-N ARQ Protocol Go-Back-N sender algorithm

Data Link Control PROTOCOLS: NOISY CHANNELS Go-Back-N ARQ Protocol Go-Back-N Receiver algorithm

Data Link Control PROTOCOLS: NOISY CHANNELS Self Study Stop-and-Wait ARQ Go-Back-N ARQ Selective Repeat ARQ  