Sie sind auf Seite 1von 21

Data Link Control

ERROR CONTROL
OVERVIEW

Data Link Control


Error Control
Error Control Approaches
Three Modes of Error Control
Data Link Control (DLC)

DLC also is an abbreviation for digital loop carrier.


DLC (data link control) is the service provided by the Data Link layer of function
defined in the Open Systems Interconnection (OSI) model for network
communication.
The Data Link layer is responsible for providing reliable data transfer across one
physical link (or telecommunications path) within the network. Some of its primary
functions include defining frames, performing error detection or ECC on those
frames, and performing flow control (to prevent a fast sender from overwhelming a
slow receiver).
Error Control

Is a method of checking the reliability of characters (parity) or blocks of data during


communication. V.42 and MNP error control protocols use error detection (CRC) and
retransmission of flawed frames (ARQ). Also see: BERT, CRC, ECC, Error,
Flow control, Parity.
Error control in the data link layer is based on automatic repeat request, which is the
retransmission of data
To ensure a data stream is transmitted to a certain level of accuracy
Error Control Approaches

Error detection & retransmission


Error detection: parity check, CRC
Retransmission: automatic repeat request (ARQ)
Error Correction:
Forward error correction (FEC)
ARQ (Automatic Repeat reQuest)
The fundamental idea is to use acknowledgments (ACKs) sent from the receiver to the
sender for data frames sent from the sender to the receiver. We introduce concepts
used in ARQ here:

Timers: Sender keeps a timer, if an ACK is not received before the timer expires, it resends
the frame. How large should the timer value be?
Need for sequence numbers for the frames: If a frame is properly received, but the ACK is
lost, then the sender will time-out and retransmit. This will result in the receiver receiving
duplicate frames. Hence frames need sequence numbers to allow the receiver to detect
duplicates.
Need for sequence numbers in the ACKs: If a frame 0 is sent, but the timer times-out before
the ACK is received, the sender will resend frame 0. If the ACK for the first frame 0 arrives
soon after the sender retransmitted frame 0, the sender will assume that the ACK was for the
retransmitted frame 0 and hence send frame 1. Now if frame 1 gets lost, but the receiver
sends another ACK for the retransmitted frame 0, the sender may mistakenly think this ACK
is for frame 1. If ACKs said what frames they were acknowledging (using their sequence
numbers), this problem would not arise.
Checkpointing: periodically sending ENQ (enquiries) to see what frames were received.
FEC (Forward Error Correction)
is a technique used for controlling errors in data transmission over unreliable or noisy
communication channels. The central idea is the sender encodes the message in
a redundant way by using an error-correcting code (ECC).

The redundancy allows the receiver to detect a limited number of errors that may
occur anywhere in the message, and often to correct these errors without
retransmission. FEC gives the receiver the ability to correct errors without needing
a reverse channel to request retransmission of data, but at the cost of a fixed,
higher forward channel bandwidth.
FEC is therefore applied in situations where retransmissions are costly or
impossible, such as one-way communication links and when transmitting to multiple
receivers in multicast. FEC information is usually added to mass storage devices to
enable recovery of corrupted data, and is widely used in modems.
Three Modes of Error Control

Stop-and-wait: Send a frame, wait for an ACK

Go-back-N: sender maintains a window of size Ws frames. after frame 0 is sent,


transmitter sends Ws

Selective ARQ:
Stop-and-wait: Send a frame, wait for an
ACK
source transmits single frame
waits for ACK by keeping a copy of the sent frame
no other data can be sent until destinations reply arrives
if frame received is damaged, discard it
transmitter has timeout
if no ACK within timeout, retransmit
if ACK is damaged, transmitter will not recognize
transmitter will retransmit
receiver gets two copies of frame
use alternate numbering and ACK0 / ACK1
ACKi means I am ready to receive frame i
Stop-and-wait: Send a frame, wait for
an ACK
Assume that, 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. If the system data frames are 1000 bits
in length, what is the utilization percentage of the link? Solution The system can
send 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 a high
bandwidth or long delay, the use of Stop-and-Wait ARQ wastes the capacity of the
link.
Stop-and-wait: Send a frame, wait for
an ACK
Stop-and-wait: Send a frame, wait for
an ACK
Go-back-N
Sender maintains a window of size Ws frames. after frame 0 is sent, transmitter
sends Ws -1 frames. This is the maximum number of frames that can be outstanding
(i.e., unacknowledged). Pipelining effect occurs improving the efficiency of the
protocol. Upon receiving a NAK (negative ACK), or experiencing a time-out, the
sender will retransmit. The sender keeps track of Srecent, which lies between Slast and
Slast + Ws -1, where Slast is the last transmitted and yet unacknowledged; Srecent is the
last one sent.
The receiver maintains a variable Rnext, which is the sequence number of the next
expected frame. Typically, this is the number that the receiver sends in an ACK. Go-
back-N is an example of a sliding-window protocol. The window size at the sender
should be less than 2m if m bits are used for the sequence number.If Ws = 2m then a
problem could arise. If m = 2 bits and the window size is 4, and frames 0, 1, 2, 3 are
sent and received properly, but all the ACKs are lost.
Then the sender goes back N and retransmits frame 0. When the receiver receives
this frame it is a duplicate, but the receiver does not know this; it thinks it is the next
set!
Go-back-N

most commonly used error control


based on slidingwindow, use window size to control number of outstanding
frames
if no error, ACK as usual with next frame expected
ACKi means I am ready to receive frame i and I received all frames between i and my
previous ack
if error, reply with rejection (negative ack)
destination will discard that frame and all future frames until frame in error is
received correctly
transmitter must go back and retransmit that frame and all subsequent frames
Go-back-N
Negative ACK: If the receiver knows for sure that it didn't get a packet that it should
have, it will send a NAK.
Piggybacking ACKs: ACKs are piggybacked on frames sent in the reverse direction if
data flow is bidirectional. This makes the transfer more efficient. Thus the receivers
at both ends maintains Rnext, while the senders maintain Slast and Slast +Ws -1.
Cumulative vs. selective ACKs: In cumulative ACKs, instead of sending an ACK for
every packet, a cumulative ACK acknowledges multiple packets. For example, the
ACK-every-other-segment strategy is used in TCP implementations. In this strategy,
every other packet is acknowledged, instead of every packet. Selective ACKs are
used to indicate specific sequence numbers of packets that have been received.
Go-back-N
Selective Reject ARQ:

also called selective retransmission


only rejected frames are retransmitted
subsequent frames are accepted by the receiver and buffered
minimizes retransmission
receiver must maintain large enough buffer
more complex logic in transmitter
less widely used
useful for satellite links with long propagation delays
GoBackN vs. SelectiveReject
Buffer Size
Gobackn ARQ sender needs to keep a buffer equal to window size
for possible retransmissions
receiver does not need any buffer (for flow/error control)
Selective reject
sender needs to keep a buffer of window size for retransmissions
receiver keeps a buffer equal to window size

Das könnte Ihnen auch gefallen