Fragmentation

Suppose a router receives an IP packet containing 600 data bytes and has to forward the packet to a network with maximum transmission unit of 200 bytes. Assume that IP header is 20 bytes long. How many packets it going to divide and what are more fragments bits for divided packets?

Answer

                             1st packet  2nd packet 3rd packet 4th packet
4 packets =             (176+20), (176+20), (176+20), (72+20)
More Fragment bits =    1             1             1              0

24Comments
Meenal @meenal
30 Dec 2016 05:09 pm

why 176 bytes of data in a packet ? why not 180 bytes ?

Shobhit @sudsho
30 Dec 2016 05:19 pm

@meenal is 180 a multiple to 8 to keep in offset field?

Meenal @meenal
30 Dec 2016 05:29 pm

Thanks...

Deepak @deepak
30 Dec 2016 05:23 pm

Maximum Transmission unit 200bytes, and header length is 20byte, so fragment size is 200-20=180byte, but 180 byte is not divisible by 8 so we take nearest to 180 divisible by 8 i.e. 176 bytes.

Meenal @meenal
30 Dec 2016 05:28 pm

ok ok... got it.. Thank you :)

Parth Gadoya @parthgadoya
31 Dec 2016 04:32 pm

Why divisible by 8 number required, why we are not taking 180+20 byte.

Obaid Khan @obaidkhan
31 Dec 2016 02:04 am

:)

POOJA MODI @poojamodi
31 Dec 2016 08:56 am

Last fragment of data bit can also be (56 +20). Or not

Amit Jindal @amitj
31 Dec 2016 01:26 pm

Good example

 

Utkarsh Kumar @limitless
9 Jan 2017 09:31 pm

Can you please explain it?

tarik singla @tariksingla
31 Dec 2016 04:11 pm

no it cant be 56+20 as the total transmitted packet is 00 bytes and 56 not rsults in 600 so 72 is correct opt

 

Nishant Gupta @nishantgupta
2 Jan 2017 09:01 pm

Out of 600 20 is IP header . So 580 remaining... 580-528= 52.. to scaling we make it 56.. so I think 56 should be answer... 

subhajit majumder @subhnand
31 Dec 2016 10:03 pm

why do we need to divide by 8?the data is already in bytes.could anyone please explain?

Shobhit @sudsho
31 Dec 2016 10:52 pm

because we need to keep it in the offset field where we use scaling factor of 8...
why we do so?
because total length of IPV4 header can be upto 216
and offset field is only 13 b long means maximum we can put is 213 there...so suppose in worst case we could need to put 65534 bytes which wont be possible...so we do 216/213=8 and use this as a scaling factor!!

Manu F Gomez @manufg
4 Jan 2017 05:37 pm

for the last packet, it is 56 instead of 72 right?

 

Jagmeet @jagmt
5 Jan 2017 08:23 pm

No it is 72.

Chetna Wadhwa @chetnawadhwa
16 Jan 2017 10:39 am

Acc to me also it should be 56..how 72???

Utkarsh Kumar @limitless
9 Jan 2017 09:47 pm

Unable to get it, please explain how 176 is coming in the computation?

Sumit Verma @sumitverma
9 Jan 2017 10:27 pm

We have MTU as 200 bytes. Total 600 bytes of data is to be sent. 
Now, we have to add 20 bytes of header with data packet.
So we can send 200-20 = 180 bytes of data in one packet.
But we need to keep it in the offset field where we use scaling factor of 8.
Hence, we need this to be a multiple of 8. As we can not add more bytes hence we will go with the largest value less than 180, which is divisible by 8.
That's why 176 is taken.

Mohammed Sunasra @mohammedsunasra
11 Jan 2017 09:50 am

What is that more fragment bits?

Sumit Verma @sumitverma
11 Jan 2017 04:24 pm

If there is any following fragment to the current fragment, then more fragment bit is set to 1.

Rashmi @rashmivishwa
11 Jan 2017 04:47 pm

What do you mean by offset field.why we are using it?

Sumit Verma @sumitverma
11 Jan 2017 05:41 pm

We need offset field for reassembly at the destination.

Anmol Verma @avdominic
27 Jan 2017 10:16 am

I think the data part is 600-20=580bytes here........