4.6k views

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?

1. 194
2. 394
3. 979
4. 1179
| 4.6k views

Data length=200-4*5=180

Starting number of first byte of fragment=100*8=800

Number of last byte=800+179=979

Ans c
by Boss (31.4k points)
selected by
0
0
coz there are 180 bytes so + 0-179  @abhishek
0
@ danny thanx dude..I got it
+1
4*5 means
0
+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
why 100 is multiply by 8. Does it convert into bits?
+2

@ pankajbelwal , scaling factor of fragment offset is 8.

+1

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.

Option-C

Total Length=200

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

so last byte =800+179=979
by Boss (10.2k points)

An IP packet looks like this.

Header Length = $5*4=20$

So, Payload = $200-20=180$

Fragmentation offset = $100*8=800$

The last byte would be $180 + 800$th = $980th$ but since we number everything from 0 in computer science, it'll be $979th$

by Loyal (6.3k points)
by Loyal (9.9k points)