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?
@ pankajbelwal , scaling factor of fragment offset is 8.
@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.
@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.
@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.
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$