I just curiously wanted to know about the question regarding L4, L3 Data Chunks, IP Fragmentation :
- Data chunking happened at Layer 4(Transport, TCP), and
- Fragmentation at Layer 3(Network, ipv4)
According to Wikipedia, data chunk happens at L4: "Transmission Control Protocol accepts data from a data stream, divides it into chunks, and adds a TCP header creating a TCP segment"
Source: https://en.wikipedia.org/wiki/Transmission_Control_Protocol#TCP_segment_structure
Also, there is fragmentation happening at Layer 3(Network)..
Now there are two questions here-
-
I believe data chunking happening at L4 because of the MTU size limit exceeded, then why there is another process called Fragmentation?
-
If data chunking is happening or not, there will be a sequence number for each TCP segment.. how can a TCP segment associated with each packet fragment in L3 for successful reassembly at receiver side?
Please see picture(for second query)-
Any help is greatly appreciated..
Best Answer
The transport-layer protocol needs to make sure that data can be properly packetized. It it lacks support for that (like UDP), the application layer needs to take care of that.
IP fragmentation in the network layer is an mechanism primarily intended to enable forwarding when the MTU within the path shrinks. It is not intended as the primary sizing mechanism due to its limitations:
Reassembly of fragmented packets happens at the network layer, before data is passed up the stack to the transport-layer protocol.
Not all transport-layer protocols support data segmentation (e.g. UDP doesn't), so datagrams too large for the MTU need to be fragmented or sent with smaller data chunks.
Initially, fragmentation was the strategy to deal with varying MTU sizes across a large network but due to increasing router load and being generally inefficient that has largely been replaced by path MTU discovery. For IPv6, routers do not support fragmentation at all, they drop oversized packets (the sending host may fragment though).