The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
+24 votes

An $IP$ router with a $\text{Maximum Transmission Unit (MTU)}$ of $1500$ bytes has received an $IP$ packet of size $4404\text{ bytes}$ with an $IP$ header of length $20\text{ bytes}$. The values of the relevant fields in the header of the third $IP$ fragment generated by the router for this packet are:

  1. $MF\ bit$: $0,$ Datagram Length:$1444;$ Offset$: 370$
  2. $MF\ bit$: $1,$ Datagram Length$: 1424;$ Offset$: 185$
  3. $MF\ bit$: $1,$ Datagram Length$: 1500;$ Offset$: 370$
  4. $MF\ bit$: $0,$ Datagram Length$: 1424;$ Offset$: 2960$
asked in Computer Networks by Veteran (101k points)
edited by | 4.3k views

7 Answers

+34 votes
Best answer
IP packet length is given $4404$ which includes ip header of length $20$
So, data is $4384$.

Now, router divide this data in $3$ parts
$1480\quad 1480\quad 1424$

After adding ip header in last packet size is: $1444$ and since its the last packet therefore $MF =0$

And offset is $\dfrac{2960}{8}=370$
answered by (263 points)
edited by
I am getting Datagram length=1424,or we add header length always at the last fragment?
why the offset is not 3000/8? offset is the relative positon of fragment in a datagram, then why r we nt considering the headers?
datagram =header + data=20+1424=1444

The format of data that can be recognized by IP is called an IP datagram. It consists of two components, namely, the header and data, which need to be transmitted.

So when datagram length is asked...Header length is also added.

first offset: 0 ---184
second offset :185---370
third oofset :371----549
where i am wrong ??
First offset : 0 - 184

Second offset : 185 - 369 (including both extremes)
Can you please explain to me how to calculate fragment here?
MTU always contain 20 B of header.rt?
As it is not mentioned ,I am asking.

 srestha i hope you mean IP header and its minimum length is 20 bytes and max is 24 bytes


Mk Utkarsh max ip header length = 24 bytes? how can you plz explain ...

+9 votes

Thanks :)

answered by (431 points)
+7 votes
Ip packet size excluding the header=1404-20=4384

MTU of router/Network/Gateway=1500

No. Of fragments=ceil(4384/1500)=~3

These three fragments will be multiple of 8 but max but less 1500 like

1480,1480 and 1424

Offset of last fragments is:1480+1480=2960/8=370
answered by Loyal (8.9k points)
+4 votes
ans a)
answered by Loyal (5.2k points)

I m getting: MF bit: 0, Datagram Length: 1424; Offset: 370

when we say " IP packet of size 4404", is including header or without including?? If it is without including header than Datagram lenght would be 1444... but if it is including header than it would  come 1424.. As per my understading when we say packet size, we mean size of whole packet, not just part of packet (which datagram lenth in it)... anyway I'll go with option (A) because offset can't be 2960 as in case of (D)...

"an IP packet of size 4404 bytes with an IP header of length 20 bytes". I would also have gone with 1424 but for offset.
@Arjun Sir and @Vicky:

from Peterson Davie:

"The IP datagram, like most packets, consists of a header followed by a number of bytes of data."

So won't datagram length be 20 + 1424 = 1444 bytes?
@Srestha,A lil bit of discretion of urs involved here too:-

Since the MTU size is 1500-20(Header)=1480

No for first IP Fragment 1480 +20(Header)

For second fragment 1480 +20(Header)

For third fragment 1424+20(Header)

Also,why for the offset division is done by 8?Could you please tell?

Is this the way bifurcation done?
+3 votes

Number of fragments =ceil(4404-20/1500-2)=3(approx) Take integer

First Fragments.

1480 20

Offset  of first fragments  :: 0 and MF =1

Second Fragments:

1480 20

Offset  of IInd fragments  :: 185 and MF =1

Third Fragments::

1424 20

Offset  of IIIrd fragments  :: 370 and MF =1

And datagram length is nothing but total length=1424+20=1444 Byte

Therefore option A will be right.

answered by Loyal (8.9k points)
ceil(4404-20/1500-2) why -2 here ?

Offset  of IIIrd fragments  :: 370 and MF =1

change MF to 0 

+3 votes
Number of packet fragments = ⌈ (total size of packet)/(MTU) ⌉
                           = ⌈ 4404/1500 ⌉
                           = ⌈ 2.936 ⌉ 
                           = 3

So Datagram with data 4404 byte fragmented into 3 fragments. 

The first frame carries bytes 0 to 1479 (because MTU is 1500 bytes and HLEN is 20 byte so the total bytes in fragments is maximum 1500-20=1480).

the offset for this datagram is 0/8 = 0.

The second fragment carries byte 1480 to 2959.

The offset for this datagram is 1480/8 = 185.

finally the third fragment carries byte 2960 to 4404.

the offset is 370.and for all fragments except last one the M bit is 1.

so in the third bit M is 0.

answered by Loyal (8.4k points)
edited by

@Regina Phalange

while calculating offset, we always divide it by 8..??

+1 vote

Since we have to add ip header and then ultimately remove it , it is better to not take it in consideration while solving such questions and taking MTU by excluding IP header 

Data : 4404 B

F1 : 1480 offset : 0 MF:1

F2 : 2960 offset : 185 MF:1

F3 : 1444 offset : 370 MF: 0

Fragmentation is done on data not on header

answered by Active (1.9k points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

39,529 questions
46,674 answers
57,594 users