Fragmentation is an important function of network layer. It is technique in which gateways break up or divide larger packets into smaller ones called fragments. Each fragment is then sent as a separate internal packet. Each fragment has its separate header and trailer.
Sometimes, a fragmented datagram also get fragmented when it encounter a network that handle smaller fragments. Thus, a datagram can be fragmented several times before it reaches final destination. Reverse process of the fragmentation is difficult. Reassembly of fragments is usually done by the destination host because each fragment has become an independent datagram.
For the reference of example of fragmentation you can refer : Fragmentation Example
There are two different strategies for the recombination or we can say reassembly of fragments : Transparent Fragmentation, and Non-Transparent Fragmentation.
- Transparent Fragmentation :
This fragmentation is done by one network is made transparent to all other subsequent networks through which packet will pass. Whenever a large packet arrives at a gateway, it breaks packet into smaller fragments as shown in the following figure gateway G1 breaks a packet into smaller fragments.
After this, each fragment is going to address to same exit gateway. Exist gateway of a network reassembles or recombines all fragments example is shown in the above figure as exit gateway, G2 of network 1 recombines all fragments created by G1 before passing them to network 2. Thus, subsequent network is not aware that fragmentation has occurred. This type of strategy is used by ATM networks . These networks use special hardware that provides transparent fragmentation of packets.
There are some disadvantages of transparency strategy which are as follows :
- Exit fragment that recombines fragments in a network must known when it has received all fragments.
- Some fragments chooses different gateways for exit that results in poor performance.
- It adds considerable overhead in repeatedly fragmenting and reassembling large packet.
- Non-Transparent Fragmentation :
This fragmentation is done by one network is non-transparent to the subsequent networks through which a packet passes. Packet fragmented by a gateway of a network is not recombined by exit gateway of same network as shown in the below figure.
Once a packet is fragmented, each fragment is treated as original packet. All fragments of a packet are passed through exit gateway and recombination of these fragments is done at the destination host.
Disadvantages of Non-Transparent Fragmentation is as follows :
- Every host has capability of reassembling fragments.
- When a packet is fragmented, fragments should be numbered in such a way that the original data stream can be reconstructed.
- Total overhead increases due to fragmentation as each fragment must have its own header.