# IPv4 header-length example 1

Subject: Computer Networks

Exam: TEE

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/packet-support/ihl-1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/packet-support--ihl-1/

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-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.

#### What this result means

IPv4 Total Length includes its own header. IPv6 Payload Length uses a different convention.
