in Computer Networks edited by
21,120 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.1k 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

4 votes
4 votes
ans a)

4 Comments

edited by
@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?
0
0
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
1
1

@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 !!!

0
0
4 votes
4 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.

edited by

2 Comments

@Regina Phalange

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

0
0

@Regina Phalange

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

0
0
3 votes
3 votes

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

1 vote
1 vote

Number of packet fragments = ⌈ (total size of packet)/(MTU) ⌉ 
So Datagram with data 4404 byte fragmented into 3 fragments. 

souce --> https://pyq.ravindrababuravula.com/subjects/

2 Comments

Packet 3 would be

$1424 | 20$

Because total payload = $4404 - 20 = 4384$
1
1
edited by
No, I don’t think so. The last packet can accommodate all the data therefore $1444$ is correct.

Because look at the options it is given $1444$ only, otherwise, they would have given $1424$
0
0
Answer:

Related questions