3

I have an IP packet of header length of 20 Bytes and data length of 4096 Bytes. The maximum transfer unit of the network is only 1500 Bytes. As I understand fragmentation, the fragmented packet will look like below.

FRAGMENT 1 will carry 0-1499 Bytes of data.

FRAGMENT 2 will carry 1500-2999 Bytes of data

FRAGMENT 3 will carry 3000 - 4096 Bytes of data

The fragment offset field values should be as below.

FRAGMENT 1 - 0/8 = 0;

FRAGMENT 2 - 1500/8 = 187.5 (Does this means that we will add 4 Bytes of padding and set the fragment offset field as 188? From my understanding of networking, this should be obvious way to do it but I can't seem to find any info on Google to support this.)

FRAGMENT 3 = 3000/8 = 375.

Any suggestions would be appreciated.

Ladadadada
  • 25,847
  • 7
  • 57
  • 90
liv2hak
  • 303
  • 4
  • 13
  • 25
  • Well, one thing that's definitely off is that the MTU has to include the IP header as well as the data. Each packet has an IP header that cuts into how much data it can carry. – David Schwartz Mar 12 '12 at 02:20
  • I just noticed that the title of your question doesn't seem to relate to the body of your question at all. What does the body of your question have to do with "irregular boundaries"? – David Schwartz Mar 12 '12 at 04:37

1 Answers1

2

There are no guarantees as to exactly where the fragmentation boundaries will be. It's even allowed to have "the same bytes" in the tail-end of one fragment as well as in the beginning of the following fragment ("following" is in increasing position of the fragment as compared to the unfragmented original, not necessarily in on-the-wire time order).

Vatine
  • 5,390
  • 23
  • 24