Introduction

The data link layer is the second layer in the seven-layer OSI (Open Systems Interconnection) model, which is used to describe how data is transmitted between two devices over a network. It is responsible for organizing and transmitting data in the form of frames between devices on the same physical network segment.

The data link layer is divided into two sub-layers:

  • Logical Link Control (LLC)
  • Media Access Control (MAC)

Logical Link Control (LLC) is a sublayer in the data link layer of the OSI model. It is responsible for providing a reliable connection between two devices on a network, ensuring that data is transmitted accurately and without errors.

LLC provides several functions to support this reliable connection, including:

  • Flow control: LLC ensures that data is transmitted at a rate that both devices can handle, preventing data overflow or underflow.
  • Error detection: LLC uses checksums and other error-detection techniques to ensure that data is transmitted accurately. If an error is detected, LLC will request that the data be retransmitted.
  • Sequencing: LLC assigns a sequence number to each data packet transmitted, allowing the receiving device to reassemble the data in the correct order.
  • Framing: LLC adds additional information to the data packets, such as a header and a trailer, to indicate the start and end of a transmission.

Overall, LLC provides the necessary control and reliability for data transmission between devices on a network.

Media Access Control (MAC)

Media Access Control (MAC) is a protocol in the data link layer of the OSI model that determines how devices on a network can access the media (e.g. Ethernet cable) to transmit data.

In a local area network (LAN), each device has a unique MAC address that is used to identify it on the network. When a device wants to send data, it checks to see if the media is available to transmit. If the media is available, the device sends its MAC address and the data to be transmitted. If the media is not available, the device waits until it becomes available and then sends the data.

Overall, the MAC protocol plays a crucial role in ensuring efficient and reliable communication between devices on a network.

Framing

In the data link layer, framing refers to the process of dividing the data being transmitted into smaller chunks or “frames” for transmission over the network. This helps to ensure that the data is transmitted reliably and efficiently, as it allows the receiving device to identify and reassemble the data correctly.

Addressing

Addressing in the data link layer refers to the process of identifying and labeling devices on a local network. This is necessary in order for devices to communicate with each other and exchange data.

Error Control

Error control in the data link layer refers to the mechanisms and protocols used to detect and correct errors in the transmission of data over a communication link. This is important because errors can occur due to noise, interference, or other factors that can disrupt the transmission of data.

Flow Control

Flow control in the data link layer is a mechanism that helps ensure the smooth transmission of data between two devices on a network. It is used to prevent one device from overwhelming the other with too much data, which can cause delays or even complete failures in communication.

Access Control

Access control in the data link layer refers to the mechanisms that are used to regulate which devices are allowed to transmit data over the physical communication link. These mechanisms are used to ensure that only authorized devices can access the link and that the transmission of data is orderly and efficient.

The protocols in the data link layer include:

  • Synchronous Data Link Protocol (SDLC)
  • High-Level Data Link Protocol (HDLC)
  • Serial Line Interface Protocol (SLIP)
  • Point to Point Protocol (PPP)
  • Link Access Procedure (LAP)
  • Link Control Protocol (LCP)
  • Network Control Protocol (NCP)