Data Link Layer·Lesson 2 of 11
Functions of the Data Link Layer
The Jobs It Does
We know the data link layer moves data from one device to the next device on the same link. But "move data" is really several smaller jobs bundled together. Breaking them apart makes the whole layer easy to understand — and this exact list is a favourite interview question. Every job below exists to solve one specific problem that shows up when you send data across a wire or through the air.
The five jobs at a glance
Framing, addressing, error control, flow control, and access control. Framing shapes the data, addressing labels it, error control keeps it correct, flow control keeps the pace sane, and access control decides whose turn it is to talk.
Framing
The physical layer below just sees a long, unbroken stream of 1s and 0s. On its own, the receiver has no idea where one message ends and the next begins. solves this by chopping the stream into discrete blocks called frames, each with a clear start and end, a header at the front, and a trailer at the back. Think of it as adding spaces and punctuation to a run-on sentence so it can actually be read.
Addressing
On a shared network, many devices hear the same signals, so each frame needs to say who it is for. The data link layer stamps every frame with a source and a destination — a unique hardware address built into each device. A device reads the destination address and keeps only the frames meant for it, ignoring the rest.
Error Control
Signals get distorted by noise as they travel, so a bit sent as 1 can arrive as 0. is how the layer notices this. The sender adds a small check value to the frame's trailer, calculated from the frame's contents. The receiver recalculates it and compares — if they differ, the frame was damaged. Depending on the protocol, the receiver then drops the bad frame or asks for it to be sent again.
Flow Control
Imagine a fast computer firing frames at a slower, older device. The slow device stores incoming frames in a small waiting area called a , and if frames arrive faster than it can process them, the buffer overflows and data is lost. prevents this by letting the receiver signal "slow down" or "I'm ready for more," keeping the sender's pace matched to the receiver's.
Access Control
When several devices share one medium — a single cable, or the open air for Wi-Fi — only one can transmit at a time. If two send at once, their signals overlap and both are ruined; this is called a . Access control (the "Media Access Control" part of the layer's name) is the set of rules that decides whose turn it is to transmit, so devices take turns instead of talking over each other.
Like a walkie-talkie channel
On a walkie-talkie, everyone shares one channel, so only one person can speak at a time. People say "over" to signal they are done and the channel is free. If two people press the button together, both voices garble into noise. Access control is the networking version of those turn-taking rules.
The Functions Side by Side
Each function exists to fix one specific problem. Lining them up against the problem they solve makes them easy to remember:
| Function | The problem it solves |
|---|---|
| Framing | Where does one message start and end in the bit stream? |
| Addressing | Which device on the link is this frame for? |
| Error control | Did the frame arrive undamaged? |
| Flow control | Is the sender going faster than the receiver can handle? |
| Access control | Whose turn is it to transmit on a shared medium? |
“"Flow control and error control are the same thing."”
Q:What are the main functions of the data link layer?
A: Framing (splitting the bit stream into frames), addressing (stamping frames with source and destination MAC addresses), error control (detecting and handling corrupted frames), flow control (pacing the sender to match the receiver), and access control (deciding which device may transmit on a shared medium). A strong answer names each function and the specific problem it solves.
Quick Revision Cheat Sheet
Framing: Split the bit stream into frames with a clear start and end
Addressing: Stamp each frame with source and destination MAC addresses
Error control: Detect damaged frames with a trailer check value
Flow control: Pace the sender to match the receiver's speed
Access control: Decide whose turn it is to transmit on a shared medium
Key distinction: Error control = correctness; flow control = pace