Pebellslearn by building
0%
RoadmapsMatrixCoursesSandboxSign in
The OSI and TCP/IP Models  ›  Capstone Project

The TCP/IP Model and Encapsulation

Internet 16 minThe TCP/IP model uses four layers, and each layer wraps the data from the layer above in its own header on the way down and removes it on the way up.

The TCP/IP Model and Encapsulation

The OSI model is the classroom map; the TCP/IP model is the one the internet was actually built on. Kite Studio's router manual, Linux networking commands and most vendor docs speak in TCP/IP terms, so you need to translate between the two fluently — and to see how every layer wraps the one above it.

The rule

Four layers, each wrapping the one above: headers on the way down, off on the way up.

TCP/IP layer Matches OSI What lives there
Application 7, 6, 5 HTTP, DNS, SMTP, SSH, TLS
Transport 4 TCP, UDP, port numbers
Internet 3 IP, ICMP, routers
Network Access (also called Link) 2, 1 Ethernet, Wi-Fi, MAC addresses, cables and radio

Some books split Network Access into separate Data Link and Physical layers and call it a five-layer model; the idea is the same.

Encapsulation is how the layers cooperate. On the sending side, each layer takes what the layer above handed it, treats it as an opaque payload, and adds its own header in front:

  1. Application: the HTTP request itself — the data.
  2. Transport: adds a TCP header with source and destination ports → a segment.
  3. Internet: adds an IP header with source and destination IP → a packet.
  4. Network Access: adds an Ethernet header with MACs and a trailer with a checksum → a frame, sent as bits.

The receiver does the reverse — decapsulation — each layer reading and removing only its own header, then passing the rest up. No layer needs to understand the others' headers.

The shortcut

Picture nested envelopes, and remember the order from the inside out: Data → Segment → Packet → Frame. For any header field, ask "which envelope is it written on?": ports on the segment, IPs on the packet, MACs on the frame.

Asha's request to the `files` dashboard, wrappedStep 1 of 5
  1. Application

    Browser builds GET /status for the dashboard at 192.168.10.20.

The trap is thinking a router opens every envelope. A router works at the Internet layer: it swaps the frame and reads the IP header, but leaves the segment and the data inside untouched (address translation, coming in the IP Addressing section, is the one exception).

Drills

Answer fast — trust the rule.

quick drill

Which TCP/IP layer covers OSI layers 5, 6 and 7?

quick drill

Where do MAC addresses live in the TCP/IP model?

quick drill

What is the correct order of units from the inside out?

quick drill

A router forwards Asha's packet to the internet. Which header does it read to decide the next hop?

Remember

  • Four layers — Application, Transport, Internet, Network Access — each wrapping the one above.
  • Data → Segment → Packet → Frame: ports, then IPs, then MACs.
  • Each device opens only as many envelopes as its job needs; a router stops at the IP header.

Practice — level up

0/1 solved

Write your answer, then compare it with a rubric and a model answer.

ExplainWrap and unwrap

Asha sends a request to the files dashboard at 192.168.10.20 on port 443. Explain how it is encapsulated through the four TCP/IP layers, naming the unit and the addresses added at each, and map each layer to OSI.