Data link layer: OSI layer 2 explained
The OSI data link layer defines local frame delivery, media access, and error checks between devices on the same network segment.

When two devices share the same network segment, they still need rules for who talks first, how frames are labeled, and what happens when bits get scrambled. That job falls to the data link layer, also known as layer 2, in the OSI model.
The data link layer moves frames between nearby devices and handles local access, addressing, and error checks.
What changed
Get the latest AI news in your inbox
Weekly picks of model releases, tools, and deep dives — no spam, unsubscribe anytime.
No spam. Unsubscribe at any time.
The concept has not changed, but the standard view is clearer: layer 2 sits between the physical layer and the network layer, handling node-to-node delivery on a single link or LAN. It does not route traffic across networks; instead, it focuses on local delivery, frame formatting, and access to the medium.

In the OSI model, the data link layer is commonly split into two sublayers: logical link control and media access control. LLC multiplexes upper-layer protocols and can add flow control or acknowledgment, while MAC decides who may use the medium and how frames are synchronized and addressed.
- Layer 2 transfers data as frames, not packets.
- Frame headers carry source and destination MAC addresses.
- Many LANs use flat addresses, unlike routable network-layer addresses.
- MAC methods include CSMA/CD for Ethernet and CSMA/CA for WiFi.
- Some protocols add error detection, retransmission, or flow control.
Wikipedia’s overview also notes that different standards divide the layer differently. IEEE 802 networks usually describe LLC and MAC as separate sublayers, while protocols such as HDLC may bundle both functions, and G.hn adds an extra convergence sublayer for home wiring networks.
Why it matters
For developers, layer 2 is where local network behavior becomes concrete: frame boundaries, collision handling, switching, VLANs, and MAC filtering all live here. If a device can reach the wire but cannot exchange frames reliably, the problem is often in this layer rather than in routing or application code.

It also explains why some failures are local and some are not. Ethernet usually skips retransmission at layer 2 because short wired links rarely corrupt bits, while wireless links and modem-style connections may rely on link-layer recovery. That difference affects latency, throughput, and where error handling should be built into a stack.
The TCP/IP model folds this work into its link layer, but the OSI framing still helps teams map problems to the right place. If a network issue looks like “the app is down,” layer 2 is often the first checkpoint for switching, addressing, and media access faults.
For anyone debugging packet loss or building networked systems, the takeaway is simple: layer 2 is the local traffic rulebook, and most of its work happens before data ever leaves the segment.
// Related Articles
- [RSCH]
The OSI model still explains networking well
- [RSCH]
Evaluation Protocols for Fine-Tuned LLMs in 2026
- [RSCH]
DeepSpec should be treated as a data-regeneration pipeline, not a tra…
- [RSCH]
Program-as-Weights turns prompts into reusable tools
- [RSCH]
LACUNA tests whether LLM unlearning really erases
- [RSCH]
Persistent-state AI agents open a new attack surface