Computer Networks · M2 · read
IPv4 header-length example 2
IP packet details · supporting practice
Unit 4 support · header comparison; fragmentation is additional practice
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=6 and Total Length=1200 bytes. Find header and payload sizes. [3 practice marks]
Answer
Given
IHL=6; Total Length=1200 bytes.
To find
Header bytes and payload bytes.
Formula and why
H=4\,\mathrm{IHL},\qquad P=T-HIHL counts 32-bit words; each word is 4 bytes.
Step-by-step solution
Step 1. Convert IHL to bytes
H=4×6=24 bytes.
Step 2. Subtract the header
P=1200−24=1176 bytes.
Step 3. Add back the parts
24+1176=1200 bytes.
Final answer: Header=24 bytes; payload=1176 bytes.