IPv4 Fragmentation with MTU 1500: Computing the Third Fragment’s Header Fields
When an IPv4 router forwards a datagram, it may need to fragment the packet if its size exceeds the outgoing link’s MTU.
For IPv4 fragmentation, three header fields determine how fragments are interpreted:
- Identification
- Flags
- Fragment Offset
We’re given:
- MTU = bytes
- Received IP packet size = bytes
- IP header length = bytes
So the original payload (data) size is:
Assume the router fragments such that each fragment’s total size fits within MTU, and all fragments except the last have payload lengths that are multiples of 8 bytes (a requirement enforced by the use of 8-byte fragment offset units).
IPv4 Fragmentation (MTU, MF flag, Fragment Offset) Tutorial
Step 1: Determine maximum payload per fragment for MTU 1500
Each fragment carries its own IPv4 header of 20 bytes, so the maximum data per fragment is:
However, the fragment offset counts in 8-byte units, so all non-final fragments should have data lengths that are multiples of 8. Since is divisible by 8:
Thus, the router will create fragments with:
- Fragment 1 data =
- Fragment 2 data =
- Fragment 3 data = remaining payload
Compute the fragment boundaries and third fragment header fields
- 1Step 1
Payload size is bytes because the header is and total is .
- 2Step 2
Max data per fragment is bytes.
- 3Step 3
After two full fragments, remaining data is bytes, so fragment 3 carries bytes.
- 4Step 4
Fragment 3 is the last fragment, so MF = 0 (no more fragments follow).
- 5Step 5
Fragment offset is in 8-byte units. Fragment 3 starts after fragment 1 and fragment 2 data: bytes. Therefore offset = .
- 6Step 6
Identification is copied unchanged from the original datagram into all fragments. DF is typically cleared by the router when it performs fragmentation.
Answer: Fields in the header of the third IP fragment
Let the original datagram’s Identification be (unknown from the problem statement). The router copies it into all fragments unchanged.
1) Flags
- DF: The router fragments, so DF must be 0 in the sent fragments.
- MF: Since this is fragment 3 (the last fragment), MF = 0.
So the flags bits are: MF = 0 and DF = 0 (with the reserved/other bit also 0 under standard usage).
2) Fragment Offset
Fragment 3 begins after bytes of data from the original payload:
So the fragment offset value is 370.
3) Total Length of third fragment (for completeness)
This isn’t explicitly requested in “relevant fields,” but is typically needed to sanity-check fragmentation:
- Third fragment payload = bytes
- Third fragment header = bytes And indeed .
4) Identification
Identification = original ID (copied unchanged into all fragments).
Key rule to remember
In IPv4, the fragment offset is measured in 8-byte blocks of the original payload, not including the IPv4 header.
Why your payload sizes must align
All fragments except the last must have data lengths that are multiples of 8 bytes; otherwise the offset values can’t represent their boundaries using 8-byte units.
Fragmentation decision flow in an IP router
Check MTU vs datagram size
1If the datagram’s total size exceeds outgoing MTU and DF is not set, fragmentation is permitted."
Choose per-fragment payload size
2Pick max data per fragment = MTU − header_len, then adjust to 8-byte alignment for non-final fragments."
Set header fields for each fragment
3Copy Identification; set DF/MF; compute Fragment Offset in 8-byte units."
Emit fragments
4Send fragments; receiver reassembles using Identification + offsets + MF/last-fragment behavior."
IPv4 fragmentation for payload 4384 bytes (MTU 1500, header 20 bytes)
Third fragment carries the remainder and therefore has MF = 0.
Quick mapping of computed values to header fields
IPv4 Fragmentation Mini-Deck
Knowledge Check
With MTU = 1500 and IPv4 header = 20 bytes, the maximum data size per fragment (before considering 8-byte alignment) is:
Explore Related Topics
Ethernet (IEEE 802.3) Header Formats and the Need for Padding
The Length of an IPv6 Address (IPv6 Addressing Fundamentals)
The checksum in IP must be recomputed at every router because of change in ____ fields. (i) TTL, Options, Identification Number, Offset (ii) TTL, Options, Data, Offset (iii) TTL, Options, Datagram Length, Offset (iv) TTL, Header Length, Offset, ToS