How Does IPv6 Handle Fragmentation?

Fragmentation is a fundamental networking mechanism that allows large packets to traverse networks with varying Maximum Transmission Unit (MTU) sizes. While IPv4 and IPv6 both support fragmentation, IPv6 introduces a radically different approach that shifts responsibility away from intermediate routers to the network's endpoints. Understanding how IPv6 handles fragmentation is crucial for network engineers, administrators, and developers working with modern IP networks.

The Fundamental Shift: End-to-End Fragmentation

The most significant difference between IPv4 and IPv6 fragmentation lies in who performs the fragmentation. This architectural change has profound implications for network performance and design.

IPv4 Fragmentation Model

In IPv4, fragmentation can occur at multiple points along the packet's journey:

This distributed fragmentation model allows packets to be broken up anywhere along the path, which seems convenient but creates several problems:

  1. Router performance degradation - Fragmentation requires CPU-intensive operations that slow down forwarding
  2. Increased overhead - Each fragment requires its own IP header, increasing bandwidth consumption
  3. Security vulnerabilities - Fragmented packets can be used to evade firewalls and intrusion detection systems
  4. Reassembly complexity - Lost fragments require retransmission of the entire original packet

IPv6 End-to-End Model

IPv6 takes a fundamentally different approach by implementing source-only fragmentation:

When an IPv6 router receives a packet larger than the next hop's MTU, it:

  1. Drops the packet immediately
  2. Sends an ICMPv6 "Packet Too Big" (Type 2) message back to the source
  3. Includes the MTU value of the problematic link in the ICMPv6 message

The source node then adjusts its packet size and retransmits, either by:

This design decision improves router performance significantly by eliminating fragmentation processing from the forwarding path, allowing routers to focus on their primary task: fast packet forwarding.

The IPv6 Minimum MTU Requirement

IPv6 mandates a minimum link MTU of 1280 bytes. This is a hard requirement that all IPv6-capable network links must support.

Why 1280 Bytes?

This value was chosen to ensure that:

For comparison, IPv4's minimum MTU requirement is only 576 bytes.

Practical Implications

When testing your network's IPv6 connectivity using tools like test-ipv6.run, MTU-related issues can manifest as connection timeouts or partial connectivity, particularly when accessing sites with different MTU configurations.

IPv6 Fragment Extension Header Structure

Unlike IPv4, which includes fragmentation fields in the base IP header, IPv6 uses an Extension Header approach. The Fragment Header is a separate, optional header that appears only when fragmentation is needed.

The Fragment Extension Header is identified by Next Header value 44 and has the following 8-byte structure:

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Next Header  |   Reserved    |      Fragment Offset    |Res|M|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         Identification                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Field Descriptions

Next Header (8 bits)

Reserved (8 bits)

Fragment Offset (13 bits)

Res (2 bits)

M Flag (1 bit)

Identification (32 bits)

This structure is more compact than IPv4's fragmentation fields and enables efficient processing at the destination.

The Fragmentation Process

When an IPv6 source needs to fragment a packet, it follows this process:

Step 1: Determine Fragmentation Need

The source determines fragmentation is needed when:

Step 2: Divide the Packet

The source divides the original packet into fragments:

  1. Calculate fragment size: Each fragment must fit within the Path MTU minus IPv6 header (40 bytes) and Fragment Header (8 bytes)
  2. Create fragment payloads: Divide the "Fragmentable Part" into chunks aligned on 8-byte boundaries (except the last fragment)
  3. Preserve unfragmentable headers: Extension headers that must be processed by intermediate nodes (Hop-by-Hop Options, Routing Header) appear before the Fragment Header

Step 3: Add Fragment Headers

For each fragment, the source:

  1. Copies the base IPv6 header from the original packet
  2. Inserts a Fragment Extension Header after any unfragmentable extension headers
  3. Sets the Fragment Offset to indicate this fragment's position
  4. Sets the M flag (1 for all but the last fragment)
  5. Uses the same Identification value for all fragments
  6. Adjusts the IPv6 header's Payload Length field to reflect the fragment size

Step 4: Transmission

Fragments are transmitted as independent IPv6 packets. They:

Reassembly at the Destination

The receiving host performs reassembly:

  1. Identify fragment set: Groups fragments by source address, destination address, and Identification value
  2. Buffer fragments: Stores received fragments in memory until all arrive
  3. Check completeness: Uses Fragment Offset and M flag to determine when all fragments are present
  4. Reassemble: Reconstructs the original packet by combining fragments in order
  5. Deliver: Passes the complete packet to the upper-layer protocol

Reassembly Timeout

If all fragments don't arrive within a timeout period (typically 60 seconds):

Path MTU Discovery: The Critical Mechanism

Since IPv6 routers cannot fragment packets, Path MTU Discovery (PMTUD) becomes essential rather than optional. PMTUD is the mechanism by which a host dynamically discovers the smallest MTU along the path to a destination.

How PMTUD Works in IPv6

  1. Initial transmission: Source sends packets using its local link MTU (typically 1500 bytes)
  2. MTU bottleneck detection: When a router encounters a packet too large for the next hop, it drops the packet and sends an ICMPv6 "Packet Too Big" message
  3. MTU cache update: Source receives the ICMPv6 message and stores the smaller MTU value
  4. Retransmission: Source retransmits using the smaller packet size
  5. Path changes: If routing changes, the process repeats to discover the new path's MTU

PMTUD Security Considerations

To prevent attackers from poisoning the MTU cache with fake ICMPv6 messages:

PMTUD Challenges

PMTUD can fail when:

These failures can cause connectivity problems that manifest as:

Testing tools like test-ipv6.run help identify these issues by performing comprehensive connectivity tests across different protocols and packet sizes.

Performance Implications

IPv6's fragmentation model has significant performance implications:

Benefits

  1. Improved router performance: Routers forward packets faster without fragmentation overhead
  2. Better security: Firewalls and IDS systems see complete packets, not just first fragments
  3. Reduced network overhead: Fewer fragmented packets mean less header overhead
  4. Simplified router design: Removing fragmentation reduces hardware complexity and cost

Challenges

  1. PMTUD dependency: Networks must allow ICMPv6 messages for proper operation
  2. Increased latency: Failed transmissions require round-trip time for ICMPv6 messages and retransmission
  3. Application awareness: Applications benefit from being MTU-aware to avoid fragmentation
  4. Transition complexity: Mixed IPv4/IPv6 networks require careful MTU planning

Best Practices

To optimize IPv6 fragmentation handling:

Conclusion

IPv6's fragmentation model represents a significant improvement over IPv4's approach. By restricting fragmentation to source nodes only, IPv6 enables faster router performance, better security, and more predictable network behavior. However, this design makes Path MTU Discovery essential, requiring network operators to ensure ICMPv6 messages flow properly.

Understanding IPv6 fragmentation is crucial for:

The shift from router-based to end-to-end fragmentation exemplifies IPv6's philosophy of simplifying the network core while adding intelligence at the edges. As IPv6 adoption continues to grow, proper fragmentation handling becomes increasingly important for maintaining reliable, high-performance internet connectivity.

To verify your network properly handles IPv6 fragmentation and Path MTU Discovery, use comprehensive testing tools like test-ipv6.run, which can identify MTU-related issues and other IPv6 connectivity problems.


Related Topics: