Reassembly at Destination
For Complete YouTube Video: Click Here
In this class, we will try to understand Reassembly at Destination.
We have already discussed the concepts of Segmentation and Fragmentation in our previous class.
Reassembly at Destination
This concept is essential to understand.
We will consider the example covered in the segmentation and fragmentation class to understand this concept.
The image below shows the fragments received at the destination in our previous class.
In the above image, we have taken the fields Identification number, MF, Fragment offset, Header length, and Total length of each fragment.
The algorithm at the receiver will reassemble the fragments from the above field’s data.
The MF and fragment offset details from the above fields have hidden intrinsic data.
The image below shows the MF and fragment offset values to be considered.
If the MF is one and the FO [Fragment Offset] is 0, the fragment is the first fragment.
If the MF is 0 and FO ! 0, this fragment is the last.
If the MF is 0 and FO is 0, then the data is not fragmented.
MF 1 and FO ! 0 fragments are between the first and the last fragment.
Below is the algorithm for reassembly at the destination.
Algorithm –
- The destination should identify that the datagram is fragmented from MF and Fragment offset field.
- The destination should identify that fragments belong to the same datagram from the Identification field.
- Identify the 1st fragment(offset = 0).
- Identify subsequent fragments using header length, total length, and fragment offset. [(TL – HL) + FO]
- Repeat until MF = 0.
Using this algorithm, the fragments will be rearranged at the destination successfully.