0% found this document useful (0 votes)
9 views47 pages

Unit 2.1

Uploaded by

Khushi arora
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views47 pages

Unit 2.1

Uploaded by

Khushi arora
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 47

Data Link

Control
and
Protocols
Acadimic Purpose Only
(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Flow and Error Control

Flow Control

Error Control

The most important responsibilities of the data link layer are flow control and
error control. Collectively, these functions are known as data link control.

Acadimic Purpose Only


(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
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.

Acadimic Purpose Only


(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Protocols

11.4
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
NOISELESS CHANNELS

Let us first assume we have an ideal channel in which


no frames are lost, duplicated, or corrupted. We
introduce two protocols for this type of channel.

Topics discussed in this section:


Simplest Protocol
Stop-and-Wait Protocol

11.5
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
The design of the simplest protocol with no flow or error control

11.6
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Flow diagram

11.7
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Design of Stop-and-Wait Protocol

11.8
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Flow diagram

11.9
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
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. We discuss three protocols
in this section that use error control.

11.10
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Note:

Error control in the data link layer is


based on automatic repeat
request(ARQ), which is the
retransmission of data.
Stop-and-Wait ARQ,Go-Back-N
ARQ,and Selective-Repeat ARQ.
Acadimic Purpose Only
(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Flow and Error control Mechanism
Stop-and-Wait ARQ, Go-Back-N
ARQ , and Selective-Repeat ARQ.

Acadimic Purpose Only


(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Stop-and-Wait ARQ

Operation
Bidirectional Transmission

Acadimic Purpose Only


(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Normal operation

Acadimic Purpose Only


(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Stop-and-Wait ARQ, lost frame

Acadimic Purpose Only


(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Stop-and-Wait ARQ, lost ACK frame

Acadimic Purpose Only


(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Note:

In Stop-and-Wait ARQ, numbering


frames prevents the retaining of
duplicate frames.

Acadimic Purpose Only


(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Stop-and-Wait ARQ, delayed ACK

Acadimic Purpose Only


(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Note:

Numbered acknowledgments are


needed if an acknowledgment is
delayed and the next frame is lost.

Acadimic Purpose Only


(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Piggybacking( combine a data Frame with an ACK)

Acadimic Purpose Only


(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Go-Back-N ARQ

Sequence Number (0 to 2m-1)


Sender and Receiver Sliding
Window
Control Variables
(sender window size is=2 -1) (Receiver window size=1)
m

Acknowledgment

Resending Frames

Operation Acadimic Purpose Only


(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Sender sliding window

Acadimic Purpose Only


(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Receiver sliding window

Acadimic Purpose Only


(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Control variables

Acadimic Purpose Only


(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Go-Back-N ARQ, normal operation

Acadimic Purpose Only


(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Go-Back-N ARQ, lost frame

Acadimic Purpose Only


(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Go-Back-N ARQ: sender window size

Acadimic Purpose Only


(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Note:

In Go-Back-N ARQ, the size of the


sender window must be less than 2m;
the size of the receiver window is
always 1.

Acadimic Purpose Only


(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Selective-Repeat ARQ

Sender and Receiver Windows

Operation

Sender Window Size

Acadimic Purpose Only


(KIET
CN SKK IT VI)

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Selective Repeat ARQ, sender and receiver windows

Acadimic Purpose Only


(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Selective Repeat ARQ, lost frame

Acadimic Purpose Only


(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Note:

In Selective Repeat ARQ, the size of


the sender and receiver window must
be at most one-half of 2m.

Acadimic Purpose Only


(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Selective Repeat ARQ, sender window size

Acadimic Purpose Only


(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Example 1
In a Stop-and-Wait ARQ system, the bandwidth of the line is 1 Mbps, and 1 bit
takes 20 ms to make a round trip. What is the bandwidth-delay product? If the
system data frames are 1000 bits in length, what is the utilization percentage of
the link?

Solution
The bandwidth-delay product (frame size) is

1  106  20  10-3 = 20,000 bits


The system can send 20,000 bits during the time it takes for the data to go
from the sender to the receiver and then back again. However, the system
sends only 1000 bits. We can say that the link utilization is only
1000/20,000, or 5%. For this reason, for a link with high bandwidth or long
delay, use of Stop-and-Wait ARQ wastes the capacity of the link.
Acadimic Purpose Only
(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Example 2
What is the utilization percentage of the link in Example 1 if the link uses Go-
Back-N ARQ with a 15-frame sequence?

Solution
The bandwidth-delay product is still 20,000. The system can send up to 15
frames or 15,000 bits during a round trip. This means the utilization is
15,000/20,000, or 75 percent. Of course, if there are damaged frames, the
utilization percentage is much less because frames have to be resent.

Acadimic Purpose Only


(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
HDLC

Configurations and Transfer Modes

Frames

Frame Format

Examples

Data Transparency
Acadimic Purpose Only
(KIET
CN SKK IT VI)

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


NRM

Acadimic Purpose Only


(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
ABM

Acadimic Purpose Only


(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
HDLC frame

Acadimic Purpose Only


(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
HDLC frame types

Acadimic Purpose Only


(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
I-frame

Acadimic Purpose Only


(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
S-frame control field in HDLC

Acadimic Purpose Only


(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
U-frame control field in HDLC

Acadimic Purpose Only


(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
U-frame control command and response
Command/response Meaning
SNRM Set normal response mode
SNRME Set normal response mode (extended)
SABM Set asynchronous balanced mode
SABME Set asynchronous balanced mode (extended)
UP Unnumbered poll
UI Unnumbered information
UA Unnumbered acknowledgment
RD Request disconnect
DISC Disconnect
DM Disconnect mode
RIM Request information mode
SIM Set initialization mode
RSET Reset
XID Exchange ID
FRMR Frame reject
Acadimic Purpose Only
(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Note:

Bit stuffing is the process of adding


one extra 0 whenever there are five
consecutive 1s in the data so that the
receiver does not mistake the
data for a flag.

Acadimic Purpose Only


(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Bit stuffing and removal

Acadimic Purpose Only


(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Bit stuffing in HDLC

Acadimic Purpose Only


(KIET
CN SKK IT VI)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004

You might also like