The Data Link Layer

Purpose of the Data Link Layer

The main task of the data link layer is to take a "raw" data stream and transform it into a transmission error-free abstraction for the network layer. It accomplishes this function by dividing the input data into data frames (of a few hundred bytes), transmitting the frames sequentially, and processing the status frames sent by the destination node.

Since the physical layer only accepts and transmits a stream of bits without any consideration of meaning or structure, it is up to the data link layer to create and recognize the boundaries of a data frame. This is achieved by adding special bit patterns to the beginning and end of the data frame. If these bit patterns can appear in the data, special emphasis should be taken to avoid any confusion.

Features

Its main functions are:

  • bound frames
  • bound frames
  • Maintains frame integrity
  • Provide data transparency
  • error detection
  • Retransmission of Frames to recover from errors
  • Allows flow control
  • Monitor link functions

Services

The data link layer can be designed to offer several services that vary according to the system, such as:

Service unacknowledged offline
The source machine sends independent frames to the destination machine without expecting it to acknowledge or acknowledge them. No connection is established beforehand and no connection is released afterwards. If a frame is lost due to noise, no attempt is made to recover it at the data link layer. This class of service is appropriate when the error rate is very low, for real-time traffic, such as voice.
Service with acknowledgment without connection
Each frame sent is acknowledged individually, so the sender knows if the frame has arrived well or not, if it hasn't arrived in a specified time, it can be sent again. The problem with this strategy is that the messages take a long time to get through. This service is useful on unstable channels, such as wireless systems
Service with connection-oriented acknowledgment
The source and destination machines establish a connection before transferring the data, which will be explained below.