0% found this document useful (0 votes)
8 views6 pages

Datalink

The data link layer is responsible for node-to-node communication and includes functions such as framing, error control, and flow control. It addresses design issues like services to the network layer, error detection and correction methods, and various protocols for reliable data transmission. Key protocols include Simplex, Stop-and-Wait, Go-Back-N, and Selective Repeat, each tailored for different channel conditions and error handling strategies.

Uploaded by

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

Datalink

The data link layer is responsible for node-to-node communication and includes functions such as framing, error control, and flow control. It addresses design issues like services to the network layer, error detection and correction methods, and various protocols for reliable data transmission. Key protocols include Simplex, Stop-and-Wait, Go-Back-N, and Selective Repeat, each tailored for different channel conditions and error handling strategies.

Uploaded by

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

Data Link Layer

I. Introduction

The data link layer transforms the physical layer, a raw transmission facility, to a link
responsible fornode-to-node (hop-to-hop) communication. Specific responsibilities of the
data link layer include framing, addressing, flow control, error control, and media access
control.

II. DATA LINK LAYER DESIGN ISSUES

The following are the data link layer design issues

1. Services Provided to the Network Layer

The network layer wants to be able to send packets to its neighbors without worrying about the
details of getting it there in one piece.

2. Framing

Group the physical layer bit stream into units called frames. Frames are nothing more than "packets"
or "messages". By convention, we use the term "frames" when discussing DLL.

3. Error Control

Sender checksums the frame and transmits checksum together with data. Receiver re-computes the
checksum and compares it with the received value.

4. Flow Control

Prevent a fast sender from overwhelming a slower receiver.

III. Error Detection &Correction


There are many reasons such as noise, cross-talk etc., which may help data to get corrupted during transmission.
The upper layers work on some generalized view of network architecture and are not aware of actual hardware
data processing. Hence, the upper layers expect error-free transmission between the systems. Most of the
applications would not function expectedly if they receive erroneous data. Applications such as voice and video
may not be that affected and with some errors they may still function well.

Types of Errors

There may be three types of errors:


• Single bit error

In a frame, there is only one bit, anywhere though, which is corrupt.


• Multiple bits error

Frame is received with more than one bits in corrupted state.


• Burst error

Frame contains more than1 consecutive bits corrupted.


Error control mechanism may involve two possible ways:
• Error detection
• Error correction

Error Detection
Errors in the received frames are detected by means of
(i)Parity Check and
(ii)Cyclic Redundancy Check (CRC).
In both cases, few extra bits are sent along with actual data to confirm that bits received at other end are
same as they were sent. If the counter-check at receiver’ end fails, the bits are considered corrupted.

(i) Parity Check

One extra bit is sent along with the original bits to make number of 1s either even in case of even parity,
or odd in case of odd parity.
The sender while creating a frame counts the number of 1s in it. For example, if even parity is used and
number of 1s is even then one bit with value 0 is added. This way number of 1s remains even. If the
number of 1s is odd, to make it even a bit with value 1 is added.

The receiver simply counts the number of 1s in a frame. If the count of 1s is even and even parity is
used, the frame is considered to be not-corrupted and is accepted. If the count of 1s is odd and odd
parity is used, the frame is still not corrupted.
If a single bit flips in transit, the receiver can detect it by counting the number of 1s. But when more
than one bits are erroneous, then it is very hard for the receiver to detect the error.
(ii) Cyclic Redundancy Check (CRC)
CRC is a different approach to detect if the received frame contains valid data. This technique
involves binary division of the data bits being sent. The divisor is generated using polynomials. The
sender performs a division operation on the bits being sent and calculates the remainder. Before
sending the actual bits, the sender adds the remainder at the end of the actual bits. Actual data bits
plus the remainder is called a codeword. The sender transmits data bits as code words.
At the other end, the receiver performs division operation on code words using the same CRC divisor.
If the remainder contains all zeros the data bits are accepted, otherwise it is considered as there some
data corruption occurred in transit.

Error Correction

In the digital world, error correction can be done in two ways:


