IPv4 Fragmentation Numerical Example 3
A host needs to transmit a 9000-byte IPv4 datagram, including a 20-byte header, across a link with MTU = 2500 bytes. The DF (Don't Fragment) bit is not set, and the fragment offset is in units of 8 bytes.
Step 1: Determine Payload Per Fragment
Each fragment must include a 20-byte header, so the maximum data payload per fragment is:
MTU - IP header = 2500 - 20 = 2480 bytes
The total payload in the datagram is:
9000 - 20 = 8980 bytes
Step 2: Calculate Number of Fragments
Divide total payload by payload per fragment:
8980 ÷ 2480 ≈ 3.62
-
3 full fragments of 2480 bytes
-
1 last fragment carries 8980 - (2480 × 3) = 1540 bytes
So, total fragments = 4.
Step 3: Calculate Fragment Offsets
Offsets are measured in units of 8 bytes:
|
Fragment |
Start Byte |
Offset (/8) |
|
1 |
0 |
0 |
|
2 |
2480 |
310 |
|
3 |
4960 |
620 |
|
4 |
7440 |
930 |
Step 4: Set MF (More Fragments) Flag
-
MF = 1 for all fragments except the last one.
-
MF = 0 for the last fragment.
Step 5: Total Length for Each Fragment
Add 20-byte header to each fragment payload:
|
Fragment |
Data Bytes |
MF Flag |
Total Length |
|
1 |
2480 |
1 |
2500 |
|
2 |
2480 |
1 |
2500 |
|
3 |
2480 |
1 |
2500 |
|
4 |
1540 |
0 |
1560 |
Combined
| Fragment | Data Bytes | Offset (Bytes) | Offset (/8) | MF Flag | Total Length |
|---|---|---|---|---|---|
| 1st Fragment | 2480 | 0 | 0 | 1 | 2500 |
| 2nd Fragment | 2480 | 2480 | 310 | 1 | 2500 |
| 3rd Fragment | 2480 | 4960 | 620 | 1 | 2500 |
| 4th Fragment | 1540 | 7440 | 930 | 0 | 1560 |