You are on page 1of 40

TOPIC 6:

DATA LINK CONTROL


Prepared by:
TS HJ MOHD ERWANDI BIN MARWAN

KOLEJ POLY-TECH MARA BATU


DATA COMMUNICATION CONCEPT PAHAT
DATA LINK CONTROL

KOLEJ POLY-TECH MARA BATU


TOPIC 6: DATA LINK CONTROL PAHAT
Data Link Layer

KOLEJ POLY-TECH MARA BATU


TOPIC 6: DATA LINK CONTROL PAHAT
• Data Link Layer function

Who should send


Line Discipline now?

Data Link How much data


Flow Control may be sent?
Control

How can errors


Error Control can be corrected?

KOLEJ POLY-TECH MARA BATU


TOPIC 6: DATA LINK CONTROL PAHAT
LINE DISCIPLINE FLOW CONTROL ERROR CONTROL

• Coordinates the link • Coordinates the amount • Allows the receiver to


system of data that can be sent inform the sender of any
• It determines which before receiving frames lost or damaged
device can send and acknowledgement in transmission
when it can send • Provides the receiver’s • Coordinates the
• 2 categories: ENQ/ACK acknowledgement of retransmission of those
and POLL/SELECT frame receive intact and frames by the sender
so is linked to error • 2 categories:
control. • STOP-n-WAIT ARQ
• 2 ways: STOP-n-WAIT • SLIDING WINDOW
and SLIDING WINDOW ARQ
• Go-Back-n
• Selective-Reject

KOLEJ POLY-TECH MARA BATU


TOPIC 6: DATA LINK CONTROL PAHAT
DATA LINK CONTROL – LINE
DISCIPLINE

KOLEJ POLY-TECH MARA BATU


TOPIC 6: DATA LINK CONTROL PAHAT
Data Link Control – Line Discipline
• Established the status of a device (sender or receiver) on a link

Used in point-to-
ENQ / ACK point connections
LINE DISCIPLINE
Used in multipoint
Poll / Select connections

KOLEJ POLY-TECH MARA BATU


TOPIC 6: DATA LINK CONTROL PAHAT
ENQ/ ACK
• ENQ / ACK→ Enquiry / Acknowledgment
• Responds with an Acknowledge (ACK) if it is ready to receive data or a
Negative Acknowledgement (NAK) if it is not ready.
SENDER RECEIVER
◼ ENQ frame ◼ ACK frame: ready OR
◼ DATA frame NAK frame: not ready
• 2 terms for ACK:
▪ Ready to receive data frame
▪ Expect to get next data frame

KOLEJ POLY-TECH MARA BATU


TOPIC 6: DATA LINK CONTROL PAHAT
KOLEJ POLY-TECH MARA BATU
TOPIC 6: DATA LINK CONTROL PAHAT
POLL/ SELECT
• The primary device always initiates communication with either a POLL
or SELECT frame.
Sent to the secondary Sent from the primary

SEL frame
POLL frame

device by the primary to device to the secondary


determine if the device to tell the
secondary has data to secondary to prepare to
send. receive data.
The secondary respond by The secondary responds
sending a NAK (no data to with an ACK or a NAK.
send) or a data frame.

KOLEJ POLY-TECH MARA BATU


TOPIC 6: DATA LINK CONTROL PAHAT
Multipoint Discipline

KOLEJ POLY-TECH MARA BATU


TOPIC 6: DATA LINK CONTROL PAHAT
KOLEJ POLY-TECH MARA BATU
TOPIC 6: DATA LINK CONTROL PAHAT
KOLEJ POLY-TECH MARA BATU
TOPIC 6: DATA LINK CONTROL PAHAT
DATA LINK CONTROL – FLOW
CONTROL

KOLEJ POLY-TECH MARA BATU


TOPIC 6: DATA LINK CONTROL PAHAT
Data Link Control – Flow Control
• Set of procedures used to restrict the amount of data the sender can
send before waiting for ACK.

Send one frame at a


Stop and Wait time
FLOW CONTROL
Send multiple
Sliding Window frames at a time

KOLEJ POLY-TECH MARA BATU


TOPIC 6: DATA LINK CONTROL PAHAT
STOP and WAIT
• The sender sends one frame and waits for an acknowledgement before
sending the next frame.

Advantage Disadvantage

Inefficiency: Stop and wait is


Simplicity: Each frame is
slow. Each frame must travel
checked and acknowledged
to the receiver and an ACK
before the next frame is
must travel back before the
sent.
next frame can be sent.

KOLEJ POLY-TECH MARA BATU


TOPIC 6: DATA LINK CONTROL PAHAT
KOLEJ POLY-TECH MARA BATU
TOPIC 6: DATA LINK CONTROL PAHAT
Sliding Window
• Several frames can be in transit at a time.

KOLEJ POLY-TECH MARA BATU


TOPIC 6: DATA LINK CONTROL PAHAT
Sender Sliding Window

KOLEJ POLY-TECH MARA BATU


TOPIC 6: DATA LINK CONTROL PAHAT
Receiver Sliding Window

KOLEJ POLY-TECH MARA BATU


TOPIC 6: DATA LINK CONTROL PAHAT
Sliding Window Example

