What is IP Fragmentation in Networking?
Learn how IP fragmentation splits oversized packets, why reassembly only happens at the destination, and why IPv6 avoids it.
Expected Interview Answer
IP fragmentation is the process of splitting an IP packet larger than a link’s MTU into multiple smaller fragments, each carrying enough header information for the destination host to reassemble them back into the original packet.
When a router encounters a packet larger than the MTU of the outgoing link, and fragmentation is permitted, it splits the packet’s payload into pieces small enough to fit, giving each fragment the same identification number, a fragment offset indicating its position, and a more-fragments flag on all but the last piece. Only the final destination host reassembles the fragments, using the identification field and offsets to reconstruct the original packet in order; routers along the way do not reassemble. Fragmentation adds overhead and risk: losing even one fragment means the entire original packet must be retransmitted, since there is no way to recover a partial reassembly, which is why IPv6 removed in-path router fragmentation entirely and relies on Path MTU Discovery from the source instead. Firewalls also treat fragmented traffic with suspicion because fragment headers can be exploited to evade inspection.
- Lets oversized packets still traverse links with smaller MTUs
- Reassembly happens only at the final destination, not mid-path
- Losing one fragment forces retransmission of the whole packet
- IPv6 eliminates router-based fragmentation in favor of Path MTU Discovery
AI Mentor Explanation
Fragmentation is like a team’s kit bag being too large to fit through a narrow pavilion doorway, so the equipment manager splits it into several smaller bags, each labeled with the same team code and a sequence number. Someone must carry all the pieces to the dressing room and reassemble them in order before the kit is usable again. If even one labeled bag goes missing en route, the whole kit is unusable until it is resent, just as a lost fragment forces the entire packet to be retransmitted.
Step-by-Step Explanation
Step 1
Oversized packet detected
A router finds a packet larger than the outgoing link MTU and fragmentation is permitted.
Step 2
Split into fragments
The payload is divided into pieces, each tagged with the same identification number and an offset.
Step 3
Forward independently
Fragments travel as separate packets, possibly via different paths, toward the destination.
Step 4
Reassemble at destination
The destination host uses the ID and offsets to reorder and reassemble fragments into the original packet.
What Interviewer Expects
- Correct definition: splitting an oversized packet into smaller fragments
- Knows reassembly happens only at the destination host, not mid-path routers
- Understands that losing one fragment invalidates the whole packet
- Aware IPv6 removes router-based fragmentation in favor of Path MTU Discovery
Common Mistakes
- Thinking routers reassemble fragments mid-path
- Confusing fragmentation with TCP segmentation (different layers)
- Not knowing losing one fragment forces retransmission of the entire packet
- Assuming IPv6 fragments packets the same way IPv4 routers do
Best Answer (HR Friendly)
“IP fragmentation is what happens when a piece of data is too big to travel through part of the network in one go, so it gets split into smaller labeled pieces that only get put back together at the final destination. It works, but it is fragile — if even one piece goes missing, the whole thing has to be resent, which is why modern networks try hard to avoid needing it in the first place.”
Code Example
# Send an oversized ping that requires fragmentation
ping -s 3000 -c 2 example.com
# Capture and inspect fragment flags/offsets with tcpdump
sudo tcpdump -n -v icmp and host example.com
# Look for: (frag 1234:1480@0+) and (frag 1234:1032@1480)Follow-up Questions
- Why does IPv6 avoid router-based fragmentation?
- How does the fragment offset field enable correct reassembly?
- What is a fragmentation attack and why do firewalls scrutinize fragments?
- How is IP fragmentation different from TCP segmentation?
MCQ Practice
1. Where does IP fragment reassembly happen?
Only the destination host reassembles fragments; intermediate routers simply forward them.
2. What happens if one fragment of a packet is lost?
Reassembly requires every fragment; losing one means the whole packet is incomplete and must be resent.
3. How does IPv6 primarily avoid the need for router fragmentation?
IPv6 relies on the source performing Path MTU Discovery instead of letting routers fragment packets in transit.
Flash Cards
What is IP fragmentation? — Splitting an oversized packet into smaller fragments that fit a link’s MTU.
Where are fragments reassembled? — Only at the final destination host.
What happens if a fragment is lost? — The entire original packet must be retransmitted.
Does IPv6 fragment in routers? — No — IPv6 relies on source-side Path MTU Discovery instead.