OSI Model
The 7 Layers of the OSI Model
| Layer | Name | PDU | Key Functions | Devices / Hardware | Common Protocols / Examples | Exam Mnemonics / Notes |
|---|---|---|---|---|---|---|
| 7 | Application | Data | Provides network services directly to end-user applications. User interface to network. | End-user apps, browsers | HTTP, HTTPS, FTP, SMTP, DNS, SNMP, Telnet | Where the user interacts (e.g., browser, email client) |
| 6 | Presentation | Data | Translates data formats between application and network. Handles encryption, compression, character encoding. | — | TLS/SSL (handshake), JPEG, ASCII/Unicode, MIME | "Translator" layer – syntax/format conversion |
| 5 | Session | Data | Manages sessions/connections between applications. Setup, coordination, termination, checkpoints. | — | NetBIOS, RPC, SIP (some aspects) | "Dialog controller" – start/stop/restart sessions |
| 4 | Transport | Segment (TCP) / Datagram (UDP) | End-to-end delivery, segmentation, flow control, error recovery, reliability. | — | TCP (reliable), UDP (fast/unreliable) | "Post office" layer – reliable delivery options |
| 3 | Network | Packet | Logical addressing, routing between networks, path determination. | Routers | IP (IPv4/IPv6), ICMP (ping/traceroute), IPsec | "Routing" layer – routers live here |
| 2 | Data Link | Frame | Node-to-node delivery on same network. Framing, MAC addressing, error detection (not correction), flow control. | Switches, bridges, NICs | Ethernet, PPP, ARP, MAC addresses | "Switching" layer – switches operate here |
| 1 | Physical | Bits | Raw bit transmission over physical medium. Defines electrical, mechanical, functional specs. | Cables, hubs, repeaters, NIC ports | Ethernet cabling (Cat6), fiber, Wi-Fi signals | "Physics" of the network – cables & signals |
Encapsulation / De-encapsulation Process
Data flow: Sending device (top-down) – Encapsulation
- Layer 7–5: Data
- Layer 4: Adds header → Segment (TCP) or Datagram (UDP)
- Layer 3: Adds IP header → Packet
- Layer 2: Adds MAC header + trailer (FCS for error check) → Frame
- Layer 1: Converts to Bits (electrical/optical signals)
Receiving device (bottom-up) – De-encapsulation: Strips headers in reverse order.
Exam tip: Know where headers are added (each lower layer adds its own header; Layer 2 also adds trailer).
Key Devices by Layer
- Layer 1: Hubs, repeaters, cables, connectors
- Layer 2: Switches (forward based on MAC), bridges
- Layer 3: Routers (forward based on IP), Layer 3 switches
- Layer 4–7: Firewalls (some inspect up to L7), load balancers, proxies, IDS/IPS
Troubleshooting with OSI Model
Common method:
- Top-down: Start at Layer 7 (can user access the app?) → down to Layer 1
- Bottom-up: Start at Layer 1 (is cable plugged in?) → up to Layer 7
- Divide and conquer: Jump to middle (e.g., can you ping? → Layer 3)
Exam scenarios:
- "No link light" → Layer 1
- "Can ping IP but not hostname" → Layer 7 (DNS) or Layer 3
- "MAC address table issue" → Layer 2 (switch)
Quick Memorization Tips
- Layers 1–4: Lower layers – more hardware/physical focus
- Layers 5–7: Upper layers – software/application focus
- Remember devices: Router = Layer 3, Switch = Layer 2
- PDU progression: Bits → Frame → Packet → Segment/Datagram → Data
- Common exam pairs:
- IP address = Layer 3
- MAC address = Layer 2
- Port numbers = Layer 4 (TCP/UDP)
- Encryption often associated with Layer 6 (Presentation)
Study Strategy
- Memorize the 7 layers and mnemonic daily.
- Quiz yourself: "What layer does a router operate on?" or "What PDU at Layer 3?"
- Practice mapping real-world issues to layers (e.g., "cable unplugged" = L1, "wrong subnet" = L3).
- Use Professor Messer videos or similar for visuals (watch encapsulation animations).
- Flashcards: Front = Layer number/name → Back = function + device + protocol + PDU.