Skip to content
We areTOP 1%

What are the seven layers of the OSI model, and what does each do?

EasyConceptOSI & TCP/IP Models
Track your progress
First attempt
Re-solve after a few days
Final pass before interviews

Answer

The OSI (Open Systems Interconnection) model is a seven-layer reference model for describing network communication. From top to bottom, a common mnemonic is "All People Seem To Need Data Processing".

LayerMain jobExamples
7 Applicationservices used directly by programsHTTP, DNS, SMTP
6 Presentationdata format, encoding, compression, encryptionJSON, JPEG, TLS encryption
5 Sessionopening, managing and closing sessionsRPC, NetBIOS
4 Transportprocess-to-process delivery, ports, reliabilityTCP, UDP
3 Networklogical (IP) addressing and routingIP, ICMP, routers
2 Data Linkframing, MAC addressing, error detectionEthernet, Wi-Fi, switches
1 Physicalbits as electrical, light or radio signalscables, hubs
  • Layers 1 to 3 work hop by hop on every device along the path; layers 4 to 7 work end to end between the two hosts.
  • In real systems, layers 5 to 7 are usually implemented together inside the application.

Example: Sending an email: the client speaks SMTP (7), encodes and encrypts the text (6) and keeps a session open with the server (5); TCP splits it into segments (4), IP routes them (3), Ethernet frames them for the next hop (2) and the bits travel as signals (1).

More in OSI & TCP/IP Models

Sign in to track your progress

Your checkboxes, streak and activity heatmap are saved to your account and sync across devices. It is free.
Sign in with email

New here? Create an account