The Data Link Layer in the OSI Model
The Data Link Layer is the second layer from the bottom in the OSI model. Its primary responsibility is to ensure the reliable, error free transfer of data between two directly connected nodes over a physical layer.
While the Physical Layer merely transmits raw streams of bits without regard to meaning or structure, the Data Link Layer organizes those bits into logical units and checks them for transmission errors.
Core Functions of the Data Link Layer
To achieve reliable node-to-node delivery, this layer performs several critical functions.
- Framing: It takes the data packets received from the Network Layer and divides them into smaller, manageable units called frames. It adds special bit patterns to the beginning and end of each frame to clearly mark its boundaries.
- Physical Addressing: It adds a header to the frame to define the physical address (MAC address) of the sender and the receiver of the frame. This ensures the frame is delivered to the correct hardware device.
- Error Control: It adds mechanisms to detect and retransmit damaged or lost frames. It also uses a trailer added to the end of the frame to prevent duplication of frames.
- Flow Control: It imposes a strict flow control mechanism to prevent a fast transmitter from overwhelming a slow receiver, ensuring the receiver has enough buffer space to process incoming frames.
- Access Control: When two or more devices are connected to the same physical link, it determines which device has absolute control over the link at any given time to avoid data collisions.
Sublayers of the Data Link Layer
Due to its immense complexity, the IEEE 802 standard logically divides the Data Link Layer into two distinct sublayers.
- Logical Link Control (LLC): This is the upper sublayer. It acts as an interface between the Data Link Layer and the Network Layer. It is responsible for identifying network layer protocols and managing error control and flow control mechanisms.
- Media Access Control (MAC): This is the lower sublayer. It acts as an interface directly with the Physical Layer. It is strictly responsible for hardware addressing and defining exactly how devices gain access to the physical transmission medium.
Common Protocols at the Data Link Layer
| Protocol | Functionality |
|---|---|
| Ethernet (IEEE 802.3) | The dominant protocol for wired local area networks, defining framing and media access control. |
| Point to Point Protocol (PPP) | Used to establish a direct connection between two networking nodes, often used over serial cables. |
| High Level Data Link Control (HDLC) | A bit-oriented protocol for transmitting data over synchronous links, focusing on error free delivery. |
