4.3.2 · D1Computer Networks

Foundations — TCP - IP model — 4 layers, mapping to OSI

2,006 words9 min readBack to topic

Before you can read the parent note, you need to actually understand every word it throws at you. Below, each term is built from nothing: what it means in plain words → the picture it corresponds to → why the topic needs it. We go in order, so each idea rests on the one before it.


1. What is a "network" and a "host"?

The picture: dots (hosts) joined by lines (the connections). Data is a little parcel that hops from one dot to another.

Why the topic needs it: the entire TCP/IP model exists to answer "how does a parcel get from host A to host B?" If you don't know what a host is, none of the layers have a purpose.

Figure — TCP - IP model — 4 layers, mapping to OSI

2. What is "data" here — bits, bytes, messages?

The picture: at the bottom, a river of s and s flowing down a wire. At the top, a human-readable sentence. Same information, two views.

Why the topic needs it: the whole model is a translation machine. The top layer speaks in messages; the bottom layer speaks in bits. Every layer in between is a step of that translation.


3. A "protocol" — the shared rulebook

Why the topic needs it: each layer is defined by the protocols it speaks. Saying "the Transport layer uses TCP or UDP" only makes sense once you know a protocol is a rulebook.


4. "Header", "payload", "trailer"

The picture: a box. The payload is the gift inside; the header is the shipping label on the front; the trailer is a tamper-seal on the back.

Figure — TCP - IP model — 4 layers, mapping to OSI

Why the topic needs it: the parent's headline idea — encapsulation — is literally "each layer adds its own header." You can't understand encapsulation without knowing what a header is.


5. "Encapsulation" and "decapsulation"

Why the topic needs it: this is the mechanism that makes layering work. It's why the parent says a message becomes a segment becomes a packet becomes a frame. See Encapsulation and Decapsulation.


6. "Data unit" names: message, segment, packet, frame

The picture: the same nested-box image, but each layer of box has a different label written on it. Same contents, different name per layer.

Why the topic needs it: exam questions love asking "TCP sends ___?" (answer: segments, not packets). The names are the whole point of one of the parent's Common Mistakes.


7. "Address" — MAC, IP, and port

These are three different kinds of address, each answering a different question. This is the single most confused trio in the topic, so slow down here.

The picture: an envelope. The street address = IP. The apartment/person name = port. The fingerprint of the specific mailbox the truck physically drops it in on this street = MAC.

Figure — TCP - IP model — 4 layers, mapping to OSI

Why the topic needs it: each of the three addresses lives at a specific layer — port → Transport, IP → Internet, MAC → Network Access. Knowing which address = which layer is half the exam.


8. "Routing" and "hop"

The picture: your parcel doesn't teleport to the server. It's handed device-to-device, each hop a short arrow, forming a path across the map.

Why the topic needs it: routing is the whole job of the Internet layer. "IP addressing + routing" in the parent only makes sense once "hop" is a picture in your head. Details in IP Addressing and Routing.


9. "Connection-oriented" vs "connectionless"

Why the topic needs it: these two words define the difference between TCP and UDP, both Transport-layer protocols. See TCP vs UDP and Port Numbers and Sockets.


10. "Layer" and "stack" — tying it all together

Why the topic needs it: "TCP/IP has 4 layers, OSI has 7" is the headline. Everything above was preparation to make that sentence mean something. See OSI Model — 7 Layers and HTTP and the Application Layer for the top of the stack.


How these foundations feed the topic

Bits and messages

Protocol = shared rulebook

Host and network

Addresses MAC IP port

Header payload trailer

Encapsulation

Routing and hops

Data units segment packet frame

Connection oriented vs connectionless

Layer and stack

TCP-IP model 4 layers mapping to OSI


Equipment checklist

Test yourself — you're ready for the parent note only if each of these is instant:

What is a host?
A single machine that can send or receive data on a network.
What is a bit?
The smallest unit of information: a single 0 or 1; wires can only carry bits.
What is a protocol?
An agreed rulebook/language for how two machines talk.
What is a header?
A small control block a layer adds in front of its payload (like an envelope label).
What is a payload?
The actual data handed down from the layer above, treated as opaque.
What is encapsulation?
Each layer wrapping the data from above in its own header as it goes down the stack.
What is decapsulation?
Each layer peeling off its own header as data goes up the stack at the receiver.
Name the four data units top to bottom.
Message → Segment → Packet → Frame (→ bits).
What does a port number identify?
Which program/service on a host (Transport layer).
What does an IP address identify?
Which host globally, for routing across networks (Internet layer).
What does a MAC address identify?
A specific physical device on the local link (Network Access layer).
What is a hop?
One step from one device to the next along the path.
What is routing?
Choosing the next hop that moves data closer to its destination.
Connection-oriented vs connectionless?
TCP: handshake + reliable ordered delivery. UDP: no setup, fast, no guarantees.
What is a layer, and why stack them?
A self-contained job in communication; stacking gives separation of concerns so each part is swappable.

Connections

  • Parent: TCP/IP Model — 4 Layers, mapping to OSI
  • OSI Model — 7 Layers
  • TCP vs UDP
  • IP Addressing and Routing
  • Encapsulation and Decapsulation
  • Port Numbers and Sockets
  • Ethernet and MAC Addresses
  • HTTP and the Application Layer