The OSI (Open Systems Interconnection) model is a seven-layer framework that describes how data travels between devices on a network. ISO published it in 1984 as ISO/IEC 7498-1. Real networks run on the simpler TCP/IP suite, but the OSI model remains the common language engineers use to learn, design and troubleshoot networks.
This guide explains each layer, with example protocols and devices, how encapsulation works and how to use the model to solve problems.

The seven layers at a glance
| Layer | Name | Main job | Examples | Data unit |
|---|---|---|---|---|
| 7 | Application | Network services for applications | HTTP, DNS, SMTP, SSH | Data |
| 6 | Presentation | Data format, encryption, compression | TLS, JPEG, UTF-8 | Data |
| 5 | Session | Open, manage and close sessions | Session management in RPC, SMB | Data |
| 4 | Transport | End-to-end delivery, ports, reliability | TCP, UDP | Segment / datagram |
| 3 | Network | Logical addressing and routing | IPv4, IPv6, ICMP, OSPF | Packet |
| 2 | Data link | Delivery on the local link, MAC addresses | Ethernet, Wi-Fi, ARP, VLANs | Frame |
| 1 | Physical | Bits on the medium | Cables, fibre, radio, connectors | Bits |
A popular memory aid, from layer 7 down, is “All People Seem To Need Data Processing”.
Layer by layer
Layer 1: Physical
This layer turns bits into electrical, optical or radio signals. It covers cables, connectors, voltages and frequencies. Hubs, repeaters and transceivers work here.
Layer 2: Data link
The data link layer packages bits into frames and delivers them between devices on the same network using MAC addresses. It also detects transmission errors. Switches and network cards work mainly at this layer, and VLANs and Spanning Tree belong here.
Layer 3: Network
The network layer gives devices logical addresses, such as IP addresses, and chooses paths between networks. Routers and Layer 3 switches operate here.
Layer 4: Transport
The transport layer delivers data between programs using port numbers. TCP provides reliable, ordered delivery with acknowledgements and flow control. UDP is faster but does not guarantee delivery. Firewalls often filter traffic at this layer.
Layer 5: Session
The session layer sets up, maintains and ends conversations between applications. In practice, applications and transport protocols usually handle this job.
Layer 6: Presentation
The presentation layer makes sure both sides understand the data format. It covers character encoding, data serialisation, compression and encryption.
Layer 7: Application
This layer provides network services to software, such as web browsing, email and file transfer. It is not the application itself, but the protocols it uses. Web application firewalls and proxies inspect traffic here.
Encapsulation and decapsulation
On the sender, each layer adds its own header as data moves down: transport adds ports, network adds IP addresses and data link adds MAC addresses. On the receiver, each layer removes its header as data moves up. For an everyday version, read our OSI model analogy.
Why the OSI model still matters
- Troubleshooting: work up from layer 1 (cable) to layer 7 (application) to find a fault quickly.
- Communication: terms like “layer 2 switch” or “layer 7 load balancer” are understood everywhere.
- Security: controls map to layers, for example port security at layer 2, ACLs at layers 3 and 4, and WAFs at layer 7.
- Learning: it breaks a complex system into manageable parts.
OSI vs TCP/IP
The TCP/IP model has four layers: application (OSI 5 to 7), transport, internet and link (OSI 1 and 2). Read more in the TCP/IP model explained.
Sources
Need help with network security? We test routers, firewalls, ACLs and segmentation as part of our VAPT services and hardening audits. Contact us for a quote.

Pingback: OSI Model Analogy - Youngster Company
Pingback: Everything about TCP IP Model - Youngster Company