Skip to main content

What is the OSI model?

The OSI model (Open Systems Interconnection) is a reference seven-layer model, developed by ISO, that describes how data travels through a network from an application on one device to an application on another.

Short formulation for an interview:

OSI is a conceptual model of 7 layers that standardizes the interaction of network systems. Each layer is responsible for its part of network communication: from physical transmission to the work of applications.

OSI is NOT a protocol, but a theoretical model, on the basis of which protocols and networks are built.


The main idea of OSI

The OSI model answers the question:

How does data turn from packets into electrical signals and back?

It breaks the process of network exchange into 7 layers, where each layer:

  • performs its own tasks,
  • interacts with neighboring layers,
  • hides its internal workings from other layers.

The 7 layers of the OSI model: a breakdown of each layer

1. Physical Layer

Transmits raw bits over the physical medium:

  • electrical signals
  • optical pulses
  • radio waves
  • connectors, cables, frequencies

Devices: cables, connectors, hubs, transceivers Example technologies: Ethernet physical layer, Wi-Fi radio, fiber optics, USB


Transmits frames between devices within one network (LAN).

Responsible for:

  • MAC addressing
  • error detection (CRC)
  • media access control

Sublayers:

  • MAC (Media Access Control)
  • LLC (Logical Link Control)

Examples: Ethernet, Wi-Fi (802.11), PPP, VLAN (802.1Q) Devices: switch


3. Network Layer

Moves packets between networks (routing).

Functions:

  • IP addressing
  • routing
  • packet fragmentation

Protocols:

  • IPv4
  • IPv6
  • ICMP
  • OSPF, BGP, RIP (routing)

Devices: router


4. Transport Layer

Ensures reliable or fast delivery of data between hosts.

Functions:

  • port numbers
  • segmentation and reassembly
  • delivery control

Protocols:

  • TCP: reliable, with acknowledgment
  • UDP: fast, without acknowledgment

5. Session Layer

Manages sessions between applications.

Functions:

  • creating/maintaining/terminating connections
  • dialog control
  • synchronization

Rarely used directly in modern protocols.


6. Presentation Layer

Responsible for data format:

  • encoding (ASCII, UTF-8)
  • compression
  • encryption (SSL/TLS partially belongs here)

Example: converting data into a format suitable for transmission.


7. Application Layer

The layer where the user and applications operate.

Protocols:

  • HTTP / HTTPS
  • DNS
  • FTP / SFTP
  • SMTP / POP3 / IMAP
  • DHCP
  • SNMP

These are not applications, but network protocols for applications.


How data passes through the OSI layers

On the sending computer:

Application → Presentation → Session → Transport → Network → Data Link → Physical

On the receiving computer:

Physical → Data Link → Network → Transport → Session → Presentation → Application

Each layer adds or removes its own header (encapsulation / decapsulation).


Comparing OSI and TCP/IP

https://www.researchgate.net/publication/327483011/figure/fig2/AS%3A11431281398641971%401745530538265/The-logical-mapping-between-OSI-basic-reference-model-and-the-TCP-IP-stack.tif
https://www.researchgate.net/publication/327483011/figure/fig2/AS%3A11431281398641971%401745530538265/The-logical-mapping-between-OSI-basic-reference-model-and-the-TCP-IP-stack.tif
https://encryptinsights.com/wp-content/uploads/2024/08/tcp-ip-model-vs-osi-model-comparison.png
https://encryptinsights.com/wp-content/uploads/2024/08/tcp-ip-model-vs-osi-model-comparison.png
https://miro.medium.com/1%2Ac2BEQmpzWhclsVmxGtLvoA.png
https://miro.medium.com/1%2Ac2BEQmpzWhclsVmxGtLvoA.png

4

OSI (7 layers)TCP/IP (4 layers)
ApplicationApplication
PresentationApplication
SessionApplication
TransportTransport
NetworkInternet
Data LinkNetwork Access
PhysicalNetwork Access

TCP/IP is a practical model, OSI is a theoretical one.


Why the OSI model is needed

  • helps understand how networks work, layer by layer
  • useful for diagnostics (identify at which layer the problem is)
  • applicable when designing networks
  • structures the work of protocols
  • used in interviews and exams (Cisco CCNA, CompTIA Network+)

A ready answer for an interview

The OSI model is a seven-layer reference model for the interaction of network systems. Each layer is responsible for its part of data transmission, from the physical medium to applications. Layers: Physical, Data Link, Network, Transport, Session, Presentation, Application. OSI helps understand network protocols, diagnostics, and network design.


Cheat sheet (5 seconds)

7 OSI layers:

  1. Physical: signals, cables
  2. Data Link: MAC, frames, switch
  3. Network: IP, routing
  4. Transport: TCP/UDP
  5. Session: session management
  6. Presentation: encryption, encoding
  7. Application: HTTP, DNS, SMTP

Short Answer

Interview ready
Premium

A concise answer to help you respond confidently on this topic during an interview.