Before entering the first network,we have an IP datagram of 1024+20(TCP header)+20(IP header)=1064 bytes.so the IP payload is 1044 bytes .This datagram needs to split into 2 fragments.
- Fragment 1: IP header of 20 bytes and data of 1000 bytes.Offset is 0.
- Fragment 2:IP header of 20 bytes and data of 48 bytes.offset is 1000/8=125.
When fragment 1 goes through the second network,it needs to be split into two fragments.Each fragment can contain at most 576-20=556 bytes of data.since 556 bytes is not a multiple of 8,each fragment can in fact contain atmost 552 bytes of data.so we have following 2 fragments:
- Fragment 3: IP header of 20 bytes and data of 552 bytes.Offset is 0.
- Fragment 4:IP header of 20 bytes and data of 56 bytes.offset is 552/8=69
Finally,fragment 2 goes as is through the second network since it is of size 48 bytes.
The fragment that reach the destination are 3,4 and 2.They are assembled in this order this is because their offsets are in increasing order(0,69,125).