The Data Link Layer is the second layer from the bottom in the seven-layer OSI model.
- The major functions of the Data Link Layer include framing, physical addressing, error detection, flow control, and media access control.
- It organises data into frames and provides node-to-node delivery over a physical link.
- It also provides an interface between the Network Layer and the Physical Layer.

Sub-Layers of The Data Link Layer
The data link layer is further divided into two sub-layers, which are as follows:
1. Logical Link Control (LLC): This sublayer provides services to the Network Layer and handles functions such as multiplexing, flow control, error control, and acknowledgments, depending on the LLC service used.
- Protocol Identification: Helps identify and multiplex Network Layer protocols carried over the data link.
- Flow Control: Regulates the rate of data transmission to prevent data overflow between sender and receiver.
- Error Control: Depending on the LLC service used, it may provide error control and acknowledgment mechanisms.
2. Media Access Control (MAC): This is the lower sub-layer of the Data Link Layer responsible for controlling how devices access the physical transmission medium. It handles physical addressing and ensures that data is transmitted efficiently without conflicts on the network.
- Physical Addressing: Uses source and destination MAC addresses in frames to identify devices on the local network.
- Media Access Management: Controls when a device can send data to avoid collisions in shared communication channels.
- Frame Transmission: Delimits and processes frames for transmission over the physical medium.
Functions of DLL
Read more about Data Link Layer Services.
Protocols in Data link layer
There are various protocols in the data link layer, which are as follows:
- Synchronous Data Link Protocol (SDLC)
- High-Level Data Link Control (HDLC)
- Serial Line Interface Protocol (SLIP)
- Point to Point Protocol (PPP)
- Link Access Procedure (LAP)
- Link Control Protocol (LCP)
- Network Control Protocol (NCP)
Devices Operating at the Data Link Layer
All these devices rely on MAC addresses for efficient frame delivery and play a important role in local network communication and access control.

1. Switch
- A switch operates at the Data Link Layer (Layer 2) and connects multiple devices within a LAN.
- It forwards data frames to the correct destination using MAC address tables.
2. Bridge
- A bridge is a Layer 2 networking device that connects network segments and forwards frames based on MAC addresses.
- It can divide a LAN into separate segments to reduce unnecessary traffic.
- Traditional standalone bridges are now uncommon, as modern Ethernet switches provide similar bridging functionality with multiple ports.
3. Network Interface Card (NIC)
- A NIC is a hardware component in devices like computers and printers.
- A NIC provides the network interface for a device and handles Data Link Layer functions such as MAC addressing and frame processing.
- It also interfaces with the Physical Layer to transmit and receive data over the network medium.
4. Wireless Access Point (WAP)
- A WAP allows wireless devices to connect to a wired network.
- It operates primarily at the Data Link Layer and manages MAC-layer communication between wireless devices and the network.
- Uses protocols like Wi-Fi (IEEE 802.11) to communicate with devices.
Note: The Data Link Layer can be targeted by attacks like MAC spoofing or ARP poisoning. Understanding how devices and frames operate at this layer helps detect and mitigate such threats.
Switching and Network Segmentation
Error Control, Flow Control and ARQ Protocols
- Error Detection
- Error Correction
- Stop and wait ARQ
- Sliding Window Protocol- Go Back N
- Sliding Window Protocol- Selective Repeat
- Piggybacking
Limitations
- Link-Level Scope: The Data Link Layer provides communication over a single link or network segment and does not perform end-to-end routing across multiple networks.
- Increased Overhead: Adding headers, trailers, and redundant data (for error correction) increases the size of transmitted data.
- Error Handling Dependency: While it can detect and correct some errors, it relies on upper layers for handling more complex issues.
- No Routing Capability: The Data Link Layer does not make routing decisions; routing between different networks is handled by the Network Layer.
- Resource Usage: Flow control and error correction mechanisms may consume extra processing power and memory
Applications
- Local Area Networks (LANs): Enables reliable communication between devices within a local network using protocols like Ethernet (IEEE 802.3).
- Wireless Networks (Wi-Fi): Supports communication between wireless devices using standards such as IEEE 802.11, including MAC-layer medium access and frame handling.
- Switches and MAC Addressing: Facilitates the operation of switches by using MAC addresses to forward data frames to the correct device within the network.
- Point-to-Point Connections: Used in protocols like PPP (Point-to-Point Protocol) to establish and manage direct communication between two nodes.