Packet.School
HomeLevelsSandboxPricingAbout
XP1,240
L2 · OSI Model
Level 2
6 lessons
  • 01What is the OSI Model?
  • 027 Layers Detailed
  • 03TCP/IP Model
  • 04Packet Journey
  • 05Encapsulation
  • 06Level 2 Quiz
Levels/L2 · OSI Model/Lesson 03
Lesson · 03

TCP/IP Model

TCP/IP is the protocol family that forms the foundation of the internet. It's more practical than the OSI model and is what actually runs in the real world — every packet you send travels through this model.

Duration
5min
Level
L2
Type
Lesson
Progress
3/ 6

01OSI vs TCP/IP

OSI gives better theoretical separation with 7 layers; TCP/IP is the 4-layer version used in practice.

Figure 1 · OSI → TCP/IP mapping
7 · Application 6 · Presentation 5 · Session 4 · Transport 3 · Network 2 · Data Link 1 · Physical OSI · 7 LAYERS Application HTTP · DNS · SMTP · SSH Transport Internet Network Access TCP/IP · 4 LAYERS

02TCP 3-way handshake

Before sending any data, TCP exchanges three messages. This is the foundation of reliability — both sides confirm they're ready to communicate.

Figure 2 · TCP 3-Way Handshake
Client Server SYN 1 · Connection request SYN-ACK 2 · Accept + acknowledge ACK 3 · Acknowledge CONNECTION ESTABLISHED

03TCP vs UDP

FeatureTCPUDP
ConnectionConnection-basedConnectionless
ReliabilityGuaranteedNo guarantee
OrderingOrderedUnordered
SpeedSlowerFaster
Use casesWeb, Email, SSHVideo, Games, DNS

04When to use which

Use TCP:

  • Web pages (HTTP/HTTPS)
  • Email (SMTP)
  • File transfer (FTP, SSH)

Use UDP:

  • Live video streaming
  • Online games
  • DNS queries
  • VoIP

05Summary

  • TCP/IP = The real 4-layer model powering the internet
  • TCP = Reliable but slower (3-way handshake)
  • UDP = Fast but no delivery guarantee
  • The internet runs on TCP/IP, not OSI
Previous
7 Layers Detailed
Next
Packet Journey
On this page
  • OSI vs TCP/IP
  • TCP 3-way handshake
  • TCP vs UDP
  • When to use which
  • Summary
Packet.School

An open, interactive curriculum for computer networking.

v3.0 · MIT22 lessons live

Learn

  • Lessons
  • Sandbox
  • Levels
  • Pricing
  • About

Simulations

  • Packet Journey
  • DNS Lookup
  • DHCP Simulator
  • Subnet Calc
  • Network Builder
  • Terminal

Project

  • About
  • Changelog
  • GitHub
  • Contributing
  • Style guide

Newsletter

One short email when a new level ships. No tracking pixels.

© 2026 Packet.School — MIT licensed☕ Support with a coffeebuilt in the open · last updated 2026.05.14