Computer Networks · TEE · practice

IPv4 header-length example 3

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=8 and Total Length=800 bytes. Find header and payload sizes. [3 practice marks]

Answer

Given

IHL=8; Total Length=800 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×8=32 bytes.

Step 2. Subtract the header

P=800−32=768 bytes.

Step 3. Add back the parts

32+768=800 bytes.

Final answer: Header=32 bytes; payload=768 bytes.