IPv4 Datagram Fragmentation and Reassembly
What fragmentation really means
When you send data across a network, it doesn’t always travel as one big piece. Each network link has a size limit called MTU, Maximum Transmission Unit. For example, Ethernet commonly uses 1500 bytes. If your packet is bigger than that, the network has to break it into smaller pieces so it can pass through.

That’s where fragmentation comes in. In IPv4, routers handle this. When a packet hits a link with a smaller MTU, the router splits it into fragments. Each fragment travels separately, and the destination puts them back together.
Fragment structure at a glance
Here’s a simple way to picture how a packet gets split
| Fragment | Bytes (Data Size) | Identification (ID) | Offset | Flag (MF) |
|---|---|---|---|---|
| 1 | 1480 | 12345 | 0 | 1 |
| 2 | 1480 | 12345 | 185 | 1 |
| 3 | Remaining | 12345 | 370 | 0 |
This table tells a story. One original packet gets divided into smaller chunks. Each piece carries enough information so the receiver can rebuild the original data correctly.
Breaking down the fields
Start with the Identification field. Every fragment from the same original packet carries the same ID. This is how the receiver knows which fragments belong together. Without this, reassembly would be messy and unreliable.
Now look at the Offset. This tells the receiver where each fragment fits in the original packet. It’s not counted in bytes directly but in units of 8 bytes. So if the offset is 185, that means this fragment starts at byte 1480 in the original data. You can think of it like page numbers in a book. It tells you where each piece belongs.
The Flags field controls fragmentation behavior. There are two important ones here. DF means Don’t Fragment. If this is set to 1, routers are not allowed to split the packet. If the packet is too large, it gets dropped instead. MF means More Fragments. If MF is 1, it tells the receiver that more fragments are coming. If MF is 0, it means this is the last fragment.
How fragmentation actually happens
Imagine you send a packet of 4000 bytes. It reaches a router where the MTU is 1500 bytes. The router can’t send it as one piece. So it splits the packet into smaller fragments, each fitting within the MTU.

Each fragment gets its own header. The ID stays the same. The offset changes for each fragment. The MF flag is set to 1 for all fragments except the last one.
This process repeats if the packet crosses multiple networks with different MTUs. That’s why fragmentation can happen more than once along the path.
Reassembly at the destination
The destination host collects all fragments and rebuilds the original packet. It uses the Identification field to group fragments, the Offset to place them in the correct order, and the MF flag to know when all pieces have arrived.
If even one fragment is missing, the whole packet is usually discarded. That’s the tradeoff. Fragmentation allows data to pass through different networks, but it also increases the chance of packet loss.
A small detail that matters
IPv4 allows routers to fragment packets. IPv6 doesn’t. In IPv6, the sender must handle fragmentation before sending the packet. This reduces the load on routers and makes the network more efficient.
Why this matters in real networks
Fragmentation sounds simple, but it affects performance. More fragments mean more headers, more processing, and higher chances of loss. That’s why modern networks try to avoid fragmentation using techniques like Path MTU Discovery.
At the end of the day, fragmentation is just a workaround. It keeps data moving even when networks have different limits. And without it, many packets would never reach their destination.