5

In the text book: Computer Networks 5th edition by Peterson and Davie, I found "The designers of IP decided that fragmentation should always happen on 8-byte boundaries, which means that the offset field counts 8-byte chunks, not bytes".

Why the offset field is designed as a multiple of 8 ? I don't understand the significance of this. Also, what happens if the MTU-offset is not a multiple of 8 ? (e.g) If MTU = 1502 bytes, 20 bytes for header and 1482 bytes for data. In this case, what would be fragment offset in the second fragment, as 1482 is not a mutilple of 8.

7

To me, it doesn't seem like it was necessarily a primary design choice to make the fragmentation offset on 8 byte boundaries. Rather, it was a result of the number of bits available to them within the primary design choices of how large the header should be, and how many bits were needed for other fields.

The designers chose the header size to be 20 bytes, and in that 20 bytes, given how they allocated bits for the various fields, they ended up with only 13 bits available for fragment offset.

enter image description here

So that gives 2^13 = 8192 possible offset values. At the same time, the total length field is 16 bits, so technically the max payload size is 2^16 - 20 = 65516 bytes.

Of course the fragment offset field must be able to span the entire spectrum of possible sizes, so 65536 / 8192 = 8.

4

I can think of two advantages to using 8-byte chunks: firstly, having the data aligned on an even boundary might be more efficent in term of the CPU you use. Secondly, you save three bits from the IP header on every IP packet you send, fragemented or not.

The answer to your second part of your question, is that if you send 1482 bytes of data, and it's not the last packet, then you haven't fragmented correctly. You would send 1480 bytes instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.