Got it

How do I calculate the fragment offset

Created: Apr 2, 2020 14:56:54Latest reply: Apr 7, 2020 02:36:45 4719 2 0 0 1
  Rewarded HiCoins: 0 (problem resolved)

Hi all,

How do I calculate the fragment offset?

For example:

The data part of a data packet has 3800 bytes (using the fixed header), and the MTU of the interface is 1420 bytes. How do I  calculate the fragment offset? 

The right answer is 0,175,350.

Thanks.


Featured Answers
Popeye_Wang
Admin Created Apr 2, 2020 14:59:17

Hi Sprout,

The fragment offset is the relative position of a fragment in the original packet. The offset unit is 8 bytes. That is, the length of each fragment must be an integral multiple of 8 bytes (64 bits). 

A total of 3800 bytes need to be transmitted, and a maximum of 1400 bytes can be transmitted at a time (because 20 bytes of the fixed IP header need to be added, the MTU=1420 bytes). Therefore, only three times of transmission are required, that is, 1400 bytes + 1400 bytes + 1000 bytes (3800 bytes in total). 

In this way, the fragment offset is 0 during the first transmission. For the second transmission, the offset is 175 (1400/8). For the third transmission, the fragment offset is 2800/8 = 350.


View more
  • x
  • convention:

All Answers

Hi Sprout,

The fragment offset is the relative position of a fragment in the original packet. The offset unit is 8 bytes. That is, the length of each fragment must be an integral multiple of 8 bytes (64 bits). 

A total of 3800 bytes need to be transmitted, and a maximum of 1400 bytes can be transmitted at a time (because 20 bytes of the fixed IP header need to be added, the MTU=1420 bytes). Therefore, only three times of transmission are required, that is, 1400 bytes + 1400 bytes + 1000 bytes (3800 bytes in total). 

In this way, the fragment offset is 0 during the first transmission. For the second transmission, the offset is 175 (1400/8). For the third transmission, the fragment offset is 2800/8 = 350.


View more
  • x
  • convention:

very nice
View more
  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.