Computer Networks

TCP/IP Model

Four layers the internet actually runs: application, transport, internet, network access.

Level: beginner

What is it?

The DoD / Internet model has four layers: Application (OSI 7–5), Transport (OSI 4), Internet (OSI 3), Network Access / Link (OSI 2–1). IP sits in the internet layer; TCP/UDP in transport; HTTP/DNS in application. This is what RFCs and kernels implement.

Why does it matter?

OSI is the vocabulary; TCP/IP is the running system. You need both: one to talk, one to read code and packet captures.

Mental model

The same sandwich, cut into four layers instead of seven. Presentation and session are eaten by the application.

How it works

  • Application: HTTP, DNS, SSH, TLS…
  • Transport: TCP, UDP, QUIC.
  • Internet: IP, ICMP, routing.
  • Link: Ethernet, Wi-Fi, ARP, PPP, the PHY.
  • Encapsulation: data → segment → packet → frame → bits. Same story as OSI.

Real-world usage

  • RFCs
  • Linux networking stack
  • Wireshark’s layering

Common mistakes

  • Treating the two models as competing religions
  • Forgetting that 'link' includes both MAC and PHY

Interview questions

Map OSI to TCP/IP.

7–5 → application, 4 → transport, 3 → internet, 2–1 → link/network access.

Which model does the internet run?

TCP/IP. OSI is the teaching and troubleshooting vocabulary.

TCP/IPOSIExamples
Application7 + 6 + 5HTTP, TLS, DNS, SMTP
Transport4TCP, UDP, QUIC
Internet3IP, ICMP, OSPF, BGP
Network access2 + 1Ethernet, Wi-Fi, optics

Prerequisites

Related concepts

Continue learning

Browse the full computer science library