COMPUTER NETWORK AND SECURITY

The Data Link Layer is the second layer in the OSI (Open Systems Interconnection) model. The primary purpose of the Data Link Layer is to provide reliable data communication between two directly connected nodes over a physical link or medium. It bridges the gap between the Physical Layer (Layer 1) and the Network Layer (Layer 3) in the OSI model.

Functions of the Data Link Layer :

  • Framing:
    • The Data Link Layer encapsulates network layer packets into frames. Frames are the basic units of data at this layer and include both data and control information.
  • Addressing (MAC Addresses):
    • Media Access Control (MAC) addresses are used for addressing devices at the Data Link Layer. MAC addresses are unique identifiers assigned to each network interface card (NIC) and are used to distinguish devices on the same local network.
  • Error Detection and Correction:
    • The Data Link Layer is responsible for detecting and, in some cases, correcting errors that may occur during data transmission. Common error detection techniques include checksums and Cyclic Redundancy Check (CRC).
  • Flow Control:
    • Flow control mechanisms prevent fast senders from overwhelming slower receivers. Techniques like buffering and windowing help manage the flow of data between devices.
  • Access Control:
    • In shared network mediums, the Data Link Layer manages access to the physical medium to avoid data collisions. Various protocols, such as Carrier Sense Multiple Access with Collision Detection (CSMA/CD), are employed for access control.
  • Logical Link Control (LLC) and Media Access Control (MAC) Sublayers:
    • The Data Link Layer is often divided into two sublayers: LLC and MAC.
      • Logical Link Control (LLC): Responsible for providing error control, flow control, and framing for logical connections. It allows multiple network layer protocols to share the same physical medium.
      • Media Access Control (MAC): Deals with the physical addressing of frames and controls access to the physical medium.

The Data Link Layer is crucial for ensuring reliable and efficient communication between devices within the same local network, handling issues related to addressing, error detection, and access control. Popular Data Link Layer protocols include Ethernet, PPP (Point-to-Point Protocol), and HDLC (High-Level Data Link Control).