Computer Networks · TEE · practice

IPv4 header-length example 1

IP packet details · supporting practice · optional practice

Optional extension · no matching calculation in the two supplied papers

Optional worked extension. This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.

Practice question. An IPv4 packet has IHL=5 and Total Length=1000 bytes. Find header and payload sizes. [3 practice marks]

Answer

Given

IHL=5; Total Length=1000 bytes.

To find

Header bytes and payload bytes.

Formula and why

H=4\,\mathrm{IHL},\qquad P=T-HLaTeX: H=4\,\mathrm{IHL},\qquad P=T-H

IHL counts 32-bit words; each word is 4 bytes.

Step-by-step solution

Step 1. Convert IHL to bytes

H=4×5=20 bytes.

Step 2. Subtract the header

P=1000−20=980 bytes.

Step 3. Add back the parts

20+980=1000 bytes.

Final answer: Header=20 bytes; payload=980 bytes.