Fragmentation In Networking

Nikhil Narayanan
2 min readJun 28, 2020

--

To communicate processes in two different machines in different locations needs to follow the TCP/IP stack rules to successfully establish a connection. As we are aware there are 5 layers in TCP/IP stack, Fragmentation comes in the Network Layer of the stack.

Network Layer does the function of routing the packets based on the source and destination IP address. This is achieved by encapsulating an additional IP header details to the Segment which is passed down from the Transport Layer. Fragmentation means splitting the packet or frames based on the Maximum Transfer Unit (MTU) of the NIC.

Maximum size of a frame supported through ethernet is 1500 bytes. If higher level protocols creates large packet size and when this packet is transmitted, this needs to be fragmented to properly transmit through Routers. For example, if our packets travel through a low MTU network, then the packet needs to be fragmented and transmitted to destination. This fragmentation is happening on Packets and is performed by Routers.

A router keeps track of the MTU’s for it’s corresponding interfaces and this is how Fragmentation is done by Router. Router does Fragmentation, but it is not involved in reassembling the packets. This needs to be taken care by the destination device.

When we talk about Fragmentation, we need to consider few things. While we are fragmenting, we are again adding a TCP header and IP header on to the packet, which means addition 40 bytes. So we have only 1460 bytes for data. This is considered inefficient. To overcome this, there is something called as TCP MSS (Maximum Segment Size). This will adjust the size, before Packet reaching the Datalink Layer.

A point to remember here is that MSS announcement is made during the TCP Handshake process through SYN packet saying that I can accept x size of segments. The MSS value does not include the TCP or IP header, rather it includes only data

Hope this article gives you an introduction to Fragmentation. Thank you for reading.

--

--

Nikhil Narayanan
Nikhil Narayanan

Written by Nikhil Narayanan

DevOps Engineer | Python Developer | Machine Learning | Artificial intelligence Enthusiast

No responses yet