LightAtom

The OSI Model Explained (All 7 Layers)

The OSI model splits networking into seven layers, from cables to apps. It's a vocabulary more than a blueprint, but it's how engineers talk about problems.

The OSI (Open Systems Interconnection) model is a seven-layer framework describing how network communication works: physical, data link, network, transport, session, presentation and application. Each layer serves the one above it. The internet actually uses the simpler TCP/IP model, but OSI layer numbers are used everywhere.

How it works

The seven OSI layers: 7 Application, 6 Presentation, 5 Session, 4 Transport, 3 Network, 2 Data link, 1 Physical; layers 5 to 7 map to TCP/IP Application and 1 to 2 to Link.

The seven layers, bottom to top

  1. Physical: signals on cables, fibre and radio. Ethernet cables, Wi-Fi radios.
  2. Data link: frames between devices on the same network, addressed by MAC. Ethernet, Wi-Fi (802.11), switches, ARP.
  3. Network: packets across networks, addressed by IP. IPv4, IPv6, ICMP, routers.
  4. Transport: end-to-end delivery between programs, by port. TCP, UDP, QUIC.
  5. Session: managing a conversation's lifetime.
  6. Presentation: encoding, compression, encryption. TLS is often placed here.
  7. Application: what apps speak. HTTP, DNS, SSH, SMTP.

Mnemonic

From layer 1 up: Please Do Not Throw Sausage Pizza Away.

Why it's still useful

It's a shared vocabulary: “a layer 2 problem” means switching or Wi-Fi association, “layer 7 load balancer” means one that understands HTTP. Troubleshooting bottom-up (cable, Wi-Fi, IP, ports, app) is a reliable habit.

OSI vs TCP/IP

The TCP/IP model merges layers 5–7 into Application and layers 1–2 into Link, giving four layers. Real protocols map more neatly onto TCP/IP.

Side by side

#OSI layerUnitExamples
7ApplicationDataHTTP, DNS, SSH
6PresentationDataTLS, JPEG, UTF-8
5SessionDataSessions, RPC
4TransportSegment / datagramTCP, UDP, QUIC
3NetworkPacketIP, ICMP
2Data linkFrameEthernet, Wi-Fi, ARP
1PhysicalBitsCables, radio

Examples

Troubleshooting a site that won't load, layer by layer on a Mac:

  1. Wi-Fi connected? (layers 1–2)
  2. ping 192.168.1.1 and ping 1.1.1.1? (layer 3)
  3. nc -vz example.com 443? (layer 4)
  4. curl -I https://example.com? (layers 5–7)

On a Mac

The Mac's own tools map to layers: Wireless Diagnostics (1–2), arp and ifconfig (2), ping and traceroute (3), netstat, lsof and nc (4), and curl, dig and openssl s_client (7).

See it in the app

LightAtom works at layers 3, 4 and 7: the connections view shows IP addresses, ports and protocols, and the domain names apps used.

Frequently asked questions

What are the 7 layers of the OSI model?

Physical, data link, network, transport, session, presentation and application, from layer 1 to layer 7.

Is the OSI model still used?

As a reference and vocabulary, yes. The internet itself is built on the TCP/IP model.

What layer is TCP?

Layer 4, the transport layer. IP is layer 3 and HTTP is layer 7.

What is an easy way to remember the OSI layers?

From layer 1: Please Do Not Throw Sausage Pizza Away (Physical, Data link, Network, Transport, Session, Presentation, Application).

LightAtom team

The people who build LightAtom, a network monitor for macOS.