841 views

2 Answers

2 votes
2 votes
Segmentation and Fragmentation, both are two different, phenomena. Fragmentation takes place in the network layers (Layer 3 of TCP), and segmentation takes place in the application Layer (Layer 4 in TCP).
edited by
1 votes
1 votes

IP fragmentation occurs at Layer 3 (IP) and that TCP segmentation occurs at Layer 4 (TCP)IP Fragmentation takes place when packets that are larger than the Maximum Transmission Unit (MTU) of an interface  are sent out this interface. These packets will have to be either fragmented, or discarded when they are sent out the interface. If the Don’t Fragment (DF) bit is not set in the IP header of the packet, the packet will be fragmented. If the DF bit is set in the IP header of the packet, the packet is dropped and an ICMP error message indicating the next-hop MTU value will be returned to the sender. All the fragments of an IP packet carry the same Ident in the IP  header, this allows the final receiver to reassemble the fragments into the original IP packet. Please see Resolve IP Fragmentation, MTU, MSS, and PMTUD Issues with GRE and IPSEC for more information.   TCP Segmentation takes place when when an application on an end station is sending data. The application data is broken into what TCP considers the best-sized chunks to send. This unit of data passed from TCP to IP is called a segment. TCP segments are sent in IP datagrams. These IP datagrams can then become IP Fragments as they pass through the network and encounter lower MTU links than they can fit through.

   TCP will first segment this data into TCP segments (based on TCP MSS value) and will add the TCP header and pass this TCP segment to IP. Then IP will add an IP header to send the packet to the remote end host. If the IP packet with the TCP segment is larger than the IP MTUon an outgoing interface on the path between the TCP hosts then IP will fragment the the IP/TCP packet in order to fit. These IP packet fragments will be reassembled on the remote host by the IP layer and the complete TCP segment (that was originally sent) will be handed to the TCP layer. The TCP layer has no idea that IP had fragmented the packet during transit. NAT can deal with IP fragments but it does not deal with TCP Segments.

Related questions

0 votes
0 votes
2 answers
1
admin asked Oct 26, 2019
949 views
Explain the difference between internal fragmentation and external fragmentation. Which one occurs in paging systems? Which one occurs in systems using pure segmentation?...
1 votes
1 votes
1 answer
2
rayhanrjt asked Dec 13, 2022
569 views
Suppose a 22-byte packet is to be transmitted through a network of MTU = 3byte. The elementary fragment size is 1 byte. Show the segment numbering of the above packet. Pa...