Open In App

Fragmentation at Network Layer

Prerequisite – IPv4 Datagram Fragmentation and Delays 

Fragmentation is done by the network layer when the maximum size of datagram is greater than maximum size of data that can be held in a frame i.e., its Maximum Transmission Unit (MTU). The network layer divides the datagram received from the transport layer into fragments so that data flow is not disrupted. 
 



the need of Fragmentation at Network Layer:

Fragmentation at the Network Layer is a process of dividing a large data packet into smaller pieces, known as fragments, to improve the efficiency of data transmission over a network. The need for fragmentation at the network layer arises from several factors:

1.Maximum Transmission Unit (MTU): Different networks have different Maximum Transmission Unit (MTU) sizes, which determine the maximum size of a data packet that can be transmitted over that network. If the size of a data packet exceeds the MTU, it needs to be fragmented into smaller fragments that can be transmitted over the network.



2.Network Performance: Large data packets can consume a significant amount of network resources and can cause congestion in the network. Fragmentation helps to reduce the impact of large data packets on network performance by breaking them down into smaller fragments that can be transmitted more efficiently.

3.Bandwidth Utilization: Large data packets may consume a significant amount of network bandwidth, causing other network traffic to be slowed down. Fragmentation helps to reduce the impact of large data packets on network bandwidth utilization by breaking them down into smaller fragments that can be transmitted more efficiently.

Fragmentation at the network layer is necessary in order to ensure efficient and reliable transmission of data over communication networks.

1.Large Packet Size: In some cases, the size of the packet to be transmitted may be too large for the underlying communication network to handle. Fragmentation at the network layer allows the large packet to be divided into smaller fragments that can be transmitted over the network.

2.Path MTU: The Maximum Transmission Unit (MTU) of a network defines the largest packet size that can be transmitted over the network. Fragmentation at the network layer allows the packet to be divided into smaller fragments that can be transmitted over networks with different MTU values.

3.Reliable Transmission: Fragmentation at the network layer increases the reliability of data transmission, as smaller fragments are less likely to be lost or corrupted during transmission.

Fields in IP header for fragmentation –

Reassembly of Fragments –

It takes place only at the destination and not at routers since packets take an independent path(datagram packet switching), so all may not meet at a router and hence a need of fragmentation may arise again. The fragments may arrive out of order also. 

 

 

Algorithm –

  1. Destination should identify that datagram is fragmented from MF, Fragment offset field.
  2. Destination should identify all fragments belonging to same datagram from Identification field.
  3. Identify the 1st fragment(offset = 0).
  4. Identify subsequent fragments using header length, fragment offset.
  5. Repeat until MF = 0.

Efficiency –

Efficiency (e) = useful/total = (Data without header)/(Data with header) 

Throughput = e * B { where B is bottleneck bandwidth } 

  Example – An IP router with a Maximum Transmission Unit (MTU) of 200 bytes has received an IP packet of size 520 bytes with an IP header of length 20 bytes. The values of the relevant fields in the IP header. 

Explanation – Since MTU is 200 bytes and 20 bytes is header size so, the maximum length of data = 180 bytes but it can’t be represented in fragment offset since it is not divisible by 8 so, the maximum length of data feasible = 176 bytes. 
Number of fragments = (520/200) = 3. 
Header length = 5 (since scaling factor is 4 therefore, 20/4 = 5) 
Efficiency, e = (Data without header)/(Data with header) = 500/560 = 89.2 % 

 

  

GATE Practice question – 

  1. GATE CS 2013 | Question 65
  2. GATE-CS-2014-(Set-3) | Question 38
  3. GATE-CS-2015 (Set 2) | Question 65
  4. GATE-CS-2016 (Set 1) | Question 63
  5. GATE CS 2018 | Question 37 
     
Article Tags :