Finding number of fragment


for finding number of fragment we take ceil of (data without header/ MTU)
… we take MTU with header ? right


I would recommend you not to go for any formula. It won’t work in many cases for such questions. If you are having trouble with any question related to this then do share. I would help you solve without any formula’s.


suppose a packet length =1800B with minimun header size enter a loacal area network with a MTU of 500 B ,then how many fragment will be generated from the packet and what is the size of payload of last packet?

fragment generate is ceil( 1780/ 500)= 4
20|480 20|480 20|480 20|340
MF 1 1 1 0
offset 0 480 960 1440

ans: payload is 360

is it right approach?


Okay so you wish to use the formula to pre-calculate number of fragments you would be requiring.

So in 1 segment maximum 480B of data you can send.
You have to send total 1800B of data.

So total number of segments would be Ceil(1800/480) = 4

You have made a mistake in the offset field. You should divide every number by 8 and then store.

0 480 960 1440 should be stored as 0 60 120 180