NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS ( NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS (PRACTICAL PART) Tutorial 4 : Chapter 7 Data & computer.

Slides:



Advertisements
Similar presentations
Network Operations & administration CS 4592 Lecture 15 Instructor: Ibrahim Tariq.
Advertisements

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 and Computer Communications Updated: 2/9/2009.
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.
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.
1 Comnet 2006 Communication Networks Recitation 8 ARQ Protocols & Performance.
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:
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
ARQ Mechanisms Rudra Dutta ECE/CSC Fall 2010, Section 001, 601.
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.
ECE 4450:427/527 - Computer Networks Spring 2015 Dr. Nghi Tran Department of Electrical & Computer Engineering Lecture 5.3: Reliable Transmission Dr. Nghi.
Chapter 3 THE DATA LINK LAYER
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.
Chapter 11 Data Link Control
Data Link and Flow Control Networks and Protocols Prepared by: TGK First Prepared on: Last Modified on: Quality checked by: Copyright 2009 Asia Pacific.
Data Link Layer: Data Link Control : Data Communication and Computer Networks Asst. Prof. Chaiporn Jaikaeo, Ph.D.
Chapter 3: Channel Coding (part 3). Automatic repeat request (ARQ) protocols ▫Used in combination with error detection/correction ▫Block of data with.
Lecture Focus: Data Communications and Networking  Data Link Layer  Data Link Control Lecture 22 CSCS 311.
11.1 Flow and Error Control Flow Control Error Control.
1 FIT1005 Topic 6 - Data Link Layer Reference: Chapter 7 -Stallings.
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.
COSC 3213: Computer Networks I Instructor: Dr. Amir Asif Department of Computer Science York University Section M Topics: 1.Flow Control and ARQ Protocols.
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.
Telecommunications & Networking Lesson 3. ISO Open System Interconnect (OSI) Application Presentation Session Transport Network Data Link Physical Application.
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.
1 The Data Link Layer A. S. Tanenbaum Computer Networks W. Stallings Data and Computer Communications Chapter 3.
DATA LINK CONTROL. DATA LINK LAYER RESPONSIBILTIES  FRAMING  ERROR CONTROL  FLOW CONTROL.
Computer Networking Lecture 16 – Reliable Transport.
Data Link Layer.
Powerpoint Templates Data Communication Muhammad Waseem Iqbal Lec # 15.
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.
Part III Datalink Layer 10.
Chapter 11 Data Link Control
UNIT 4 Data Link Control Line Discipline Flow Control Error Control
Chapter 11 Data Link Control
Instructor Mazhar Hussain
Flow Control.
Data Link Layer: Data Link Control
Flow and Error Control.
Overview Jaringan Komputer (2)
Chapter 5 Peer-to-Peer Protocols and Data Link Layer
CS4470 Computer Networking Protocols
Sliding Window Protocol
Chapter 11 Data Link Control
Getting Connected (Chapter 2 Part 3)
The Transport Layer Reliability
Chapter 5 Peer-to-Peer Protocols and Data Link Layer
Lecture 4 Peer-to-Peer Protocols and Data Link Layer
Presentation transcript:

NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS ( NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS (PRACTICAL PART) Tutorial 4 : Chapter 7 Data & computer communications Networks and Communication Department 1

Stop-and-Wait ARQ  Simplest flow and error control protocol  Data frames and ACK frames are numbered alternately (0,1)  When receiver sends ACK1: it acknowledges data frame 0 and is expecting data frame 1, ACK0 acknowledges data frame 1 and is expecting data frame 0  Sequence Numbers are incremented modulo = 0, and 0+1=1  Receiver has a counter (R ) which hold the number of the expected frame to be received. R is incremented by 1 modulo 2 when the expected frame is received.  The sender keeps a counter (S ) which holds the number of the last transmitted frame. S is incremented by 1 modulo 2 when the acknowledgement of the last transmitted frame is received and the next frame is transmitted

Normal operation Expected frame to be received Last transmitted frame

Stop-and-Wait ARQ – Cont’d  If the receiver detects an error in the frame it discards it  If the receiver receives an out-of-order frame ( frame 0 instead of frame 1 or vice versa), it knows that the expected frame is lost or damaged and discards the out-of-order frame and resend the previous ACK  The sending device keeps a copy of the last frame transmitted until it receives the right acknowledgment (ACK) for the frame  The sender starts a timer when it sends a frame. If an ACK is not received within the allocated time, the sender assumes that the frame was lost or damaged and resends it

Stop-and-Wait ARQ, lost frame

Stop-and wait ARQ Example Networks and Communication Department 6

Go-Back-N ARQ  Setup – Sender sliding window  Frames are numbered sequentially using k-bit in the frame header  For k bits frame sequence numbers 0 – (2 k –1), repeated  k=3  (0,1,2,3,4,5,6,7,0, 1,2,3,4,5,6,7,…),  k=4  (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,....15,….),  Sender can send multiple frames while waiting for ACK, but total number of unacknowledged frames should not exceed 2 k –1 which is called window  Window is an imaginary placeholder that covers the frames sequence numbers which can be in transit  The frames to the left of the window are already acknowledged and to the right can not be sent until window slides over them  Frames inside the window are outstanding (have been sent but not yet acknowledged OR will be sent soon once received from upper-layer)  Sender window will slide to frame number (i ) when (ACK i) is received.  S f : first outstanding frame, S n : next frame to send

Go-Back-N ARQ  Setup –Receiver sliding window  The size of the receiver window is always 1 and points to the next expected frame number to arrive  This means that frames should arrive in order  If the expected frame is received without errors, the receiver window slides over the next sequence number.  Operation  The receiver sends a positive ACK if a frame has arrived without error and in order (with the expected sequence number )  Receiver does not have to acknowledge each individual frame received correctly and in order.  Receiver can send cumulative ACK for several frames (ACK 5 acknowledges frames (0,1,2,3,4) and expecting frame 5)  If the frame is damaged or out-of-order, the receiver discards it (and stay silent) and also discards all subsequent frames until it receives the one expected.  In this case, no ACK will be transmitted  If the sender timer expires before receiving an ACK, it will resend ALL frames beginning with the one expired until the last one sent (Go-Back-N).

Go-Back-N ARQ, normal operation Sender window will slide to frame number (i ) when (ACK i) is received. K=2 Sequence # : 0 – (2 k –1), 0  3 Window size: 2 k –1 = 3 Window size=1

Go-Back-N ARQ Example Networks and Communication Department 10

Go-Back-N ARQ Example Networks and Communication Department 11 Timeout for frame 1 expired

Selective-Reject ARQ  Setup-Window size (for both sender and receiver)  For k bit sequence number the maximum window size 2 k-1  Operation  Sender in case of damaged or lost frame retransmits Those which are negatively acknowledged Those for which timer expires  Receiver can accept out of order frames and buffer (store) them until the lost, damaged, or delayed frame arrives.  Receiver does not acknowledge out of order frames but buffers them only  If the receiver receives an out-of-order, error frame, it will send a frame called Negative Acknowledge (NAK or SREJ) with the number of the frame to be retransmitted only.  NAK improves the performance because it requests retransmission of the lost frame before the corresponding sender timer expires

Selective Reject Example Networks and Communication Department 13 K=3 Sequence # = 0 – (2 k –1), 0  7 Window size: 2 k-1 =4

Question Networks and Communication Department 14. In the Go-Back-N ARQ Protocol, we can send several frames before receiving acknowledgments. If a frame is lost or damaged, all outstanding frames sent before that frame are resent. In the Selective- Repeat ARQ protocol we avoid unnecessary transmission by sending only the frames that are corrupted or missing. Both Go- Back-N and Selective-Repeat Protocols use sliding windows. In Go-Back-N ARQ, if k is the number of bits for the sequence number, then the size of the send window must be at most ; the size of the receiver window is always 1. In Selective- Repeat ARQ, the size of the sender and receiver window must be at most

Question Networks and Communication Department 15 A five-bit sequence number can create sequence numbers from 0 to 31. The sequence number in the Nth packet is (N mod 32). This means that the 101th packet has the sequence number (101 mod 32) or 5.

Question Networks and Communication Department 16

Question Networks and Communication Department 17

Question Networks and Communication Department 18 Draw the flow diagram of a system using Go back N ARQ protocol for five frames using 4-bits sequence numbers. Assume the fourth frame (frame 3) is lost. size of Sender window: (2k –1) =15 size of receiver window :1 frames sequence numbers: 0 – (2k –1) = 0-15

Networks and Communication Department 19

Any Questions ? The End 20 Networks and Communication Department