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

0 votes
0 votes
IP packet = 4384+20

in which data = 4384

MTU = 1480+20

in which data = 1480

no of packets = ceil(log(4384/1480) = 3

first packet offset = 0*1480/8

second packet offset = 1480/8

third packet offset = 3*1480/8 = 370

 

MF bit 0 as more fragments = 0 as it is the third and last packet we are talking about.
0 votes
0 votes
Given datagram length = 4404B  (payload = 4384, header = 20B)

                       Ist                 IInd               IIIrd

4384  ---→ [1480:20],     [1480:20],    [1424:20]

            At Third fragment                     MF= 0

                                                            frame offset= (1480+1480)/8=370

                                                            datagram length=(1424+20)=1444B
Answer:

Related questions