The OSI model has 7 layers describing how network communication works.
Introduction to CS
What is Computer Science?
Operating Systems
OS Fundamentals
Cybersecurity Basics
Security Fundamentals
Software Engineering
Software Development Life Cycle
Cloud Computing
Cloud Computing Basics
Dynamic Programming
Dynamic Programming Introduction
AI & Machine Learning
Introduction to AI & ML
Internet of Things
IoT Fundamentals
Blockchain Basics
How Blockchain Works
Computer Science
Beginner
FREE
OSI Model
Lesson 2 of 17
Beginner
Interactive
Syntax
COMPUTER-SCIENCE
7. Application — HTTP, FTP, SMTP 6. Presentation — SSL/TLS, encryption 5. Session — API, sockets 4. Transport — TCP, UDP 3. Network — IP, routing 2. Data Link — MAC, Ethernet 1. Physical — cables, signals
OSI Model Layers
PYTHON
layers = {
7: ("Application", "HTTP, FTP, SMTP"),
6: ("Presentation", "SSL/TLS, Encoding"),
5: ("Session", "NetBIOS, RPC"),
4: ("Transport", "TCP, UDP"),
3: ("Network", "IP, ICMP, Router"),
2: ("Data Link", "Ethernet, MAC, Switch"),
1: ("Physical", "Cables, Hubs, Signals")
}
print("OSI Model Layers:")
for num, (name, protocols) in sorted(layers.items(), reverse=True):
print(f" Layer {num}: {name:12} | {protocols}")
Practice
1
Exercise
Name all 7 OSI layers.
Answer
Physical, Data Link, Network, Transport, Session, Presentation, Application.
Quick Quiz
1
Which layer does IP operate at?
IP operates at Layer 3 (Network).
Interview Questions
It standardizes network communication into layers, making it easier to understand, troubleshoot, and develop network technologies.