+ All Categories
Home > Documents > Flow Control and Error Control

Flow Control and Error Control

Date post: 05-Feb-2016
Category:
Upload: prisca
View: 272 times
Download: 41 times
Share this document with a friend
Description:
Flow Control and Error Control. Note :. Flow control refers to a set of procedures used to restrict the amount of data that the sender can send before waiting for acknowledgment. Note :. - PowerPoint PPT Presentation
34
Flow Control and Error Control
Transcript
Page 1: Flow Control and Error Control

Flow Control and Error Control

Page 2: Flow Control and Error Control

Flow control refers to a set of procedures Flow control refers to a set of procedures used to restrict the amount of data that the used to restrict the amount of data that the

sender can send before waiting for sender can send before waiting for acknowledgment.acknowledgment.

NoteNote::

Page 3: Flow Control and Error Control

Error control in the data link layer is based Error control in the data link layer is based on automatic repeat request, which is the on automatic repeat request, which is the

retransmission of data.retransmission of data.

NoteNote::

Page 4: Flow Control and Error Control

Stop-and-wait ARQ

Page 5: Flow Control and Error Control

Stop-and-wait ARQ

In the stop-and-wait mechanism ,the receiver sends a positive acknowledgement (ACK) if there is no error in data frame.

If error then it responds with a negative acknowledgement (NAK)

Page 6: Flow Control and Error Control

The sending device keeps a copy of the last frame transmitted until it receives an acknowledgement for that frame.

For Identification purposes, both data frames and acknowledgement frames are numbered alternatively 0 and 1.

A Damaged or Lost frame is treated in the same manner by the receiver i.e. Dropped

Page 7: Flow Control and Error Control

The Sender has a control variable ‘ S’ that holds the number (0 or 1) of recently sent frame. The Receiver has also a control variable ‘ R’ that holds the number (0 or 1) of the next frame expected.

The sender starts a Timer when it sends a frame. If the ack is not received with in the allotted time period ,the sender assumes that the frame (sent earlier) was lost or damaged

Page 8: Flow Control and Error Control

The receiver send s only positive ack for frames received safe and sound.– Note it that the ack number always define

the number of next expected frame.

Page 9: Flow Control and Error Control

Normal operation

Page 10: Flow Control and Error Control

Stop-and-Wait ARQ, lost frame

Page 11: Flow Control and Error Control

Stop-and-Wait ARQ, lost ACK frame

Page 12: Flow Control and Error Control

In Stop-and-Wait ARQ, numbering frames In Stop-and-Wait ARQ, numbering frames prevents the retaining of duplicate frames.prevents the retaining of duplicate frames.

NoteNote::

Page 13: Flow Control and Error Control

Stop-and-Wait ARQ, delayed ACK

Page 14: Flow Control and Error Control

Numbered acknowledgments are needed if Numbered acknowledgments are needed if an acknowledgment is delayed and the an acknowledgment is delayed and the

next frame is lostnext frame is lost. .

NoteNote::

Page 15: Flow Control and Error Control

Piggybacking

Page 16: Flow Control and Error Control

Go-Back-N ARQGo-Back-N ARQ

Sequence Number

Sender and Receiver Sliding Window

Control Variables and Timers

Acknowledgment

Resending Frames

Operation

Page 17: Flow Control and Error Control

Go-Back-N ARQGo-Back-N ARQ Each data frame carries a sequence number for its

identification.if there are “n ” bits then the length of the window size will be 2n -1

The sending end maintains a window containing a fixed number of data frames ready for transmission.these frames can be sent without waiting for any acknowledgement .

Copy of each transmitted frame is retained in the window till it is acknowledged.

The number of frames in a window is called its size.

Page 18: Flow Control and Error Control

Go-Back-N ARQGo-Back-N ARQ

The receiver acknowledges receipt of one or more data frames by sending back a numbered acknowledgement(Receive ready,RR-N),where N is the sequence number of the next frame it expects to receive.

All previous data frames are assumed acknowledged on receipt of an acknowledgement.

When an acknowledgement is received by the sending end,it slides the window deleting the copies of acknowledged data frames and inserting the same number of new frames from the queue.

A timer is provided at the sending side.

Page 19: Flow Control and Error Control

Sender sliding window

Page 20: Flow Control and Error Control

Receiver sliding window

Page 21: Flow Control and Error Control

Control variables

Page 22: Flow Control and Error Control

Go-Back-N ARQ, normal operation

Page 23: Flow Control and Error Control

Go-Back-N ARQ, lost frame

Page 24: Flow Control and Error Control

Go-Back-N ARQ: sender window size

Page 25: Flow Control and Error Control

In Go-Back-N ARQ, the size of the sender In Go-Back-N ARQ, the size of the sender window must be less than 2window must be less than 2mm; the size of ; the size of

the receiver window is always 1.the receiver window is always 1.

NoteNote::

Page 26: Flow Control and Error Control

Selective-Repeat ARQSelective-Repeat ARQ

Sender and Receiver Windows

Operation

Sender Window Size

Bidirectional Transmission

Pipelining

Page 27: Flow Control and Error Control

Selective-Repeat ARQSelective-Repeat ARQ

In this technique the receiver requests retransmission of the missing data frame only by sending a Selective Reject(SREJ-N),N is the sequence number of missing data frame.

Page 28: Flow Control and Error Control

Selective Repeat ARQ, sender and receiver windows

Page 29: Flow Control and Error Control

Selective Repeat ARQ, lost frame

Page 30: Flow Control and Error Control

In Selective Repeat ARQ, the size of the sender In Selective Repeat ARQ, the size of the sender and receiver window must be at most one-half of and receiver window must be at most one-half of

22mm..

NoteNote::

Page 31: Flow Control and Error Control

Selective Repeat ARQ, sender window size

Page 32: Flow Control and Error Control

Bit stuffing is the process of adding one Bit stuffing is the process of adding one extra 0 whenever there are five consecutive extra 0 whenever there are five consecutive 1s in the data so that the receiver does not 1s in the data so that the receiver does not

mistake the mistake the data for a flag.data for a flag.

NoteNote::

Page 33: Flow Control and Error Control

11.24 Bit stuffing and removal

Page 34: Flow Control and Error Control

End of Lecture


Recommended