Computer Networks · Fragmentation
Fragmentation at Network Layer due to Data Link Layer MTU
Overview
Fragmentation is the procedure by which the network layer divides a datagram into parts so that each part fits inside the payload a data link layer frame can carry (for example, 1500 bytes).
It exists because a datagram larger than the data link layer's carrying capacity cannot be sent as one unit.
Key concepts
- Fragmentation: Performed at the network layer; the datagram is divided into parts such that each part fits within the size the data link layer frame can carry (e.g., 1500 bytes).
- Segmentation: Performed at the transport layer; it divides data so that application layer data can fit into the transport layer unit.
- Framing: Performed at the data link layer; it adds a header and tail to the datagram.
How it works
- The data link layer frame can carry only a limited amount, for example 1500 bytes.
- If the network layer datagram is larger than 1500 bytes, it cannot be sent as one unit.
- The network layer therefore divides the datagram into parts such that each part fits in the 1500 bytes available in the data link layer frame; this division procedure is called fragmentation.
- Segmentation at the transport layer is done so that application layer data can come and sit inside the transport layer unit.
- Fragmentation at the network layer is done so that each fragment can go in one data link layer frame — we cannot send more than what a data link layer can carry.
- In this scenario both segmentation (transport layer) and fragmentation (network layer) are performed.
Comparison
| Technique | Layer | Purpose |
|---|---|---|
| Segmentation | Transport layer | So that application layer data can fit into the transport layer unit |
| Fragmentation | Network layer | So that the datagram can fit into one data link layer frame (cannot send more than the data link layer can carry) |
| Framing | Data link layer | Adding header and tail to the (already fragmented) datagram |
Revision summary
- Fragmentation happens at the network layer; segmentation at the transport layer; framing at the data link layer.
- Fragmentation is triggered when the datagram size exceeds what the data link layer frame can carry (e.g., 1500 bytes).
- Each fragment must be small enough to fit within the data link layer's carrying capacity.
- We cannot send more data than the data link layer can carry — this is the fundamental reason fragmentation exists.
- Both segmentation and fragmentation can occur in the same scenario, at different layers.
Previous-year exam insights
- Fragment payload size must be a multiple of 8 bytes (except the last fragment), because the fragment offset field counts in units of 8 bytes;
offset = (starting byte position of the fragment's payload) / 8.
Asked inGATE 2018GATE 2015GATE 2014GATE 2013 - Every fragment carries a copy of the original IP header (same identification value);
MF (More Fragments) = 1 for all fragments except the last, and the last fragment has MF = 0.
Asked inGATE 2025GATE 2024GATE 2014GATE 2013 - Fragmentation can occur at the source host or at any intermediate router whose outgoing link MTU is smaller than the arriving datagram; reassembly is done only at the final destination, not at intermediate routers.
Asked inGATE 2024GATE 2020 - If a datagram with DF (Don't Fragment) = 1 meets a link with smaller MTU, the router discards it and returns an ICMP 'Fragmentation Needed' (Destination Unreachable, type 3 code 4) error to the source.
Asked inGATE 2021 - When a datagram is fragmented again at a later router, the offset of each new fragment equals the original byte position divided by 8 (offsets are cumulative from the original datagram, not from the previous fragment).
Asked inGATE 2025GATE 2024 - Total length field gives the size of that fragment including its IP header;
the number of fragments = ceil((total datagram size - IP header) / (MTU - IP header)) when the payload per fragment is not constrained by the 8-byte rule, and the last fragment's size = remaining payload + IP header.
Asked inGATE 2025GATE 2016GATE 2004