• Backward Error Correction When the receiver detects an error in the data received, it
requests back the sender to retransmit the data unit.
• Forward Error Correction When the receiver detects some error in the data received, it
executes error-correcting code, which helps it to auto-recover and to correct some
kinds of errors.
The first one, Backward Error Correction, is simple and can only be efficiently used where
retransmitting is not expensive. For example, fiber optics. But in case of wireless transmission
retransmitting may cost too much. In the latter case, Forward Error Correction is used.
IV Elementary Data Link Protocols
Protocols in the data link layer are designed so that this layer can perform its basic functions:
framing, error control and flow control. Framing is the process of dividing bit - streams from
physical layer into data frames whose size ranges from a few hundred to a few thousand bytes.

Types of Data Link Layer Protocols


Data link protocols can be broadly divided into two categories, depending on whether the
transmission channel is noiseless or noisy.
Noiseless channel
o Simplex protocol
o Stop and wait protocol
Noisy channels
o Stop and wait ARQ
o Go back N protocol
o Selective Repeat protocol
Simplex Protocol
The Simplex protocol is hypothetical protocol designed for unidirectional data transmission over an ideal
channel, i.e. a channel through which transmission can never go wrong. It has distinct procedures for
sender and receiver. The sender simply sends all its data available onto the channelas soon as they are
available its buffer. The receiver is assumed to process all incoming data instantly. It is hypothetical
since it does not handle flow control or error control.

Stop – and – Wait Protocol


Stop – and – Wait protocol is for noiseless channel too. It provides unidirectional data transmission
without any error control facilities. However, it provides for flow control so that a fast sender does not
drown a slow receiver. The receiver has a finite buffer size with finite processing speed. The sender can
send a frame only when it has received indication from the receiver that it is available for further data
processing.

Stop – and – Wait ARQ

Stop – and – wait Automatic Repeat Request (Stop – and – Wait ARQ) is a variation of the above protocol
with added error control mechanisms, appropriate for noisy channels. The sender keeps a copy of the sent
frame. It then waits for a finite time to receive a positive acknowledgement from receiver. If the timer
expires or a negative acknowledgement is received, the frame is retransmitted. If a positive
acknowledgement is received then the next frame is sent.

Go – Back – N ARQ
Go – Back – N ARQ provides for sending multiple frames before receiving the acknowledgementfor
the first frame. It uses the concept of sliding window, and so is also called sliding window protocol.
The frames are sequentially numbered and a finite number of frames are sent. If the acknowledgement
of a frame is not received within the time period, all frames starting from that frame are retransmitted.

Selective Repeat ARQ


This protocol also provides for sending multiple frames before receiving the acknowledgement forthe
first frame. However, here only the erroneous or lost frames are retransmitted, while the good frames
are received and buffered.

V. Sliding Window Protocols

Sliding window protocols are data link layer protocols for reliable and sequential delivery of data
frames. The sliding window is also used in Transmission Control Protocol.

In this protocol, multiple frames can be sent by a sender at a time before receiving an
acknowledgment from the receiver. The term sliding window refers to the imaginary boxes to hold
frames. Sliding window method is also known as windowing.

Working Principle
In these protocols, the sender has a buffer called the sending window and the receiver has buffer
called the receiving window.

The size of the sending window determines the sequence number of the outbound frames. If the
sequence number of the frames is an n-bit field, then the range of sequence numbers that can be
assigned is 0 to 2𝑛−1. Consequently, the size of the sending window is 2𝑛−1. Thus in order to
accommodate a sending window size of 2𝑛−1, a n-bit sequence number is chosen.

The size of the receiving window is the maximum number of frames that the receiver can accept at a
time. It determines the maximum number of frames that the sender can send before receiving
acknowledgment.
Example
Suppose that we have sender window and receiver window each of size 4. So the sequence
numbering of both the windows will be 0,1,2,3,0,1,2 and so on. The following diagram shows the
positions of the windows after sending the frames and receiving acknowledgments.
Types of Sliding Window Protocols

The Sliding Window ARQ (Automatic Repeat reQuest) protocols are of two categories –
• Go – Back – N ARQ
Go – Back – N ARQ provides for sending multiple frames before receiving the
acknowledgment for the first frame. It uses the concept of sliding window, and
so is also called sliding window protocol. The frames are sequentially
numbered and a finite number of frames are sent. If the acknowledgmentof a
frame is not received within the time period, all frames starting from that frame
are retransmitted.

• Selective Repeat ARQ

This protocol also provides for sending multiple frames before receiving the
acknowledgment forthe first frame. However, here only the erroneous or lost
frames are retransmitted, while the good frames are received and buffered.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy