Presentation❤ . . . .
Name: Muhammad
Data Link Layer.
Introduction:
The data link layer is the second layer from the bottom in the
OSI (Open System
Interconnection) network architecture model. It is responsible
for the node-to-node
delivery of data. Its major role is to ensure error-free
transmission of information.
DLL is also responsible for encoding, decode and organizing
the outgoing and
incoming data. This is considered the most complex layer of
the OSI model as it hides
all the underlying complexities of the hardware from the other
above layers.
Functions of the Data-link Layer
1. Hop To Hop (Node To Node).
2. Flow Control.
3. Error Control.
4. Access Control.
5. Framing.
1.Hop To Hop (Node To Node).
Hop to Hop delivery in Data Link Layer can be delivery of packets from the
host’s network interface card(NIC) to the router’s interface or it can be
delivery of packets from one router’s interface to another router’s interface
or it can be delivery of packets from one router’s interface to host’s network
interface card(NIC). It does not directly deliver the packets from source to
destination instead delivers them from one hop(node) to another.
2. Flow Control :
If the receiver’s receiving speed is lower than the sender’s sending speed,
then this can lead to an overflow in the receiver’s buffer and some frames
may get lost. So, it’s the responsibility of DLL to synchronize the sender’s
and receiver’s speeds and establish flow control between them.
Method:
1) S/w(Stop and wait)
2) GBN(Go Back N)
3)
4) SR (Selective Repeat )
3.Error Control:
Data can get corrupted due to various reasons like noise,
attenuation, etc. So, it is the responsibility of the data link layer, to
detect the error in the transmitted data and correct it using error
detection and correction techniques respectively. DLL adds error
detection bits into the frame’s header, so that receiver can check
received data is correct or not. It adds reliability to phyiscal layer by
adding mechansims to detect and retransmit damaged or lost frames.
Method:
1. CRC
2. Checksum
3. Parity
4.Access Control:
When multiple devices share the same communication channel there is a
high probability of collision, so it’s the responsibility of DLL to check which
device has control over the channel and CSMA/CD and CSMA/CA can be used
to avoid collisions and loss of frames in the channel.
Method:
1. CSHA/CD
2. Aloha
3. Token Ring
5.Framing :
The packet received from the Network layer is known as a frame in the
Data link layer. At the sender’s side, DLL receives packets from the Network
layer and divides them into small frames, then, sends each frame bit-by-bit
to the physical layer. It also attaches some special bits (for error control and
addressing) at the header and end of the frame. At the receiver’s end, DLL
takes bits from the Physical layer organizes them into the frame, and
sends them to the Network layer.
Method Of Flow Control:
1.S/W (stop & Wait)
Stop-and-wait ARQ, also referred to as alternating bit
protocol, is a
method in telecommunications to send information
between two
connected devices. It ensures that information is not lost
due to dropped
packets and that packets are received in the correct
order. It is the
simplest automatic repeat-request mechanism.
2.GBN ( Go Back N )
Go-Back-N protocol, also called Go-Back-N Automatic Repeat
reQuest, is a data link layer protocol that uses a sliding window
method for reliable and sequential delivery of data frames. It is
a case
of sliding window protocol having to send window size of N and
receiving window size of 1.
3. SR ( Selective Repeat )
The go-back-n protocol works well if errors are less, but if the line is poor
it wastes a lot of bandwidth on retransmitted frames. An alternative
strategy, the selective repeat protocol, is to allow the receiver to accept and
buffer the frames following a damaged or lost one. Selective Repeat
attempts to retransmit only those packets that are actually lost (due to
errors) :
Receiver must be able to accept packets out of order.
Since receiver must release packets to higher layer in order, the receiver
must be able to buffer some packets.