in Computer Networks edited by
20,970 views
48 votes
48 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. $\text{MF bit}$: $0,$ Datagram Length:$1444;$ Offset$: 370$
  2. $\text{MF bit}$: $1,$ Datagram Length$: 1424;$ Offset$: 185$
  3. $\text{MF bit}$: $1,$ Datagram Length$: 1500;$ Offset$: 370$
  4. $\text{MF bit}$: $0,$ Datagram Length$: 1424;$ Offset$: 2960$
in Computer Networks edited by
21.0k views

4 Comments

HOW TO FIND THE OFFSET VALUE?, CAN ANYONE EXPLAIN PLEASE!!!!
1
1

"Total length of the datagram" field is of 16 bits and "Fragmentation Offset" field is of 13 bits. 

2^16-1 cannot be represented using 13 bits therefore 2^16/2^13=8, 8 is the scaling factor and that's why offset is divided by 8.

1st Fragment's Offset :0

2nd Fragment's offset = Previous Fragment's Offset +(Data bytes of prev fragment/8) and so on.

4
4

If they ask what is the length of Internet header length(IHL)?

IHL has 4 bit field and we have IP header length = 20bytes

answer would be 20/4 = 5 where 4 as scaling factor saw somewhere.

please explain this?

 

0
0
Yes, as header length is 4bits and number represented by it is 0-15. As we can represent 20-60 header size so we scale down by 4 to represent 20-60. And 0-3 is not used. And required padding bits should be added to make it divisible by 4.
1
1

10 Answers

67 votes
67 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$

Correct Answer: $A$
edited by

4 Comments

what is meaning of datagram ??

Is it Datagram = header + payload(data)

anyone please clarify ??
0
0
0
0

In the question, it is mentioned that the 'values of the relevant fields in the header' are used for calculating length. We only have HLEN and TOTAL LENGTH in the header field for this purpose. Therefore, for this question, we assume that the datagram is the whole fragment size; otherwise, the datagram is synonymous with the payload in general.

You can refer here: https://gateoverflow.in/8255/gate-cse-2015-set-2-question-52 

It is explicitly mention UDP datagram size 

0
0
22 votes
22 votes

Thanks :)

by
9 votes
9 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
5 votes
5 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.

3 Comments

ceil(4404-20/1500-2) why -2 here ?
0
0

Offset  of IIIrd fragments  :: 370 and MF =1

change MF to 0 

0
0
MF should be 0
1
1
Answer:

Related questions