Reassembly is the process of reconstructing the original IP packet from fragments at the destination host. The receiver buffers fragments until all pieces arrive, then combines them using offset fields. If any fragment is missing after a timeout (typically 30-60s), all received fragments are discarded.
IP reassembly occurs at the final destination when fragmented packets arrive. The receiving host allocates a reassembly buffer keyed by (source IP, destination IP, protocol, identification). Fragments arrive potentially out of order and are placed at their offset positions. When all bytes from offset 0 through the total length are present (indicated by the last fragment having MF=0), the original packet is complete and delivered to the transport layer. Reassembly has resource implications: each in-progress reassembly consumes kernel memory. Attackers exploit this with fragment-based attacks – the Teardrop attack sent overlapping fragments causing crashes, and fragment flooding exhausts reassembly buffers causing legitimate traffic drops. Modern kernels limit reassembly memory (ipfrag_high_thresh) and time out incomplete assemblies after 30 seconds (ipfrag_time). The best defense is avoiding fragmentation entirely via proper MTU configuration and PMTUD.
Packet
A packet is a unit of data transmitted over a network. Each packet contains a header (source/destination addresses, protocol info, sequence numbers) and a payload (the actual data). IP packets are limited by MTU – typically 1500 bytes on Ethernet. Larger messages are split into multiple packets.
MTU (Maximum Transmission Unit)
MTU is the largest packet size a network link can carry without fragmentation. Ethernet MTU is 1500 bytes. If a packet exceeds the path MTU, it is fragmented (IPv4) or dropped with ICMP Packet Too Big (IPv6). Path MTU Discovery (PMTUD) finds the lowest MTU along a route.
Fragmentation
IP fragmentation splits packets larger than the link MTU into smaller fragments for transmission, reassembled at the destination. Fragmentation hurts performance – any single lost fragment requires retransmitting the entire original packet. IPv6 does not allow router fragmentation; only endpoints can fragment.