Suppose that an IP datagram with the total length of 1220 by
Suppose that an IP datagram with the total length of 1220 bytes (20 bytes of the IP header and 1200 bytes of data) is forwarded to a router with the maximum transmission unit (MTU) as 500 bytes. That is, the maximum allowed IP datagram length including the IP header is 500 bytes. Does this IP datagram need fragmentation? If yes, how many fragmentations are there? Please show the Total length, DF, MF, and Fragment offset fields of the IP header in each fragmented datagram.
Solution
Since the maximum transition unit size is less then the total length of IP datagram, fragmentation is required.
The maximum size of data field in each fragment = 480 ( excluding the header of 20 bytes)
Thus the number of required fragments = ((1220 - 20) / 480) = 3
Each fragment will be of size 500 bytes including the IP header except the last one which will be of size 260 bytes
including 20 bytes of IP header.
Assuming the ID of the original packet is \'x\', MF flag was not set initially,
Packet 1: ID=x, Total_len=500, MF=1, Frag_offset=0
Packet 2: ID=x, Total_len=500, MF=1, Frag_offset=60
Packet 3: ID=x, Total_len=260, MF=0, Frag_offset=120
