Packet Fragmentation/Defragmentation
Packet
fragmentation and defragmentation is one of the main jobs of the IP protocol. The IP
protocol defines the maximum size of a packet as 64 KB, which comes from the fact that the
len field of the header, which represents the size of
the packet in bytes, is a 16-bit value. However, not many interface types can send packets
of a size up to 64 KB. This means that when the IP layer needs to transmit a packet whose
size is bigger than the MTU of the egress interface, it needs to split the packet into
smaller pieces. We will see later in this chapter that the MTU used is not necessarily the
one associated to the egress's device; it could be, for instance, the one associated with
the routing table entry used to route the packet. The latter would depend on several
factors, one of which is the egress device's MTU.
Regardless of how the MTU is computed, the fragmentation process creates a series of equal-size fragments, as shown in Figure 18-10. The MF and OFFSET fields shown in the picture are described later in this section. If the MTU does not divide the original size of the packet exactly, the final fragment is smaller than the others.

Figure 18-10. IP packet fragmentation
A fragmented IP packet is normally defragmented by the destination host, but intermediate devices that need to look at the entire IP packet may have to defragment it, too. Two examples ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access