Fragmentation | Fields in IP header for fragmentation | Why IPv4 Datagram Fragmentation required? | How is Fragmentation done?
  • Fragmentation is mainly used by the network layer
  • Fragmentation process is used when the maximum size of datagram is greater than maximum size of data that can be held a frame i.e., its Maximum Transmission Unit (MTU). 
  • Different networks may have different frame limits (MTUs).Like :Ethernet 1.5K, FDDI 4.5K
  • Router breaks up single IP packet into two or more smaller IP packets. First, Each fragment is labeled so it can be correctly reassembled. Second,End host reassembles them into original packet


  • It is done by network layer at the destination side and is usually done at routers.
  • Source side does not require fragmentation due to wise (good) segmentation by transport layer i.e. instead of doing segmentation at transport layer and fragmentation at network layer, the transport layer looks at datagram data limit and frame data limit and does segmentation in such a way that resulting data can easily fit in a frame without the need of fragmentation.

Fields in IP header for fragmentation –

  • Identification (16 bits) – use to identify fragments of same frame.
  • Fragment offset (13 bits) – use to identify sequence of fragments in the frame. It generally indicates number of data bytes preceeding or ahead of the fragment.
  • Maximum fragment offset possible = (65535 – 20) – 1 = 65514{where 65535 is maximum size of datagram and 20 is minimum size of IP header}So, we need ceil(log265514) = 16 bits for fragment offset but fragment offset field has only 13 bits. So, to represent efficiently we need to scale down fragment offset field by 216/213= 8 which acts as a scaling factor. Hence, all fragments except the last fragment should have data in multiples of 8 so that fragment offset ∈ N.
  • More fragments (MF = 1 bit) – tells if more fragments ahead of this fragment i.e. if MF = 1, more fragments are ahead of this fragment and if MF = 0, it is the last fragment.
  • Don’t fragment (DF = 1 bit) – if we don’t want the packet to be fragmented then DF is set i.e. DF = 1.

Why IPv4 Datagram Fragmentation required?
Different Networks may have different maximum transmission unit (MTU), for example due to differences in LAN technology. When one network wants to transmit datagrams to a network with a smaller MTU, the routesrs on path may fragment and reassemble datagrams.

How is Fragmentation done?
When a packet is received at the router, destination address is examined and MTU is determined. If size of the packet is bigger than the MTU, and the ‘Do not Fragment (DF)’ bit is set to 0 in header, then the packet is fragmented into parts and sent one by one. The maximum size of each fragment is the MTU minus the IP header size (Minimum 20 bytes and Maximum 60 bytes).

Each fragment is converted to a packet and the following changes happen in the datagram header:

  • The total length field is changed to the size of the fragment.
  • The More Fragment bit (MF bit) is set for all the fragment packets except the last one.
  • The fragment offset field is set, based on the number of fragment that is being set and the MTU.
  • Header Checksum is re-calculated.

Contributor's Info

Created: Edited: