Raw Socket Packet Fragmentation

If I use raw sockets to send a 3000 byte UDP packet, do I need to handle packet fragmentation in the code myself, or if the fragment fragment of the raw descriptor looks like a DGRAM socket?

+3
source share
4 answers

Well, if you use UDP, you really do not send RAW. RAW will not be IP at all, and in that case, yes you will have to handle the fragmentation yourself.

With UDP, you get IP fragmentation support, which is IMHO good enough for short-range networks where collisions should be minimal. Make the connection between the two systems of the dedicated subnet, and this is not a problem.

, TCP UDP ( ), - , - . UDP, , . , , , , .

+5

, . , . UDP .

+2

, IP, - . , DF ( ), .

+2

-. , Linux MTU (EMSGSIZE), - , () MTU.

"raw" - , ? DF ( IP), .

, DF-, , , PMTU, - . DF, () () .

0
source

Source: https://habr.com/ru/post/1775011/


All Articles