- Asked 2/10
- 2073 Magh · 10 marks
- 2071 Bhadra · 10 marks
IPv4 vs IPv6 datagram fragmentation
Short answer
IPv4 allows routers or source to fragment, using header fields: Identification, MF flag, Offset; reassembly at destination. IPv6 fragmentation is only by source, using a Fragment extension header after Path MTU Discovery; routers send ICMPv6 Packet Too Big if needed. IPv6 minimum MTU is 1280 bytes.
Compare the IP datagram fragmentation process in IPv4 and IPv6 with an example.
Why fragmentation is needed
Every link has a Maximum Transmission Unit (MTU), the largest packet it can carry (Ethernet: 1500 bytes). If a datagram is larger than the MTU of the link, it must be split into smaller pieces, called fragments, and reassembled at the destination.
Fragmentation in IPv4
- Who fragments: the source host or any router on the path whose outgoing link has a smaller MTU.
- Header fields used: Identification (16 bits, same for all fragments of one datagram), Flags (DF = don't fragment, MF = more fragments) and Fragment Offset (13 bits, position of the data in units of 8 bytes). Each fragment gets its own IP header (20 bytes) and its own checksum.
- Reassembly: done only at the destination host, using identification, offset and the MF bit. If one fragment is lost, the whole datagram is discarded after a timeout.
- If DF = 1 and the packet is too big, the router drops it and sends ICMP "Fragmentation needed" (used by Path MTU Discovery).
Example: a 4000-byte datagram (20-byte header + 3980 data), identification 777, goes onto a link with MTU 1500. Data per fragment = 1500 - 20 = 1480 bytes (a multiple of 8).
| Fragment | Total length | Data | MF | Offset (units of 8 B) |
|---|---|---|---|---|
| 1 | 1500 | 1480 | 1 | 0 |
| 2 | 1500 | 1480 | 1 | 185 |
| 3 | 1040 | 1020 | 0 | 370 |
Check: 1480 + 1480 + 1020 = 3980 data bytes; offsets 1480/8 = 185 and 2960/8 = 370.
Fragmentation in IPv6
- Who fragments: only the source host. Routers never fragment IPv6 packets. If a packet is too large for a link, the router drops it and returns an ICMPv6 "Packet Too Big" message that contains the MTU. The source uses Path MTU Discovery (strongly recommended by RFC 8200) to find the smallest MTU on the path; a source that does not use it must send packets no larger than 1280 bytes, the minimum link MTU.
- Header used: the Fragment extension header (Next Header = 44, 8 bytes) containing Next Header, Fragment Offset (13 bits, units of 8 bytes), M flag (more fragments) and a 32-bit Identification. The base IPv6 header has no fragmentation fields.
- The packet is divided into an unfragmentable part (base header + hop-by-hop / routing headers) that is copied into every fragment and a fragmentable part that is split.
- Reassembly is only at the destination.
Example: source sends 4000 bytes of payload and learns that path MTU = 1500. Each fragment: 40 (base header) + 8 (fragment header) + data. Data per fragment = 1500 - 48 = 1452, reduced to 1448 to be a multiple of 8.
| Fragment | Packet size | Data | M | Offset (units of 8 B) |
|---|---|---|---|---|
| 1 | 1496 | 1448 | 1 | 0 |
| 2 | 1496 | 1448 | 1 | 181 |
| 3 | 1152 | 1104 | 0 | 362 |
Check: 1448 + 1448 + 1104 = 4000; offset 1448/8 = 181, 2896/8 = 362.
Comparison
| Basis | IPv4 | IPv6 |
|---|---|---|
| Who fragments | Source or any router | Source only |
| Fragmentation info | In base header (ID, flags, offset) | In Fragment extension header |
| Header per fragment | 20 bytes | 40 + 8 bytes |
| Router load | Routers do the work | Routers only forward |
| DF bit | Present | Not present; routers never fragment |
| Path MTU Discovery | Optional | Strongly recommended (otherwise send at most 1280 bytes) |
| Minimum MTU | 68 bytes (every host must accept 576-byte datagrams) | 1280 bytes |
| Checksum | Recomputed per fragment | No header checksum |
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- RFC and IPv4/IPv6 fragmentation · Internet and Intranet, chapter 2
- TCP/IP applications; IPv4 vs IPv6 routing · Internet and Intranet, chapter 2
- IPv6 migration; IPv4 vs IPv6 packet structure · Internet and Intranet, chapter 2
- Compare IPv6/IPv4 headers; migration · Computer Networks and Security, chapter 7 · asked 2×
- Factors for IPv6; IPv4 to IPv6 transition · Computer Networks and Security, chapter 7 · asked 2×
- IPv6 datagram format · Computer Networks and Security, chapter 7 · asked 2×
- IPv4 drawbacks solved by IPv6 · Computer Networks and Security, chapter 7 · asked 2×