Networking · OSI Model · TCP/IP · Protocols

TCP/IP & OSI
Model Cheatsheet

A complete visual reference for the 7-layer OSI model and 4-layer TCP/IP model, including protocols at each layer, PDUs, and practical examples — with interactive quiz and slideshow.

OSI Layers: 7
TCP/IP Layers: 4
Level: Beginner → Advanced
Topics: 5 sections
Cisco Networking

What are OSI and TCP/IP?

The OSI (Open Systems Interconnection) model is a 7-layer conceptual framework that standardises how different network systems communicate. Created by ISO, it provides a universal language for describing network functions.

The TCP/IP model is the practical 4-layer implementation used by the internet. It combines several OSI layers and is the actual protocol suite your devices use every day.

Why it matters: Network engineers use these models to diagnose faults ("at which layer is the problem?"), security analysts use them to understand attack surfaces, and certifications like CompTIA Network+ and CCNA test knowledge of both.

1. OSI Model — 7 Layers

Mnemonic: Please Do Not Throw Sausage Pizza Away (Physical → Data Link → Network → Transport → Session → Presentation → Application)

Layer Name
Key Protocols
PDU / Unit
7
ApplicationUser-facing services
HTTP, HTTPS, FTP, SMTP, DNS, SSH, POP3, IMAP, SNMP
Data
6
PresentationData formatting & encryption
SSL/TLS, JPEG, MPEG, ASCII, Unicode, XDR
Data
5
SessionConnection management
NetBIOS, RPC, PPTP, SIP, NFS
Data
4
TransportEnd-to-end delivery
TCP, UDP, SCTP
Segment (TCP) / Datagram (UDP)
3
NetworkLogical addressing & routing
IP (IPv4/IPv6), ICMP, ARP, OSPF, BGP, RIP
Packet
2
Data LinkMAC addressing & framing
Ethernet, Wi-Fi (802.11), PPP, ARP, VLAN (802.1Q)
Frame
1
PhysicalBits over medium
Ethernet (cable), Wi-Fi (radio), Fibre, USB, Bluetooth
Bit

2. TCP/IP Model — 4 Layers

The TCP/IP model is what the internet actually uses. It maps to OSI but is simpler with 4 layers.

TCP/IP Layer
Application
HTTP, HTTPS, DNS, FTP, SSH, SMTP
Transport
TCP, UDP
Internet
IP, ICMP, ARP, BGP
Network Access
Ethernet, Wi-Fi, ARP
Maps to OSI Layers
Layers 5, 6, 7
Session + Presentation + Application
Layer 4
Transport
Layer 3
Network
Layers 1, 2
Physical + Data Link

3. TCP vs UDP

FeatureTCPUDP
ConnectionConnection-oriented (3-way handshake)Connectionless
ReliabilityGuaranteed delivery, retransmissionBest-effort, no guarantee
SpeedSlower due to overheadFaster, lower overhead
OrderingPackets delivered in orderNo ordering guarantee
Error CheckingYes — checksum + ACKChecksum only
Flow ControlYes (sliding window)No
Use CasesHTTP, SSH, FTP, email — anything requiring accuracyDNS, DHCP, VoIP, streaming, gaming
Header Size20–60 bytes8 bytes fixed

4. TCP 3-Way Handshake

Before TCP data transfer begins, both endpoints establish a connection using a three-step process.

Client                    Server

  ──── SYN (seq=x) ────────────►   Step 1: Client wants to connect
  ◄─── SYN-ACK (seq=y,ack=x+1) ─  Step 2: Server acknowledges
  ──── ACK (ack=y+1) ──────────►   Step 3: Client confirms

  [Connection Established — Data Exchange Begins]

  ──── FIN ────────────────────►   Step 4: Client requests close
  ◄─── FIN-ACK ────────────────    Step 5: Server acknowledges
  ◄─── FIN ────────────────────    Step 6: Server also closes
  ──── ACK ────────────────────►   Step 7: Client confirms

5. Protocol Summary by Layer

OSI LayerProtocolPurpose
7 — ApplicationHTTP/HTTPSWeb page transfer
7 — ApplicationDNSDomain name resolution
7 — ApplicationSMTP/POP3/IMAPEmail transfer
7 — ApplicationSSH/TelnetRemote administration
7 — ApplicationSNMPNetwork device monitoring
6 — PresentationSSL/TLSEncryption / decryption
6 — PresentationJPEG/PNG/MP4Media formatting
5 — SessionNetBIOS, RPCSession establishment
4 — TransportTCPReliable ordered delivery
4 — TransportUDPFast unreliable delivery
3 — NetworkIP (v4/v6)Logical addressing & routing
3 — NetworkICMPError messages (ping)
3 — NetworkOSPF / BGPRouting protocols
2 — Data LinkEthernet / 802.11MAC addressing & framing
2 — Data LinkARPIP-to-MAC resolution
1 — PhysicalEthernet cable / Wi-FiRaw bit transmission

📚 Further Reading