Transmittable Place
frame Holder

KOLEJ POLY-TECH MARA BATU


TOPIC 6: DATA LINK CONTROL PAHAT
Sender

KOLEJ POLY-TECH MARA BATU


TOPIC 6: DATA LINK CONTROL PAHAT
Receiver

KOLEJ POLY-TECH MARA BATU


TOPIC 6: DATA LINK CONTROL PAHAT
DATA LINK CONTROL – ERROR
CONTROL

KOLEJ POLY-TECH MARA BATU


TOPIC 6: DATA LINK CONTROL PAHAT
Data Link Control – Error Control
• Refers primarily to methods of error detection and retransmission.
• Based on ARQ (Automatic Repeat Request) which means
retransmission of data in THREE cases:
 Damage frame
 Lost frame
 Lost acknowledgement

• ARQ: means if any error detected, a NAK is returned and the frames are
retransmitted.

KOLEJ POLY-TECH MARA BATU


TOPIC 6: DATA LINK CONTROL PAHAT
ERROR
CONTROL

STOP-n-WAIT Sliding Window


ARQ ARQ

Selective-
Go-Back n
Reject

KOLEJ POLY-TECH MARA BATU


TOPIC 6: DATA LINK CONTROL PAHAT
STOP-n-WAIT ARQ
• A form of stop and wait flow control extended to include retransmission
of data in case of lost or damaged frames.
• Basic mechanism:
Sending device keeps a copy of the last frame transmitted until it receives an ACK for that frame

For identification purposes, data frames and ACK frames are numbered alternately 0 and 1

If an error is discovered in a data frame, a NAK frame is returned

The sending device is equipped with a timer

KOLEJ POLY-TECH MARA BATU


TOPIC 6: DATA LINK CONTROL PAHAT
STOP-n-WAIT
ARQ: Damaged
Frame
When a frame is
discovered by the
receiver to contain
an error, it returns a
NAK frame and the
sender retransmits
the last frame.

KOLEJ POLY-TECH MARA BATU


TOPIC 6: DATA LINK CONTROL PAHAT
STOP-n-WAIT
ARQ: Lost Data
Frame
The sender is
equipped with a
timer that stars
every time a data
frame is transmitted.
The sending device
waits for an ACK or
NAK frame until its
timer goes off.

KOLEJ POLY-TECH MARA BATU


TOPIC 6: DATA LINK CONTROL PAHAT
STOP-n-WAIT
ARQ: Lost ACK
The ACK or NAK
frame from receiver
is lost in transit.

KOLEJ POLY-TECH MARA BATU


TOPIC 6: DATA LINK CONTROL PAHAT
Sliding Window ARQ
• The basic flow control mechanism: Types of Sliding
Window ARQ

If an error is
The sending The sending
discovered in Go-Back-n ARQ
device keeps device is
a data frame,
a copy of the equipped
a NAK frame
last frame with a timer
is returned

Selective-
Reject ARQ

KOLEJ POLY-TECH MARA BATU


TOPIC 6: DATA LINK CONTROL PAHAT
Go-Back-n ARQ
• If one frame is lost or damaged, all frames sent since the last frame
acknowledged are retransmitted.
Damage
Frame

Lost Data
Type of Error
Frame

Lost ACK

KOLEJ POLY-TECH MARA BATU


TOPIC 6: DATA LINK CONTROL PAHAT
Go-Back-n ARQ: Damaged Frame

KOLEJ POLY-TECH MARA BATU


TOPIC 6: DATA LINK CONTROL PAHAT
Go-Back-n ARQ: Lost Frame (1)

KOLEJ POLY-TECH MARA BATU


TOPIC 6: DATA LINK CONTROL PAHAT
Go-Back-n ARQ: Lost Frame (2)

KOLEJ POLY-TECH MARA BATU


TOPIC 6: DATA LINK CONTROL PAHAT
Go-Back-n ARQ: Lost ACK Frame

KOLEJ POLY-TECH MARA BATU


TOPIC 6: DATA LINK CONTROL PAHAT
Selective-Reject ARQ
• Only the specific damaged or lost frame is retransmitted.
• If a frame is corrupted in transit, a NAK is returned and the frame is
resent out of sequence.

KOLEJ POLY-TECH MARA BATU


TOPIC 6: DATA LINK CONTROL PAHAT
• It different from Go-Back-n ARQ in the following ways:
 The receiving device must contain sorting logic to enable it to
reorder frames received out of sequence.
 The sending device must contain a searching mechanism that
allows it to find and select only the requested frame to retransmit.
 A buffer in the receiver must keep all previously received frame on
hold until all retransmission have been sorted and any duplicate
frames have been identified and discard.
 To aid selectivity, ACK numbers like NAK numbers must refer to the
frame received/lost instead of the next frame expected.

KOLEJ POLY-TECH MARA BATU


TOPIC 6: DATA LINK CONTROL PAHAT
Selective-Reject: Damaged Frame

KOLEJ POLY-TECH MARA BATU


TOPIC 6: DATA LINK CONTROL PAHAT
Selective-Reject: Lost Frame

KOLEJ POLY-TECH MARA BATU


TOPIC 6: DATA LINK CONTROL PAHAT

You might also like