Segmentation Fragmentation and Reassembly
For Complete YouTube Video: Click Here
In this class, we will try to understand Segmentation Fragmentation and Reassembly.
We have already discussed the concept of Maximum Transmission Unit MTU in our previous class.
Segmentation Fragmentation and Reassembly
To understand Segmentation Fragmentation and Reassembly, we will consider the below image.
In the above image, we have two networks: Ethernet and token ring.
The maximum transmission unit for Ethernet is 1500 Bytes and 500 Bytes of token ring.
System A wants to communicate with B.
Assume that the application layer has transmitted 100000 Bytes of data to the transport layer.
The transport layer header will get added to the 100000 Bytes.
Can the segment in the transport layer be transmitted to the network layer?
No, it cannot be transmitted because the network layer has a limitation in the total length field of the network layer packet.
The limitation is 2^16 (65536) Bytes of data.
So the data of 100000 Bytes of data has to be segmented into two pieces, and this is called segmentation.
The first piece has 65515 Bytes of data, including the transport layer header.
To his 65515 bytes of data, the network layer will add 20 bytes of header.
From the above diagram, it is evident that the data link layer has a capacity of 1500 bytes, excluding the frame.
Now the 65536 bytes will get divided into small frames with 1500 bytes.
We can divide the packet into 44 pieces, which is called fragmentation.
The data link layer frame is attached to each fragment and transmitted into the physical medium.
But in reality, this is not the case.
At the source, the segmentation and fragmentation are a repetition of division.
The transport layer at the source will identify the smallest possible division, and accordingly, it will divide into segments.
In our case, the data link layer is the bottleneck of 1500 bytes.
So the transport layer will identify it, and accordingly, it will segment them.
At the router, we have another bottleneck: the capacity of the token ring network with a total of 500 bytes.
Every 1500 bytes is divided into three pieces by the network layer (44* 3 + 132).
The division of the packets at the network layer of the router is called fragmentation.
At the source, only the segmentation is done by the transport layer.
Reassembly
The 132 frames transmitted are received at the receiver and will be reassembled into packets at the data link layer by removing the data link layer frame.
At the network layer, the packets will get reassembled by removing the network layer header and transmitted to the transport layer.
The transport layer will remove the transport header, and the original data will get transmitted to the application layer.