1
votes

I have a linux system that sits between 2 routers ( sniffer like ). both routers support Jumbo frames while my system is limited to MTU 1500.

My understanding that Sending router will fragment the Jumbo Frame into IP Datagram based on MTU 1500 and linux will reassemble them according to RFC 815.

Few questions regarding this process :

  1. In Linux, which Layer takes care of the reassembly process ? which file ?

  2. Does this process ( fragmentation and reassembly ) applies to all Layer 3 protocols ( IPv4 \ IPv6 for ex ) ?

  3. Assuming my sniffer constructs a big packet and sends it out, does the fragmentation happens automatically by the linux stack ?

Thanks, Ran

1
Routers do not fragment IPv6 packets. That is one of the features of IPv6 to improve performance. Instead, a host must use PMTUD to send packets that do not need to be fragmented. That can work for IPv4, too. Also, in most modern networking, routers are configured to drop fragments to prevent fragment attacks. Fragmentation and reassembly are costly in terms of resources that are better spent on routing (the primary function of a router).Ron Maupin

1 Answers

1
votes

I can answer some of your questions:

In Linux, which Layer takes care of the reassembly process ? which file ?

It's Layer 3. You can check files reassembly.c and inet_fragment.c. You can look for function fq_find and trace further from there.

Does this process ( fragmentation and reassembly ) applies to all Layer 3 protocols ( IPv4 \ IPv6 for ex ) ?

The code is similar for v4 and v6 and should be the case for all layer 3 protocols.

Assuming my sniffer constructs a big packet and sends it out, does the fragmentation happens automatically by the linux stack ?

I have read about a concept of fragmentation offloading wherein the fragmentation happens at NIC, so it may not be necessary that n/w stack will do fragmentation.