Skip to content

The OSI Model

The OSI (Open Systems Interconnection) model is a 7-layer conceptual framework for how network communication happens. It's a mental model for troubleshooting and design, not something literally implemented layer-by-layer in every system — but it's the shared vocabulary for describing "where" a problem or a device operates.

Layer Name Purpose Examples / PDUs
7 Application Interface for user-facing network services HTTP, DNS, SMTP, SSH
6 Presentation Data formatting, encryption, compression TLS, JPEG, ASCII/Unicode
5 Session Establishes/manages/terminates sessions between hosts NetBIOS, RPC
4 Transport End-to-end delivery, reliability, flow control TCP, UDP (segments/datagrams)
3 Network Logical addressing and routing between networks IP, ICMP, routers (packets)
2 Data Link Node-to-node delivery on the same physical segment MAC addresses, switches, VLANs (frames)
1 Physical Raw bit transmission over physical media Cables, fiber, radio (bits)

Why it matters day-to-day

Most practical troubleshooting lives at Layers 1–4:

  • Layer 1 (Physical): Bad cable, dead port, no link light. show interfaces status on a Cisco switch is a Layer 1/2 check.
  • Layer 2 (Data Link): Switching, VLANs, MAC address tables, ARP, spanning tree. "Can these two devices talk without a router?" is a Layer 2 question.
  • Layer 3 (Network): IP addressing, subnetting, routing between VLANs/networks. "Can these two devices talk across a router?" is a Layer 3 question.
  • Layer 4 (Transport): Port numbers, TCP vs UDP, firewalls filtering by port.

A useful troubleshooting habit: work bottom-up. Confirm the cable/link (L1) before chasing a routing issue (L3) — a problem that looks like "the app is broken" (L7) is very often actually a dead switchport (L1).

Encapsulation

As data moves down the stack for transmission, each layer wraps the data from the layer above with its own header (and sometimes trailer):

Application data
  → Segment (Transport: adds TCP/UDP port info)
    → Packet (Network: adds source/destination IP)
      → Frame (Data Link: adds source/destination MAC)
        → Bits (Physical: electrical/optical/radio signal)

The receiving device reverses this process, stripping each header as it passes the data up the stack.