Each network has maximum transmission unit(MTU), the size of the largest packet that a network can transmit. The packet larger than MTU is divided into smaller packets.
Fragmentation is also called as segmentation.
There are two types of fragmentation::
- Transparent fragmentation: Fragmentation in which packet is divided into smaller packets and reconstructed after transmitted. The packet is then further more divided into fragments if needed.
- Non-transparent fragmentation: Fragmentation in which packet is divided into smaller packets and remains divided until it reaches to the destination.
Types of network and size of fragments::
|Network||Size of fragments|
Every IP packet holds an IP header that stores information about the packet.
There are three fields involved in packet fragmentation::
- Fragment offset
- Identification bits
When a packet is fragmented, it must be given a number to be reconstructed in original way. One way of doing so is to use a tree.
If a 2,366 byte packet enters an Ethernet network with a default MTU size, it must be fragmented into two packets.
The first packet will:
• Be 1,500 bytes in length. 20 bytes will be the IP header, 24 bytes will be the TCP header, and 1,456 bytes will be data.
• Have a DF bit equal to 0 to mean “May Fragment” and an MF bit equal to 1 to mean “More Fragments.”
• Have a Fragmentation Offset of 0.
The second packet will:
• Be 910 bytes in length. 20 bytes will be the IP header, 24 bytes will be the TCP header, and 866 bytes will be data.
• Have the DF bit equal to 0 to mean “May Fragment” and the MF bit equal to 0 to mean “Last Fragment.”
• Have a Fragmentation Offset of 182 (Note: 182 is 1456 divided by 8).