HomeGuidesOSI Model Layers Explained

The OSI Model Layers Explained: A Hands-On Guide

9 min readUpdated June 2026Fundamentals

If you've studied networking for more than five minutes, you've heard of the OSI model. But here's the truth most tutorials won't tell you: memorising the seven layers isn't enough — you need to see them in action.

The Open Systems Interconnection (OSI) model is a conceptual framework that standardises how networking functions across seven distinct layers. It was developed by the ISO in 1984, and despite being decades old, it remains the single best mental model for understanding network communication.

Try it live
Open the OSI 7-Layer Model Lab and click Auto-Trace to watch packets move through each layer as you read.

Layer 1 — Physical (The Cable Layer)

What it does: Transmits raw bits over a physical medium. The Physical layer is the hardware — voltage levels, cable types (Cat5e, Cat6, fibre), connector shapes (RJ45, LC, SC), and signalling methods.

Real-world example: A bad cable crimp or damaged fibre patch lead causes Layer 1 issues — your link light goes off and nothing else in the stack works.

Exam tip
Know the difference between UTP vs STP cable types, straight-through vs crossover cables, and the maximum segment length (100m for twisted pair).

Layer 2 — Data Link (The Switch Layer)

What it does: Frames data, handles MAC addressing, and manages access to the physical medium. Ethernet uses 48-bit MAC addresses burned into every NIC.

  • MAC addressing — each device has a unique hardware address
  • Switching — forwards frames based on the destination MAC address
  • CSMA/CD — Carrier Sense Multiple Access with Collision Detection
  • ARP — resolves IP addresses to MAC addresses
Exam tip
Switches learn MAC addresses and build a CAM table — hubs just repeat signals with no learning involved.

Layer 3 — Network (The Router Layer)

What it does: Routes packets between networks using logical addressing (IP addresses). Routers examine the destination IP in each packet and forward it toward the correct network.

  • IP — the core addressing and forwarding protocol
  • ICMP — used by ping and traceroute
  • OSPF, BGP, RIP — routing protocols
  • NAT — translates private IPs to public IPs

Layer 4 — Transport (The Reliability Layer)

ProtocolFull NameCharacteristics
TCPTransmission Control ProtocolConnection-oriented, reliable, ordered
UDPUser Datagram ProtocolConnectionless, fast, best-effort

TCP establishes a connection using the three-way handshake (SYN, SYN-ACK, ACK), sequences segments, and retransmits lost data. UDP is fire-and-forget — used for streaming, VoIP, DNS, and DHCP.

Exam tip
Memorise common ports: HTTP (80), HTTPS (443), FTP (20/21), SSH (22), DNS (53), DHCP (67/68), SMTP (25).

Layer 5 — Session (The Dialogue Layer)

Manages sessions — establishes, maintains, and terminates connections between applications. Controls half-duplex vs full-duplex communication and session checkpointing for recovery from interruptions.

Layer 6 — Presentation (The Translation Layer)

In the OSI teaching model, Layer 6 is often associated with representation tasks such as encoding, compression and encryption. TLS is commonly described this way for exam mapping, but in the TCP/IP stack it sits above transport and is usually grouped with application-layer protocols; the exact implementation boundary depends on the system.

Layer 7 — Application (The User Layer)

The closest layer to the end user. Important: the application itself (Chrome, Outlook) is not Layer 7 — the protocols applications use (HTTP, DNS, SMTP, FTP, DHCP) are.

Encapsulation: How Data Moves Through the Layers

This is the most important concept to understand. As data travels down through the layers, each layer adds a header — a process called encapsulation.

Layer 7-5: Application Data
Layer 4:   TCP Header  │ Application Data        ← Segment
Layer 3:   IP Header   │ TCP │ App Data           ← Packet
Layer 2:   MAC │ IP │ TCP │ App │ CRC             ← Frame

When the receiving device gets the data, each layer strips its header (decapsulation) and passes the payload up. This is exactly what the OSI lab visualises — click Encapsulation to watch headers added, then Decapsulation to see them removed in reverse.

Mnemonic: Remember the Seven Layers

  • Top-down: All People Seem To Need Data Processing
  • Bottom-up: Please Do Not Throw Sausage Pizza Away

Troubleshooting With the OSI Model

When a user can't reach a website: check the cable/link light (Layer 1) → check switch port status (Layer 2) → can you ping the gateway? (Layer 3) → is the port open? (Layer 4) → is the web server running? (Layer 7).

Test Your Knowledge

A user can ping other computers on their local network but cannot browse the internet. Which OSI layer is the problem?

Layer 3 (Network). They can communicate within their subnet (Layer 2 switching works), but cannot reach external networks. Likely causes: misconfigured default gateway, missing route, or DNS resolution failure.

📶
Practice in NetForge
OSI 7-Layer Model Lab — trace encapsulation live →
🔌
Practice in NetForge
TCP Connection Lifecycle — see Layer 4 in action →
🌐
Practice in NetForge
DNS Resolution Visualiser — trace a Layer 7 request →
Free access

Get exam-ready with every lab and mock exam

Every interactive lab and CompTIA Network+ and Security+ exam practice feature is open to everyone at no cost.