0

I just curiously wanted to know about the question regarding L4, L3 Data Chunks, IP Fragmentation :

  1. Data chunking happened at Layer 4(Transport, TCP), and
  2. 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-

  1. I believe data chunking happening at L4 because of the MTU size limit exceeded, then why there is another process called Fragmentation?

  2. 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)- enter image description here

Any help is greatly appreciated..

  • TCP packetizes a stream of data, but fragmentation works on data that is already in packets. – Ron Maupin Jul 26 at 12:43
2
  • IP fragmentation only supports 64 KB packets, various transport-layer protocol support any stream length
  • fragmentation is very inefficient when packets are lost - the network layer (IP) doesn't even try to recover lost packets or other errors but since no fragment of the packet makes it through the stack the application would need to do a complete retransmission
  • the transport layer can do quite a few things more than simple data chunking, like sub-addressing (ports), stream control, congestion control, error recovery, packet/segment reordering

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.

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).

0

TCP segmentation process is based on MSS (maximum segment size, that is based on the MTU (usually) and can be different for both sides of communication). It is segmentation (right name for this process), not fragmentation. "If data chunking is happening or not, there will be a sequence number for each TCP segment" is not right sentence - if you see sequence number, it is segmentation process. It begins anytime you start send data via TCP sessions, and it does not matter, either application use data portion more than MSS or not - you can see sequence and it is TCP segments.

MSS is based on MTU right now just to avoid IP fragmentation. So idea is put one TCP segment to one IP packet.

IP fragmentation is not based on TCP at all, it based on MTU of the interface and can be used for TCP/UDP/ICMP whatever. It is another path of OSI model. Full IP packet is recreated based on the IP flags (more fragments, offset value).

You can read a lot about this in detail, for example, here https://www.cisco.com/c/en/us/support/docs/ip/generic-routing-encapsulation-gre/25885-pmtud-ipfrag.html

  • Thanks alot for your response ! I am glad to see... your answer clarifies some of my confusions.. still had a confusion...please confirm.. May I understand TCP Segmentation & IP Fragmentation both will not happen according to MTU? Anyone will happen for packet split at sender side.. and reassembles at receiver side with the same process(Segmentation/Fragmentation) – Thulasi Veggalam Jul 26 at 10:52
  • All processes are defined in RFC and both sides of communication needs to follow right instructions. If we imagine situation when one side propose MSS in SYN packet and other side just ignore it, it can lead us to disaster. Or maybe I understand you wrong and you tried to ask something else? – Konstantin Goncharenko Jul 26 at 11:07
  • Yes...Sir.. whichever the process, we follow in Tx.. must be followed in Rx as well.. agreed.. But the confusion is.. assume data streamed from the buffers got processed as TCP segmentation happened at Transport layer.. Do you think further IP fragmentation too happens in the next layer(Network) ? Please share your views.. – Thulasi Veggalam Jul 26 at 11:19
  • If TCP segmentation works fine (MSS is right corresponding to MTU), IP fragmentation is not needed and does not occur. It is a reason why MSS depends on MTU. IP fragmentation needs in the non-common situation, when protocol/application does not aware about MTU at all. – Konstantin Goncharenko Jul 26 at 11:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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