17

Why does one say fragmentation is bad and must be avoided due to performance issues when in reality fragmentation intrinsically occurs within the communication ?

Example: User1 wants to send 100 000 bytes to User2

Maximum MTU size of the network devices connecting the nodes is 1500 bytes.

Maximum MSS size is 1460 bytes in TCP

In the sending process, the 100000 bytes / 1460 => ~70 packets; therefore, segmentation occurs automatically.

What I am missing here ?

Regards

2
  • 2
    Also consider that not every hop has an MTU of 1500, after you divided up the packet up into 70 packet, it may reach an link with an even lower MTU, spliting those 70 packets into 140 packets, and then another reduction in size may split it into 210 packets
    – Ferrybig
    Apr 1, 2021 at 7:38
  • 1
    IP Fragmentation is splitting up those segments further. This not only requires additional cpu for the splitting and produces ip packets without higher level headers, but it also introduces a second reassembly buffer interaction.
    – eckes
    Apr 1, 2021 at 17:28

3 Answers 3

29

Fragmentation is resource intensive in a router, and it slows packet forwarding. Today, we use PMTUD to determine the smallest MTU in the path so that packets are properly sized prior to sending. There are also fragmentation attacks, so many businesses drop fragments.

What you are confusing is something like TCP segmentation, which is very different than fragmentation. Segmentation happens in the source host, not in the routers in the path, so the routers can forward at top speed, rather than pausing to fragment a packet and perform all the necessary calculations and build new packet fragments.


IPv6 has eliminated in-path packet fragmentation. It must use PMTUD to find the smallest MTU in the path and properly size packets prior to sending. This was one of the choices made to speed packet forwarding. See this answer about that.

3
  • Comments are not for extended discussion; this conversation has been moved to chat.
    – Ron Maupin
    Apr 1, 2021 at 23:13
  • MTU discovery adds a round-trip message per server, right? I assume this means initial connections are slower?
    – user541686
    Apr 3, 2021 at 7:10
  • Not necessarily. It starts by sending the data ln the local MTU with the DF bit set. If a packet too big error comes back, the the packet size is shrunk. The details depend on the host OS implementation or application, which is off-topic here. Most things now go out with the DF bit set.
    – Ron Maupin
    Apr 3, 2021 at 23:10
8

IP packet level fragmentation occurs when the transmitting side is not properly aware of the MTU of the path. This results in worse performance than if the packets are sized correctly already at the endpoint.

For example, if the transmitting side of a TCP connection believes the path MTU to be 1500 bytes, it will send packets of that size. If the real path MTU is 1400 bytes, they will get fragmented at the router to a 1396 byte packet and a 104+headers = 124 byte packet. The overhead of handling twice as many packets can be significant.

Another effect is that if one fragment of a packet gets lost, all fragments have to be retransmitted.

0
7

IP fragmentation can cause excessive retransmission at the TCP level.

TCP transmits information as a series of segments, and these are the units of acknowledgement and retransmission as well. If a TCP segment is lost in the network, the entire segment has to be retransmitted.

If IP fragmentation occurs, the segment will be split into multiple fragments. The receiving system can't acknowledge a segment until it receives all its fragments.

This means that if a single fragment is lost, the entire segment that it was a part of will need to be retransmitted. To avoid this potential problem, TCP tries to size its segments so they will not need to be fragmented. That way, if a packet is lost, only that packet will have to be retransmitted.

Retransmission generally has a dramatic impact on TCP throughput. The design of TCP assumes that packet loss is usually due to network congestion, and the way to avoid this is to reduce the amount of network bandwidth being used, i.e. slow down transmission. So when segments are lost, we have to resend them (using more network resources) and we slow down. These are both detrimental, so we try to minimize the amount of retransmission.

Making the segment size equal to the Path MTU (minus the TCP and IP header lengths) makes it less likely that a segment will need to be retransmitted. Imagine that 1 out of 100 packets is lost. If each packet is just one segment, it means we only retransmit 1% of segments. But if fragmentation is causing segments to be split into an average of 5 packets, we'll retransmit 5% of segments.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.