---
title: "IPv4 vs IPv6 datagram fragmentation"
subject: "Internet and Intranet"
chapter: 2
key: "semester_8/internet_and_intranet:ipv4-ipv6-fragmentation"
source: https://www.bctengineer.com/q/semester_8/internet_and_intranet/ipv4-ipv6-fragmentation
site: BCT Engineering
---

# IPv4 vs IPv6 datagram fragmentation

Internet and Intranet · Chapter 2: Internet Protocol Overview

- Asked in: 2073 Magh, 10 marks; 2071 Bhadra, 10 marks (asked 2 times)
- Video: [How IP FRAGMENTATION Works](https://www.youtube.com/watch?v=vdajb14Lcu0) — Chris Greer
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_8/internet_and_intranet/ipv4-ipv6-fragmentation
- Whole chapter: https://www.bctengineer.com/md/semester_8/internet_and_intranet/chapter-2

## Question

Compare the IP datagram fragmentation process in IPv4 and IPv6 with an example.

## 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.

## Answer

#### 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 |

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. In IPv6, who is allowed to fragment a packet that is larger than a link's MTU?
   A. Any router on the path
   B. Only the source host
   C. Only the destination host
   D. Only the first-hop router
   Answer: B. IPv6 routers never fragment; they drop the packet and return ICMPv6 Packet Too Big, and the source fragments. (Key point: Who fragments)

2. Which IPv4 header fields let the destination reassemble fragments of one datagram?
   A. TTL, Protocol and Checksum
   B. Identification, MF flag and Fragment Offset
   C. Version, IHL and ToS
   D. Source address and DF flag only
   Answer: B. Identification groups the fragments, MF marks more to come, and Fragment Offset gives the data position. (Key point: IPv4 fragment fields)

3. A 4000-byte IPv4 datagram (20-byte header) goes onto an MTU 1500 link. What are the data sizes and offsets of the three fragments?
   A. 1480, 1480, 1020 bytes with offsets 0, 185, 370
   B. 1500, 1500, 1000 bytes with offsets 0, 187, 375
   C. 1480, 1480, 1020 bytes with offsets 0, 1480, 2960
   D. 1460, 1460, 1060 bytes with offsets 0, 182, 365
   Answer: A. Data per fragment is 1500 - 20 = 1480 (multiple of 8); 3980 - 2960 = 1020 left; offsets are in units of 8 bytes: 0, 185, 370. (Key point: IPv4 fragmentation example)

4. With path MTU 1500, why is IPv6 fragment data 1448 bytes rather than 1452?
   A. Because 1452 would exceed the MTU
   B. Because the 40-byte header and 8-byte fragment header leave 1452, which is rounded down to a multiple of 8
   C. Because the checksum takes 4 bytes
   D. Because the minimum MTU is 1280
   Answer: B. 1500 - 40 - 8 = 1452, and fragment data must be a multiple of 8 bytes, so 1448 is used. (Key point: IPv6 fragmentation example)

5. Which statement correctly contrasts IPv4 and IPv6 fragmentation?
   A. IPv6 keeps the DF bit and IPv4 does not
   B. IPv6 Path MTU Discovery is optional and IPv4 is required
   C. IPv6 carries fragment information in a Fragment extension header; IPv4 has it in the base header
   D. IPv6 fragments need only a 20-byte header each
   Answer: C. IPv6 base header has no fragment fields; they are in the Fragment extension header (Next Header 44). PMTUD is required in IPv6 and there is no DF bit. (Key point: IPv4 vs IPv6 differences)

## Related in Internet and Intranet

- [RFC and IPv4/IPv6 fragmentation](https://www.bctengineer.com/question.md?key=semester_8%2Finternet_and_intranet%3Arfc-fragmentation-ipv4-ipv6) — Internet and Intranet, chapter 2
- [TCP/IP applications; IPv4 vs IPv6 routing](https://www.bctengineer.com/question.md?key=semester_8%2Finternet_and_intranet%3Atcpip-application-ipv4-ipv6-routing) — Internet and Intranet, chapter 2
- [IPv6 migration; IPv4 vs IPv6 packet structure](https://www.bctengineer.com/question.md?key=semester_8%2Finternet_and_intranet%3Aipv6-migration-router-packet) — Internet and Intranet, chapter 2

## Related in other subjects

- [Compare IPv6/IPv4 headers; migration](https://www.bctengineer.com/question.md?key=semester_7%2Fcomputer_networks_and_security%3Aipv6-ipv4-header-migration) — Computer Networks and Security, chapter 7, asked 2×
- [Factors for IPv6; IPv4 to IPv6 transition](https://www.bctengineer.com/question.md?key=semester_7%2Fcomputer_networks_and_security%3Aipv6-factors-transition) — Computer Networks and Security, chapter 7, asked 2×
- [IPv6 datagram format](https://www.bctengineer.com/question.md?key=semester_7%2Fcomputer_networks_and_security%3Aipv6-datagram-format) — Computer Networks and Security, chapter 7, asked 2×
- [IPv4 drawbacks solved by IPv6](https://www.bctengineer.com/question.md?key=semester_7%2Fcomputer_networks_and_security%3Aipv4-drawbacks-ipv6-advantages) — Computer Networks and Security, chapter 7, asked 2×
