|
|
Subscribe / Log in / New account

So you think you understand IP fragmentation?

So you think you understand IP fragmentation?

Posted Feb 7, 2024 22:04 UTC (Wed) by shemminger (subscriber, #5739)
In reply to: So you think you understand IP fragmentation? by Cyberax
Parent article: So you think you understand IP fragmentation?

Truncated packets will cause checksum and other errors.
And truncated packets show up as other types of errors in counters.


to post comments

So you think you understand IP fragmentation?

Posted Feb 7, 2024 22:07 UTC (Wed) by Cyberax (✭ supporter ✭, #52523) [Link]

That's kinda the idea. Maybe also add a flag "packet intentionally truncated due to MTU overflow" to make sure stats can be easily broken down by truncation type.

So you think you understand IP fragmentation?

Posted Feb 7, 2024 23:04 UTC (Wed) by jengelh (subscriber, #33263) [Link] (3 responses)

>Truncated packets will cause checksum errors

And it so happens IPv6 has done away with not only (v4-style auto)fragmentation, but also with the IP-level checksum, so YMMV.

So you think you understand IP fragmentation?

Posted Feb 8, 2024 0:44 UTC (Thu) by pizza (subscriber, #46) [Link] (2 responses)

> And it so happens IPv6 has done away with not only (v4-style auto)fragmentation, but also with the IP-level checksum, so YMMV.

Unless you truncate the IPv6 packet smaller than its header length, truncating the IPv6 packet isn't going to cause processing problems.

Meanwhile, the IP payload (eg TCP or UDP) already provides its own checksum that will fail if it gets truncated.

Either way, truncating the packet isn't going to allow the application to receive garbage data.

So you think you understand IP fragmentation?

Posted Feb 9, 2024 13:52 UTC (Fri) by smurf (subscriber, #17840) [Link] (1 responses)

No, the checksum will not always fail. The checksum protects against one-bit changes and similar shenanigans. It's not safe for truncation. One in 65536 truncated packets will pass the checksum test. That's way too much for a protocol that's supposed to be reliable.

However, the UDP header also contains … surprise … a length. As long as you don't send IPv6 jumbograms (length word: zero) you're thus still safe there.

So you think you understand IP fragmentation?

Posted Feb 9, 2024 14:20 UTC (Fri) by farnz (subscriber, #17727) [Link]

Even IPv6 jumbograms have a length field, in the Jumbo Payload hop-by-hop header. This is a 32-bit number instead of a 16 bit number, but if you have the full IPv6 header, you'll get a length field to work with (either 16 bits, if not jumbo-sized, or 32 if jumbo-sized).


Copyright © 2024, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds