Skip to main content

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

FragmentTotal lengthDataMFOffset (units of 8 B)
11500148010
2150014801185
3104010200370

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.

FragmentPacket sizeDataMOffset (units of 8 B)
11496144810
2149614481181
3115211040362

Check: 1448 + 1448 + 1104 = 4000; offset 1448/8 = 181, 2896/8 = 362.

Comparison

BasisIPv4IPv6
Who fragmentsSource or any routerSource only
Fragmentation infoIn base header (ID, flags, offset)In Fragment extension header
Header per fragment20 bytes40 + 8 bytes
Router loadRouters do the workRouters only forward
DF bitPresentNot present; routers never fragment
Path MTU DiscoveryOptionalStrongly recommended (otherwise send at most 1280 bytes)
Minimum MTU68 bytes (every host must accept 576-byte datagrams)1280 bytes
ChecksumRecomputed per fragmentNo header checksum

✓ Answer checked by Claude Opus 5.5 (high effort)

All Internet and Intranet chapter 2 questions →