The parent note TCP/IP Model gave you the map: 4 layers , the merge pattern 3 → 1 → 1 → 2 , and the data-unit chain. This page does the drills . But first we lay out a scenario matrix : a grid of every KIND of question this topic can ask. Then we solve examples that together touch every single cell — so when the exam throws one at you, you've already met its twin.
WHY a matrix first? Because "practice problems" chosen at random leave gaps. A matrix is a checklist: if every cell has a worked example pointing at it, you literally cannot be surprised.
Think of every question about the TCP/IP model as belonging to one of these cells . Read the table like a map of the territory — each row is a type of question, each with a trap.
Cell
Question type
The trap / degenerate case
Covered by
A
"How many layers?" (count)
The 5-layer hybrid decoy
Ex 1
B
OSI → TCP/IP mapping (merge zone)
Top-3 squish (App/Pres/Session)
Ex 2
C
OSI → TCP/IP mapping (1-to-1 zone)
Transport & Network do NOT merge
Ex 3
D
OSI → TCP/IP mapping (bottom squish)
Data Link + Physical → one layer
Ex 4
E
"Which layer handles X?" (feature → layer)
Ports vs IP vs MAC confusion
Ex 5
F
Data-unit naming (segment/packet/frame)
"TCP sends packets" error
Ex 6
G
Full encapsulation trace (down the stack)
Header order & payload nesting
Ex 7
H
Decapsulation trace (up the stack)
Reverse order at receiver
Ex 8
I
Real-world word problem (letter/email)
Mapping story → layers
Ex 9
J
Exam twist / edge case
Ambiguous wording, "no qualifier"
Ex 10
Recall The two patterns you'll reuse in every cell
Merge pattern top→bottom ::: 3 → 1 → 1 → 2
Data-unit chain down the stack ::: Message → Segment → Packet → Frame → Bits
Below, each example is tagged with [Cell X] so you can see the grid fill up.
Worked example Example 1 — "A router vendor's manual says 'the 5-layer TCP/IP stack'. How many layers does the
classic TCP/IP model have?"
Forecast: Guess the number before reading on. Did the word "5" tempt you?
Step 1. Recall the classic definition: Application, Transport, Internet, Network Access.
Why this step? The question asks for the original/classic model, which is the default when no qualifier is given.
Step 2. Count them: 4 .
Why this step? The "5-layer" version is a teaching hybrid that splits Network Access into Data Link + Physical — it is not the original model.
Answer: 4 layers.
Verify: List them out loud — All The Internet Needs = A, T, I, N = 4 names, no repeats. ✅ Units check: it's a pure count, dimensionless.
Worked example Example 2 — "OSI layers 5, 6, 7 (Session, Presentation, Application) collapse into which single TCP/IP layer?"
Forecast: Which single word covers all three?
Step 1. Read the merge pattern: the top 3 OSI layers fold into 1 TCP/IP layer.
Why this step? The pattern's leading digit is 3 → those three OSI boxes become one.
Step 2. That one layer is the Application layer.
Why this step? In practice the app itself handles session setup and data formatting (presentation), so no separate boxes are shipped.
Answer: TCP/IP Application layer.
Verify: Count the merged OSI layers = 3, and the pattern says the top merge is 3 → 1 . 3 = 3 . ✅
Look at the blueprint above: the three cyan OSI boxes on the left (Session, Presentation, Application) all point with amber arrows into the one Application box on the right. That single-to-many fan-in is the number "3" in "3-1-1-2".
Worked example Example 3 — "OSI Transport and OSI Network — do they merge in TCP/IP, and into what?"
Forecast: It's tempting to merge everything . Resist — guess first.
Step 1. Read the middle two digits of the pattern: 1 → 1 and 1 → 1 .
Why this step? The pattern is 3-1-1 -2. The two middle "1"s mean each of these OSI layers maps to exactly one TCP/IP layer, alone.
Step 2. OSI Transport → TCP/IP Transport (same name).
OSI Network → TCP/IP Internet (renamed, not merged).
Why this step? These are the only two one-to-one mappings; over-applying "merge" here is the classic error.
Answer: No merge. Transport→Transport, Network→Internet. Two separate TCP/IP layers.
Verify: Pattern sum check: 3 + 1 + 1 + 2 = 7 = number of OSI layers. If Transport & Network had merged, we'd have counted them as one and the sum would be wrong. 7 = 7 . ✅
Worked example Example 4 — "OSI Data Link + Physical become which TCP/IP layer, and what is its data unit as it leaves?"
Forecast: Name the layer AND the two data units it produces.
Step 1. Trailing digit of the pattern is 2 : the bottom 2 OSI layers merge into 1 .
Why this step? Data Link (framing, MAC) and Physical (bits on the wire) are one practical job: "get bits onto the medium."
Step 2. That merged layer is Network Access .
Step 3. Its data unit is the frame , which is finally transmitted as bits .
Why this step? Framing packages the packet; the physical sublayer then sends raw bits.
Answer: Network Access layer; data unit = frame → bits .
Verify: Bottom merge digit = 2, and we merged exactly {Data Link, Physical} = 2 layers. 2 = 2 . ✅
Worked example Example 5 — "Sort these three addresses to their TCP/IP layer: port 443, IP 192.168.1.5, MAC aa:bb:cc:dd:ee:ff."
Forecast: Three addresses, three different layers. Which is which?
Step 1. Port numbers identify the application/service on a host → Transport layer.
Why this step? Ports demultiplex to the right program (see Port Numbers and Sockets ).
Step 2. IP addresses locate a host across networks → Internet layer.
Why this step? IP is about addressing + routing between networks (see IP Addressing and Routing ).
Step 3. MAC addresses locate a device on the local link → Network Access layer.
Why this step? MAC + framing get bits to the next physical hop (see Ethernet and MAC Addresses ).
Answer: port 443 → Transport; IP → Internet; MAC → Network Access.
Verify: These are three distinct layers out of four, and none is Application — consistent with "addressing" being a lower-layer job. Each address type maps to exactly one layer, no overlaps. ✅
Worked example Example 6 — "True or false: 'TCP sends packets.' If false, correct it, and name the unit at each of the four layers."
Forecast: Is it true? What's the precise word for a TCP unit?
Step 1. Recall the chain: Message → Segment → Packet → Frame → Bits.
Why this step? Each layer names its own unit; "packet" is reserved for the Internet layer.
Step 2. TCP lives at the Transport layer → its unit is a segment , not a packet.
Why this step? Packets belong to IP (Internet layer). Saying "TCP packet" is imprecise and exam-punishable.
Step 3. Full list: Application = message/data , Transport = segment (TCP) / datagram (UDP), Internet = packet , Network Access = frame .
Answer: False. TCP sends segments . IP sends packets.
Verify: Four layers → four distinct unit names (message, segment, packet, frame). Count = 4 = number of layers. ✅
Worked example Example 7 — "Trace a 100-byte HTTPS message down the stack. If Transport adds 20 B, Internet adds 20 B, and Network Access adds 18 B of header+trailer, how big is the final frame's payload journey (bytes on the wire)?"
Forecast: Guess the total before adding.
Step 1. App creates the message: 100 B. Why? Application speaks HTTPS (see HTTP and the Application Layer ).
Step 2. Transport wraps it into a segment: 100 + 20 = 120 B. Why? Adds a header with port 443 for reliable delivery to the right service.
Step 3. Internet wraps the segment into a packet: 120 + 20 = 140 B. Why? Adds source/dest IP to route across networks.
Step 4. Network Access wraps the packet into a frame: 140 + 18 = 158 B. Why? Adds MAC header + trailer to reach the next hop; then this frame is sent as bits.
Answer: 158 bytes on the wire.
Verify (arithmetic): 100 + 20 + 20 + 18 = 158 . ✅ Verify (concept): each lower layer treats everything above it as opaque payload — the 100 B message never changes, only new headers stack around it. This is Encapsulation and Decapsulation . ✅
The nested-boxes figure shows why the number only grows: the amber message core stays 100 B; each cyan wrapper adds its own header. The wire sees the outermost box.
Worked example Example 8 — "That 158-byte frame arrives at the server. In what order are headers stripped, and what size is the message the app finally reads?"
Forecast: Is the strip order the same as the wrap order, or reversed?
Step 1. Network Access strips its 18 B frame header+trailer: 158 − 18 = 140 B (a packet).
Why this step? The receiver undoes the last thing that was added first — like unwrapping a parcel outside-in.
Step 2. Internet strips its 20 B IP header: 140 − 20 = 120 B (a segment).
Why? IP checks the destination address was us, then hands the segment up.
Step 3. Transport strips its 20 B header: 120 − 20 = 100 B (a message), using the port to pick the right app.
Why? Demultiplex to the correct program via port 443.
Step 4. Application reads the 100 B HTTPS message.
Answer: Reverse order (Net Access → Internet → Transport → App); final message = 100 B — exactly what the sender's app created.
Verify: 158 − 18 − 20 − 20 = 100 , matching the original message from Example 7. Encapsulation and decapsulation are inverses. ✅
Worked example Example 9 — "You post a physical letter. Match each real-world step to a TCP/IP layer: (a) write the note, (b) address it to 'Ravi', (c) write the street + city, (d) a truck drives it on roads."
Forecast: Map each step to A/T/I/N before reading.
Step 1. (a) Writing the note = creating a message → Application layer.
Why? The meaningful content is the app's job.
Step 2. (b) "To Ravi" = deliver to the right person = ports pick the right program → Transport layer.
Why? Ports are the "which recipient/program" address.
Step 3. (c) Street + city = routing across the postal network = IP addressing → Internet layer.
Why? This is host-to-host routing across networks.
Step 4. (d) The truck on roads = physically moving bits over the medium → Network Access layer.
Why? Getting the parcel onto the actual road = getting bits onto copper/fiber/radio.
Answer: a→Application, b→Transport, c→Internet, d→Network Access.
Verify: Four story steps mapped to four distinct layers, top-to-bottom order preserved (write first, drive last). No layer used twice. ✅
Worked example Example 10 — "Exam Q: 'The TCP/IP model has ___ layers and its lowest layer maps to OSI layers ___ and ___.' Fill the blanks. A distractor option says '5 layers'."
Forecast: Three blanks. Which numbers?
Step 1. No qualifier is given ("TCP/IP model"), so use the classic model → 4 layers.
Why this step? Default = original 4-layer model; the "5" is the hybrid decoy from Cell A.
Step 2. The lowest TCP/IP layer is Network Access .
Step 3. By the trailing "2" of the 3-1-1-2 pattern, it maps to OSI Data Link and Physical .
Why this step? Bottom two OSI layers merge into Network Access.
Answer: "4 layers; Data Link and Physical."
Verify: Cross-check with the pattern sum 3 + 1 + 1 + 2 = 7 (all OSI layers accounted for) and the merge digit for the bottom = 2 = {Data Link, Physical}. ✅
Recall Did every cell get an example?
Cells A–J covered by which examples? ::: A→Ex1, B→Ex2, C→Ex3, D→Ex4, E→Ex5, F→Ex6, G→Ex7, H→Ex8, I→Ex9, J→Ex10 — all 10 cells filled.
Common mistake "Decapsulation happens in the same order as encapsulation."
Why it feels right: You did the steps 1-2-3-4 going down, so surely you undo them 1-2-3-4?
The fix: Decapsulation is the reverse order (Ex 8). Outermost header (Network Access) comes off first — like unwrapping a parcel from the outside in.
For sizing problems: "headers only add, then subtract back to the core." The message payload is invariant; encapsulation and decapsulation are exact inverses, so the app always reads the original bytes.
Parent: TCP/IP Model (Hinglish)
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