OSI VS TCP/IP Models | Cyber Security Tutorial - Learn with VOKS
Back Next

OSI VS TCP/IP Models


introduction

when computers communicate over a network, they follow structured rules. these rules are organized into models so engineers can design, build, and troubleshoot networks more easily.

two of the most important networking models are:

  1. osi model
  2. tcp/ip model

both describe how data moves from one device to another, but they organize the process differently.

why networking models exist

imagine sending a package:

  • you write the letter
  • you put it in an envelope
  • the post office sorts it
  • trucks deliver it
  • the receiver opens it

network communication works in a similar layered way. each layer has a specific responsibility.

models help by:

  • dividing complex communication into smaller parts
  • making troubleshooting easier
  • allowing different vendors to build compatible devices

The osi model

osi stands for open systems interconnection.

it was developed by the international organization for standardization (iso).

the osi model has 7 layers.

here are the 7 layers from top to bottom:

7  application
6  presentation
5  session
4  transport
3  network
2  data link
1  physical

now let us explain each layer in simple terms.

layer 7 – application

this is where users interact with the network.

examples: web browsers, email programs, ftp clients.

layer 6 – presentation

responsible for formatting, encryption, and compression.

example: converting text into a format both computers understand.

layer 5 – session

manages sessions (connections) between devices.

example: keeping a login session active.

layer 4 – transport

responsible for reliable delivery and error checking.

example protocols: tcp and udp.

layer 3 – network

handles logical addressing and routing.

example: ip addresses.

layer 2 – data link

handles physical addressing using mac addresses.

example: ethernet frames.

layer 1 – physical

deals with cables, electrical signals, bits (0s and 1s).

The tcp/ip model

tcp/ip stands for transmission control protocol / internet protocol.

it is the practical model used on the internet today.

it has 4 layers.

4  application
3  transport
2  internet
1  network access

explanation of each layer:

application layer

combines osi layers 7, 6, and 5.

examples: http, ftp, smtp, dns.

transport layer

same as osi transport layer.

protocols: tcp, udp.

internet layer

same as osi network layer.

handles ip addressing and routing.

network access layer

combines osi data link and physical layers.

handles mac addresses and physical transmission.

Side-by-side comparison

osi model (7 layers)            tcp/ip model (4 layers)

7  application  --------\
6  presentation  -------- >  application
5  session      --------/

4  transport     -------- >  transport

3  network       -------- >  internet

2  data link     --------\
1  physical      -------- >  network access

main differences

  1. number of layers
  2. osi has 7 layers
  3. tcp/ip has 4 layers
  4. theoretical vs practical
  5. osi is mainly a reference model
  6. tcp/ip is the real-world internet model
  7. layer grouping
  8. tcp/ip merges some osi layers together
  9. development history
  10. osi was developed as a theoretical standard
  11. tcp/ip was developed first and became widely adopted

Which model is used today

tcp/ip is used in real networks and on the internet.

osi is mainly used for:

  • learning networking
  • troubleshooting
  • understanding how communication works

Simple analogy

osi model = detailed blueprint of a car engine (very structured, very specific)

tcp/ip model = the working engine used in real cars

When troubleshooting networks

engineers often say things like:

  • "this is a layer 1 problem" (cable unplugged)
  • "this is a layer 3 issue" (ip routing problem)

this terminology comes from the osi model.

Example Code:
# osi model layers
7  application
6  presentation
5  session
4  transport
3  network
2  data link
1  physical

# tcp/ip model layers
4  application
3  transport
2  internet
1  network access

# osi vs tcp/ip mapping
osi model (7 layers)            tcp/ip model (4 layers)

7  application  --------\
6  presentation  -------- >  application
5  session      --------/

4  transport     -------- >  transport

3  network       -------- >  internet

2  data link     --------\
1  physical      -------- >  network access
Cyber Security
Introduction Types of Cyber Threats Cyber Security Domains CIA Triad (Confidentiality Integrity Availability) Career paths in Cyber Security Certifications Ethics and Responsible Disclosure Laws and Regulation (e.g. GDPR, NDPR) What is an OS? Types: Window, Linus, macOS Command-line vs GUI OS Internals Overview (filesystems, processes, permissions) Windows command prompt basics Linux Bash Basics File System Navigation Basic Scripting IP Addressing DNS, DHCP Mac Address OSI VS TCP/IP Models Ports and Protocols (TCP, UDP) Common Protocols (HTTPS, FTP, SSH, etc.) Packet structure Firewalls, IDS/IPS, VPNs Common attacks: MITM, Sniffing Secure Network Practices How the Web works HTTP vs HTTPS URLs, Headers, Cookies Client-Server Architecture Introduction To Web Security OWASP Top 10 Overview Common Threats (XSS, SQLi, CSRF) Inpute validation and authentication flow Basic Exploitation demo (e.g. XSS) Burp Suite Introduction Using a Browser For Testing Password security MFA-Antivirus Cyber Hygeine Practice Intro To Tools: Nmap, Wireshark, Netstat
All Courses
Advance AI Bootstrap C C++ Computer Vision Content Writing CSS Cyber Security Data Analysis Deep Learning Email Marketing Excel Figma HTML Java Script Machine Learning MySQLi Node JS PHP Power Bi Python Python for AI Python for Analysis React React Native SEO SMM SQL