Fragment Offset: Where the Pieces of a Packet Belong
A fragment offset tells a computer where a piece of a split network packet belongs. Its value isn't simply “piece one” or “piece two,” and reading it as a byte count can put the piece in the wrong place.
Internet Protocol, or IP, carries data in packets: units with delivery information and a payload, the data being carried. When a packet is split into smaller packets called fragments, the destination needs to put that payload back together.
The offset describes a position within that original packet's data, not a position within an entire downloaded file.
Why Big Packets Get Chopped Up
Why an offset of 185 means 1,480 bytes
In IPv4, one version of IP, the Fragment Offset field uses eight-byte units. A byte is a unit of digital data made of eight bits, each a 0 or 1.
Multiply the field's value by eight to find the starting byte position, counting from zero. The IPv4 specification defines this measurement relative to the original data, excluding the IP header—the packet's delivery and control information.
Here's a worked example: an IPv4 packet carries 3,000 bytes of data and has a 20-byte header. It must cross a link whose maximum transmission unit, or MTU, permits IP packets no larger than 1,500 bytes.
Assume fragmentation is permitted and each fragment has a 20-byte header, with no optional header fields. That leaves room for 1,480 data bytes per full-size fragment.
| Fragment | Data carried | Starting byte position | Offset field value |
|---|---|---|---|
| First | 1,480 bytes | 0 | 0 |
| Second | 1,480 bytes | 1,480 | 185 |
| Third | 40 bytes | 2,960 | 370 |
The arithmetic is simple: 185 × 8 = 1,480, and 370 × 8 = 2,960. The three data portions add up to the original 3,000 bytes; the repeated headers aren't part of that total.
Nonfinal fragments need data lengths divisible by eight so the next starting position can be expressed correctly. The last fragment can carry a remainder that isn't a multiple of eight.
Finding the right packet—and its end
An offset alone doesn't tell the receiver which packet a fragment belongs to. IPv4 also uses the identification value, source and destination addresses, and protocol field, which identifies the kind of data IP is carrying.
The More Fragments flag supplies another clue: 1 means more data follows this fragment, while 0 marks the end. In our example, the flags are 1, 1, and 0.
Fragments can arrive out of order, so receiving the final fragment doesn't mean every earlier piece has arrived. The receiver must still fill the gaps, as the IP reassembly description explains.
An ordinary, unfragmented IPv4 packet also has an offset of zero and a More Fragments flag of zero. Seeing a zero offset by itself doesn't prove you're looking at a fragmented packet.
- Keep work, guest and smart-home gear apart with up to 32 VLANs on one small switch.
- Copy any port's traffic to your laptop with port mirroring and see what is on the wire.
- Set it up from a web page instead of learning a command line.
A location field isn't a trust check
IPv6, the newer IP version, also uses eight-byte offset units, but places the field in a separate Fragment header. Its reassembly rules require abandoning a packet when its fragments overlap, with an allowance for recognizing and dropping exact duplicates.
An attacker can deliberately supply conflicting fragments, which is why overlap handling matters. A plausible offset tells a receiver where bytes belong; it doesn't prove those bytes are safe or came from someone trustworthy.
IP Fragmentation: When a Packet Is Too Big for the Route

Fragment Overlap Attacks: When Two Pieces Claim the Same Space

Tiny Fragment Attacks: When a Filter Is Missing Part of the Header

QUOTE:
"Amateurs hack systems, professionals hack people."
