Why a router ever splits a packet
Every outgoing link has an MTU (Maximum Transmission Unit): the largest frame it'll carry, commonly 1500 bytes on Ethernet. If a router receives an IPv4 packet bigger than the MTU of the link it needs to forward that packet out on, it has two options: drop the packet, or cut it into smaller pieces called fragments and send those separately. Each fragment gets its own full IP (Internet Protocol) header and travels independently, possibly by a different path, and only the final destination host reassembles them. Routers in between never reassemble anything.
It's like moving a wardrobe that won't fit through a doorway: the movers break it into numbered boxes, label where each box belongs in the finished piece, and mark only the very last box as "that's everything." Whoever unpacks it at the other end doesn't need the boxes to arrive in order, just enough labeling to know where each one goes and when the last one has shown up.
Flags: More Fragments and Don't Fragment
The IPv4 header's 3-bit Flags field (covered briefly in the IPv4 Header Structure topic) is where the fragmentation logic actually lives:
- Bit 0, reserved: always 0, unused.
- Bit 1, DF (Don't Fragment): when set, this packet must never be split. A router that can't forward it whole drops it instead of fragmenting it, and sends back an ICMP (Internet Control Message Protocol) Destination Unreachable, Fragmentation Needed message (type 3, code 4).
- Bit 2, MF (More Fragments): set to 1 on every fragment except the last one. The last fragment of a split packet clears it to 0. An ordinary, unfragmented packet also has MF=0, since as far as it's concerned there was never anything to split.
Fragment Offset: Telling first, middle, and last apart
The 13-bit Fragment Offset field says where in the original payload this particular fragment's data starts, measured in 8-byte units (so a fragment starting at byte 1480 of the original payload carries an offset value of 1480 / 8 = 185). That's what lets fragments be reassembled correctly even if they arrive out of order, since every fragment knows exactly where it belongs regardless of when it shows up.
Combine Offset with MF and every fragment's position becomes unambiguous:
| Position in the sequence | Fragment Offset | MF flag |
|---|---|---|
| Not fragmented at all | 0 | 0 |
| First fragment | 0 | 1 |
| Middle fragment(s) | > 0 | 1 |
| Last fragment | > 0 | 0 |
Offset 0 alone is ambiguous between "not fragmented" and "this is the first fragment," which is exactly why MF exists alongside it. Offset greater than zero combined with MF=0 is the only combination that unambiguously says "reassembly is complete after this one."
Most modern operating systems set DF on every outgoing packet by default, which means routers along a real path essentially never fragment anything, they just drop and report. Path MTU Discovery (PMTUD) turns that into a deliberate probing tool: a host sends packets with DF set, and if one hits a link with too small an MTU, the router's Fragmentation Needed reply reports that link's MTU back to the sender, which then resends at a smaller size. Repeat that until nothing gets rejected, and the sender has discovered the smallest MTU anywhere along the path, without a single packet ever actually being fragmented.
IPv6 removed router-based fragmentation completely. Every IPv6 link is required to support at least a 1280-byte MTU, and if a packet still doesn't fit, the router drops it and sends back an ICMPv6 Packet Too Big message instead of splitting anything, pushing every network onto PMTUD by default. Only the originating host is ever allowed to fragment an IPv6 packet, and only by adding its own Fragment extension header before sending. Everything on this page is IPv4-specific for that reason.