简体   繁体   中英

IP Fragmentation on Linux

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM