IPv4 Fragmentation Numerical Example 9
Given a fragmented datagram with an offset of 120, how can you determine the first and last byte number?
Fragmentation Example (Offset = 120)
You’re given a fragmented datagram with an offset value of 120. The goal is to determine the first byte number and understand how to find the last byte number.
Start with the basic rule.
Fragment offset is measured in units of 8 bytes.
So the first byte is calculated by multiplying the offset by 8.
First byte = 120 × 8 = 960
That means this fragment starts at byte number 960 in the original datagram.
Now for the last byte.
You cannot directly calculate it from the offset alone.
To find the last byte, you need the data length of the fragment. Once you have that, you can use this formula:
Last byte = First byte + Data length - 1
But since the data length is not given, the exact last byte cannot be determined here.
So in this case, you only know where the fragment starts, not where it ends.
| Offset Value | Offset Unit | First Byte Number | Last Byte Known? | Reason |
|---|---|---|---|---|
| 120 | × 8 bytes | 960 | No | Fragment data length is not given |
If not specified, assume standard IPv4 header = 20 bytes.
Data length = Total Length - Header Length = 40 - 20 = 20 bytes
Now calculate the last byte
Last byte = First byte + Data length - 1 = 960 + 20 - 1 = 979
Final Answer
- First byte = 960
- Last byte = 979
| Offset | Total Length | Header Length | Data Length | First Byte | Last Byte |
|---|---|---|---|---|---|
| 120 | 40 | 20 | 20 | 960 | 979 |