Skip to main content
1:1 mock interviews with Sumit, scored on a real hiring rubric.Book a slot →

The OSI Model Explained: All 7 Layers in Plain English

A clear walkthrough of the 7 layers of the OSI model, what each layer does, real protocols at every layer, and how encapsulation works.

JioCoderUpdated Oct 11, 20262 min readNetworking
The OSI Model Explained: All 7 Layers in Plain English

The OSI (Open Systems Interconnection) model splits network communication into seven layers, each with one clear job. It is the shared vocabulary engineers use when they say "that's a Layer 3 problem" or "use a Layer 7 load balancer".

The seven layers at a glance#

The 7 layers of the OSI model from Application down to Physical with example protocols

A popular way to remember them from top to bottom: "All People Seem To Need Data Processing".

Layer by layer#

7. Application#

Where network-aware software lives. It defines how applications request and exchange data. Examples: HTTP, DNS, SMTP, FTP, SSH.

6. Presentation#

Makes data understandable to both sides: character encoding, serialization, compression and encryption. TLS is commonly placed here, along with formats like JPEG and UTF-8.

5. Session#

Opens, manages and closes conversations between two applications, including checkpoints and reconnection. In modern stacks this job is often absorbed into the application or transport layers.

4. Transport#

Delivers data end-to-end between processes using port numbers. TCP adds reliability, ordering and flow control; UDP is lightweight and connectionless. The unit here is a segment (or datagram for UDP).

3. Network#

Handles logical addressing and routing between networks. IP lives here and routers operate here. The unit is a packet.

Moves frames between devices on the same local link using MAC addresses, and detects transmission errors. Ethernet and Wi-Fi (802.11) work here; switches are Layer 2 devices. The unit is a frame.

1. Physical#

The actual transmission of bits as electrical signals, light pulses or radio waves – cables, connectors, voltages and frequencies.

Encapsulation: how data travels down the stack#

When you send data, each layer wraps it with its own header (and sometimes a trailer). The receiver unwraps it in reverse order – this is decapsulation.

Encapsulation: data becomes segment, packet, frame and bits as it moves down the OSI stack
LayerData unit (PDU)Address usedTypical device
Transport (4)Segment / DatagramPort numberFirewall (stateful)
Network (3)PacketIP addressRouter
Data Link (2)FrameMAC addressSwitch
Physical (1)Bits—Hub, repeater, cable

Why the OSI model is useful#

  • Troubleshooting – work bottom-up: is the cable connected (L1)? Does the device have a link and MAC (L2)? Can you ping the IP (L3)? Is the port open (L4)? Does the app respond (L7)?
  • Communication – "Layer 4 load balancer" instantly tells a teammate it routes on IP and port, not on URLs.
  • Design – layers can change independently. HTTP doesn't care whether it runs over Wi-Fi or fiber.
Note

The real internet runs on the simpler TCP/IP model. OSI is mainly a teaching and troubleshooting framework, but its layer numbers are used everywhere.

Key takeaways#

  • OSI has 7 layers: Physical, Data Link, Network, Transport, Session, Presentation, Application.
  • Each layer adds its own header during encapsulation: segment → packet → frame → bits.
  • Switches work at Layer 2 (MAC), routers at Layer 3 (IP).
  • Debug network issues bottom-up, one layer at a time.