Ipv4 fragmentation number of bytes not in multiple of 8

  • Context: Comp Sci 
  • Thread starter Thread starter shivajikobardan
  • Start date Start date
  • Tags Tags
    bytes Multiple
Click For Summary

Discussion Overview

The discussion revolves around the concept of IPv4 fragmentation, specifically addressing how to handle packet sizes that are not multiples of 8 bytes. Participants explore the implications of fragmentation on packet structure, including the total length and data portions of the packets.

Discussion Character

  • Exploratory
  • Technical explanation
  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • One participant questions whether the total length of a packet (P1) must be divisible by 8 or if only the data portion needs to meet this criterion.
  • Another participant raises concerns about how to handle cases where the data size is not divisible by 8, suggesting adjustments to the packet sizes.
  • There is a proposal to adjust the sizes of the packets to ensure compliance with the divisibility requirement, but uncertainty remains about how to handle the last packet's size.
  • A participant references external resources for further clarification on fragmentation and reassembly, indicating that the material may be challenging to understand.
  • Another participant encourages the original poster, suggesting that encountering challenging material is a sign of learning and growth.

Areas of Agreement / Disagreement

Participants express differing levels of understanding regarding the fragmentation rules and how to apply them, with no consensus reached on the correct interpretation of the requirements for packet sizes.

Contextual Notes

Participants express uncertainty about the implications of packet sizes not being divisible by 8 and how to adjust them accordingly. There is also mention of external resources that may not be accessible to all participants.

Who May Find This Useful

This discussion may be useful for individuals seeking to understand IPv4 fragmentation, particularly those grappling with the technical details of packet structure and size requirements.

shivajikobardan
Messages
637
Reaction score
54
Homework Statement
What should we do if the number of bytes to be transferred are not in multiples of eight in ipv4?
Relevant Equations
ipv4 header
Theory that I am trying to understand-:

s6zSUxOoKSLCjZx18cPGSRYDSSUKZKh-JOq0RYAa-TTmDb_vfQ.png

So i found a question that is relevant to this-:
->a total of 1440 bytes that is routed through an interface with MTU of 576 bytes. Calculate flag, fragmented offset, total length and data transmitted in each packet after fragmentation. Assume IP header to be 20 bytes.

Solution-:

1440=20+1420

MTU is 576.
Number of fragments=1420/576=3

So let’s call 3 packets P1,P2,P3.

P1=>20+556
P2=>20+556
P3=>20+308

So I am trying to understand what the above picture is trying to say.

There are 2 cases-:
-> Is it trying to say that total length of P1 should be divisible by 8?

-> Is it trying to say that “only data” part should be divisible by 8?

I have even further questions about it.

->Say, the total length of P1 should be divisible by 8. What will we do if it is not?

->(I believe) Say the “only data” part should be divisible by 8, then what should we do as neither 556 nor 308 is divided by 8.

So say I reiterate and do this arrangement(I believe this is correct way)-:
P1->20+552
P2>20+552
P3->20+316

Still 316 isn’t divisible by 8, what should I do now?

i don't understand the solution that is written in the picture that i attested above. how can we use that solution to our case?

IRRESPECTIVE OF WHATEVER I WROTE,if you want,YOU CAN EXPLAIN LIKE I AM BEGINNER TO ALL THESE
 
Physics news on Phys.org
Tom.G said:
A rather detailed explanation/example can be found at:
https://en.wikipedia.org/wiki/IPv4#Fragmentation_and_reassembly
See especially REASSEMBLY.
wikipedia feels slightly above my level of understanding. i don't find it that simple. anyway i will try reading that. it would be nice if you would help me with this case.
 
Well, slightly above is good, it means your view is enlarging and you are learning something!

See also the sentence immediately above the REASSEMBLY heading that reads:
The last offset and last data size are used to calculate the total data size

That implies that any leftover room in the last octet is to be considered irrelevant and should be ignored.

Cheers,
Tom
 
  • Like
Likes   Reactions: shivajikobardan

Similar threads

  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
1
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 177 ·
6
Replies
177
Views
31K
  • · Replies 5 ·
Replies
5
Views
4K