17,006 views

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$

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

"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.

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.

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.

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$

ok thanks fo correction

what is meaning of datagram ??

Thanks :)

by
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
ans a)

edited
@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)

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

Is this the way bifurcation done?
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

@Arjun Sir I have also the same doubt what would be the answer for NAT type question?  when to consider the header size implicitly with ip datagram  or we have to explicitly add 20 bytes and then do the further calculation !!!