6 votes

A IP packet has arrived in which the fragmentation offset value is 100,the value of HLEN is 5 and the value of total length field is 200. What is the number of the last byte?

- 194
- 394
- 979
- 1179

14 votes

Best answer

3

hlen is of 4 bits and it can represent a maximum value of 15. while the header length can g upto 60. so we use a scale factor of 4. so now 4 bits can represent upto 15*4 = 60. so if the value of hlen is 5 then it means it is actually representing 5*4 = 20. hope that clears!

1

@ayush palak @Raju Kalagoni But shouldn't data be a multiple of 8? Here data size is 180, which is not a multiple of 8.

0

@shraddha priya, data need not be a multiple of 8. it doesn't make sense to have data always in multiple of 8. We should always be in a position to send data across network either in multiple of 8 or not.

0

@shraddha priya Data should be a multiple of 8 in cases where there are more than 1 fragmented packets and all the packets except the last packet must be a multiple of 8. If there is only one packet or the packet is last fragmented packet then it need not be a multiple of 8.

4 votes

Option-C

Total Length=200

Data feild excluding header=200-20=180(0---179)

No of byte ahead from this packet is=100*8=800

so last byte =800+179=979

Total Length=200

Data feild excluding header=200-20=180(0---179)

No of byte ahead from this packet is=100*8=800

so last byte =800+179=979