OSI Model Cheat Sheet

OSI 7-layer model explained — protocols at each layer, data encapsulation, and how the model maps to real-world TCP/IP networking.

Last Updated: July 15, 2025

The 7 Layers

#LayerPDUKey ProtocolsDevices
7ApplicationDataHTTP, DNS, SMTP, FTP, SSHLoad balancer (L7)
6PresentationDataTLS/SSL, ASCII, JPEG, gzip
5SessionDataNetBIOS, RPC, SOCKS
4TransportSegmentTCP, UDP, QUICFirewall (L4)
3NetworkPacketIP, ICMP, IPSec, OSPFRouter
2Data LinkFrameEthernet, ARP, VLAN (802.1Q)Switch, Bridge
1PhysicalBitEthernet (cable), Wi-Fi, fiberHub, Repeater

Encapsulation Flow

L7 → L4: Segment
Application data + TCP/UDP header (port numbers)
L4 → L3: Packet
Segment + IP header (source/dest IP)
L3 → L2: Frame
Packet + Ethernet header (MAC addresses) + FCS trailer
L2 → L1: Bits
Frame encoded as electrical/optical/radio signal
Receiving: Reverse
L1 bits → L2 frame → L3 packet → L4 segment → L7 data

TCP/IP vs OSI

TCP/IP LayerOSI LayersExamples
Application7 + 6 + 5HTTP, DNS, TLS, JPEG
Transport4TCP, UDP, QUIC
Internet3IPv4, IPv6, ICMP, ARP
Network Access2 + 1Ethernet, Wi-Fi, fiber

Troubleshooting by Layer

LayerProblemTool
1 — PhysicalCable unplugged, signal lossCable tester, link lights
2 — Data LinkMAC misconfig, VLAN wrongarp -a, switch MAC table
3 — NetworkWrong IP, routing loopping, traceroute
4 — TransportPort blocked, TCP resetnc -vz host port, tcpdump
7 — ApplicationDNS failure, TLS certdig, curl -v, openssl
Pro Tip: The OSI model is a teaching tool, not a blueprint. Real networks use TCP/IP (4 layers). Map OSI Layer 3-4 to TCP/IP Internet/Transport — that's where 90% of troubleshooting lives.
Part of the Empire Builder Network