OSI Network Model
The Open Systems Interconnection (OSI) model is a conceptual framework that divides network communication into 7 layers. Each layer has a specific job, and together they describe how data travels from one computer to another across a network.
Learning Objectives
- 12.6.1.2 Describe the functions of the OSI network model layers
Conceptual Anchor
The Postal System Analogy
Sending data over a network is like sending a letter. You write the message (Application), put it in an envelope (Presentation), start a conversation (Session), choose reliable or fast delivery (Transport), write the address (Network), hand it to the postman (Data Link), and it travels by road/air (Physical). Each layer adds its own "wrapping" — this process is called encapsulation.
The 7 Layers
Mnemonic to Remember
"All People Seem To Need Data Processing" — from Layer 7 (Application) down to Layer 1 (Physical).
| # | Layer | Function | Data Unit | Examples |
|---|---|---|---|---|
| 7 | Application | Provides network services directly to the user/application | Data | HTTP, FTP, SMTP, DNS |
| 6 | Presentation | Data formatting, encryption, compression | Data | SSL/TLS, JPEG, ASCII, encryption |
| 5 | Session | Establishes, manages, and terminates sessions | Data | NetBIOS, RPC, login sessions |
| 4 | Transport | Reliable data transfer, error checking, flow control | Segment | TCP, UDP |
| 3 | Network | Logical addressing (IP) and routing between networks | Packet | IP, ICMP, routers |
| 2 | Data Link | Physical addressing (MAC), error detection, frame delivery | Frame | Ethernet, Wi-Fi, switches |
| 1 | Physical | Transmits raw bits over physical medium | Bits | Cables, hubs, radio signals |
Encapsulation
1 Sending Data (Top → Bottom)
As data moves down the layers, each layer adds a header (and sometimes a trailer). This wrapping is called encapsulation.
Layer 7–5: Data → [Application data]
Layer 4: Segment → [TCP Header | Data]
Layer 3: Packet → [IP Header | TCP Header | Data]
Layer 2: Frame → [MAC Header | IP Header | TCP Header | Data | Trailer]
Layer 1: Bits → 010110101110010...2 Receiving Data (Bottom → Top)
The receiving device de-encapsulates — it strips headers layer by layer until the original data is revealed.
Layer 1: Bits received → reassemble frame
Layer 2: Remove MAC header → extract packet
Layer 3: Remove IP header → extract segment
Layer 4: Remove TCP header → extract data
Layer 7–5: Application receives the original dataCommon Pitfalls
Confusing Layer 2 and Layer 3
Layer 2 (Data Link) uses MAC addresses and switches — works within a local network. Layer 3 (Network) uses IP addresses and routers — works between networks.
OSI vs TCP/IP Model
The OSI model has 7 layers (theoretical reference). The TCP/IP model has 4 layers (practical implementation). They are related but not identical. The exam typically asks about OSI.
Tasks
Name all 7 layers of the OSI model from top to bottom.
Explain what happens during encapsulation when a device sends data.
For each device — hub, switch, router — state which OSI layer it operates at and why.
Explain why the OSI model separates communication into layers. What are the benefits of this modular approach?
Self-Check Quiz
Q1: Which layer is responsible for routing packets between networks?
Q2: What is the data unit at the Transport layer?
Q3: Which layer handles encryption?