Data is transported through a network using IP packets, each of which consists of a header and a data segment. There are two versions of IP packets: IPV4 and IPV6. In this Answer, we will look at IPV4.
The IPV4 packet has a maximum size of
The minimum header size is
Keeping this in mind, the maximum data that can be sent in a packet is
IPV4 can be used in many data link layers, each having its own maximum frame size or Maximum Transmission Unit (MTU). The MTU is the largest packet a data link layer can send, including its header. The MTU values of some commonly used data link layers are shown below.
Data link layer | MTU |
Ethernet | 1,500 bytes |
IEEE 802.11 WiFi | 2,304 bytes |
Token Ring (802.15.4) | 4,464 bytes |
FDDI | 4,352 bytes |
As we can see in the table above, all of the MTU values are significantly smaller than the maximum size of an IPV4 packet. Therefore, to pass data safely through the network, the large IPV4 packet is fragmented into two or more IPV4 packets.
Fragmentation is the breaking of an IPV4 packet that exceeds the MTU of the data link layer into smaller IPV4 packets. Fragmentation is a process performed by the sender or the forwarding routers.
Fragmentation relies on some of the fields in the IPV4 header, which are as follows:
Identification: To identify fragments, we use a 16-bit field.
When the packet is fragmented, the identification field is copied into the fragmented packet headers to help determine that the packet belongs to a specific frame.
Fragment offset: This is a 13-bit field that is used to order the data into fragments; it helps in the rearranging part. As discussed above, the largest data offset can be
MF (More fragments): It is a one-bit flag that specifies if there are more fragments of the frame. All the fragmented packets have this flag set to
DF (Don't fragment): It is a one-bit flag that tells the routers whether to fragment the packet or not. If it is set to
The reassembly process is carried out at the destination. This is because packets take different routes through the network and arrive at different times.
The steps of the process of reassembly are as follows:
The destination identifies that the packet has been fragmented using the MF and fragment offset fields.
The destination categorizes the incoming packets according to their identification fields. Two packets with the same identification field are put in the same category.
The packets within a category are sequenced using the MF and fragment offset. First, the packets with MF equal to
Consider an example where a packet with a size of
Given the sample MTU size of 100 and an IP packet of size 999, how many fragments will be created?
11
12
13
Free Resources