CHAPTER 03
Intermediate
OSI Model and TCP/IP Model
Updated: May 16, 2026
25 min read
# CHAPTER 3
OSI Model and TCP/IP Model
1. Introduction
In the 1970s, if you bought an IBM computer, it could only talk to other IBM computers. If you bought an HP computer, it could only talk to HPs. The internet could not exist in this fractured state. To solve this, engineers created a universal standard, breaking the complex task of networking into smaller, manageable pieces called "Layers." Today, every network engineer on earth speaks the language of the OSI Model and the TCP/IP Model. If you do not memorize these layers, you will fundamentally fail the CCNA. In this chapter, we will dissect the 7 Layers of the OSI model, compare it to the modern TCP/IP suite, and understand the critical concept of Data Encapsulation.2. Learning Objectives
By the end of this chapter, you will be able to:- Memorize the 7 Layers of the OSI Model in order.
- Describe the specific function of each OSI layer.
- Compare the OSI Model to the 4-Layer TCP/IP Model.
- Explain the process of Data Encapsulation and De-encapsulation.
- Map physical hardware (Switches, Routers) to their respective OSI layers.
3. The OSI Model (The 7 Layers)
The Open Systems Interconnection (OSI) model is a theoretical framework. *Mnemonic to remember from bottom to top: Please Do Not Throw Sausage Pizza Away.*- 1. Physical Layer (Layer 1): The raw physics. Copper cables, fiber optics, radio waves. Moving 1s and 0s as electrical voltage.
- 2. Data Link Layer (Layer 2): Moves data across the *local* physical link. Uses MAC Addresses. Switches operate here. Data is called a Frame.
- 3. Network Layer (Layer 3): Moves data across the global network to different cities. Uses IP Addresses. Routers operate here. Data is called a Packet.
- 4. Transport Layer (Layer 4): Ensures reliable delivery and sorts traffic to different applications using Port Numbers (TCP/UDP). Data is called a Segment.
- 5. Session Layer (Layer 5): Establishes, maintains, and terminates connections between two computers.
- 6. Presentation Layer (Layer 6): Formats, encrypts, and compresses data (e.g., JPEG, TLS encryption).
- 7. Application Layer (Layer 7): The network interface for human software. HTTP for web browsers, SMTP for email.
4. The TCP/IP Model (The Reality)
The OSI model is great for studying, but the actual internet runs on the TCP/IP Model. It simplifies the 7 layers into 4 highly practical layers:- 1. Network Access Layer: Combines OSI Layers 1 & 2 (Cables, MAC addresses, Ethernet).
- 2. Internet Layer: Maps to OSI Layer 3 (IP Addresses, Routing).
- 3. Transport Layer: Maps to OSI Layer 4 (TCP/UDP).
- 4. Application Layer: Combines OSI Layers 5, 6, & 7 (HTTP, DNS, FTP).
5. Data Encapsulation
When you send an email, the data travels *down* the layers on your computer, and *up* the layers on the receiving server. Encapsulation (Sending):- Layer 7: You write the email (Data).
- Layer 4: Your computer wraps the email in a TCP header (Segment).
- Layer 3: Your computer wraps the Segment in an IP header containing destination IPs (Packet).
- Layer 2: Your computer wraps the Packet in an Ethernet header containing MAC addresses (Frame).
- Layer 1: The Frame is converted into electricity and shot down the cable.
When the server receives it, it performs De-encapsulation, peeling off the headers one by one like a Russian nesting doll until it reaches the raw email data.
6. Layer Comparison Tables
| OSI Layer Number | OSI Model Name | TCP/IP Model Name | Hardware / Protocol Example |
|---|---|---|---|
| Layer 7, 6, 5 | Application, Presentation, Session | Application | HTTP, HTTPS, Web Browser |
| Layer 4 | Transport | Transport | TCP, UDP, Port Numbers |
| Layer 3 | Network | Internet | Routers, IPv4, IPv6 |
| Layer 2, 1 | Data Link, Physical | Network Access | Switches, Cables, MAC Addresses |
7. Diagrams/Visual Suggestions
*Visual Concept: The Encapsulation Process* Draw a large box labeled "User Data (Email)". Draw an arrow pointing down to a wider box labeled "TCP Header + Data". Draw another arrow pointing down to a wider box labeled "IP Header + TCP Header + Data". Draw a final arrow pointing down to the widest box labeled "Ethernet Header + IP + TCP + Data + Ethernet Trailer". This visually demonstrates how protocol headers wrap the original payload as it moves down the stack.8. Best Practices
- Speak in Layers: In professional IT, engineers do not say, "The router is broken." They say, "We have a Layer 3 routing issue." If a website won't load, but you can ping the server's IP address, an engineer will say, "Layer 3 is fine, the problem is at Layer 7." You must adopt this vocabulary immediately.
9. Common Mistakes
- Confusing Layer 2 and Layer 3 Addressing: The most common beginner mistake. Layer 2 uses MAC addresses and is strictly for local, room-to-room delivery. Layer 3 uses IP addresses and is for global, end-to-end delivery. If you try to send data across the internet using only a MAC address, the packet will never leave your house.
10. Mini Project: Layer Identification
Look at the following technologies and write down which OSI Layer they belong to:- 1. A Cat6 Copper Cable. *(Answer: Layer 1 - Physical)*
- 2. A Cisco 2960 Switch forwarding based on MAC addresses. *(Answer: Layer 2 - Data Link)*
-
3.
An IP Address (
192.168.1.5). *(Answer: Layer 3 - Network)*
- 4. TCP Port 443. *(Answer: Layer 4 - Transport)*
- 5. Google Chrome downloading an HTML file. *(Answer: Layer 7 - Application)*
11. Practice Exercises
- 1. Explain the concept of Data Encapsulation. Why do we wrap the original application data in multiple different protocol headers?
- 2. Compare the 7-Layer OSI model with the 4-Layer TCP/IP model. Which OSI layers are condensed to form the TCP/IP Application layer?
12. MCQs with Answers
Question 1
A standard network Router operates primarily at which layer of the OSI model?
Question 2
During data transmission, the Transport layer wraps the Application data in a header. What is the resulting Protocol Data Unit (PDU) officially called at Layer 4?
13. Interview Questions
- Q: Name the 7 layers of the OSI model in order from bottom to top, and provide one example of a protocol or hardware device that operates at Layer 2, Layer 3, and Layer 7.
- Q: An application is failing to connect. You can successfully ping the server's IP address, proving connectivity exists. Using the OSI model vocabulary, explain how you would isolate the problem.
- Q: Walk me through the exact process of Data Encapsulation as a packet moves from Layer 7 down to Layer 1 on a transmitting computer.