rtbrick / bngblaster

The BNG Blaster is an open-source network tester for access and routing protocols.
https://rtbrick.github.io/bngblaster/
BSD 3-Clause "New" or "Revised" License
210 stars 34 forks source link

fragmentation-reassembly #286

Closed GIC-de closed 4 weeks ago

GIC-de commented 1 month ago

This merge request introduces support for the optional reassembly of fragmented IPv4 traffic streams. The reassembly feature is currently limited to access and network interfaces and is designed specifically for BBL stream traffic. This enhancement improves the handling of fragmented packets, ensuring proper reconstruction and processing.

The following configuration is necessary to enable the reassembly of fragmented IPv4 traffic streams:

 {
    "traffic": {
        "reassemble-fragments": true
    }
 }

The stream-info command has been updated accordingly. A new field, rx-fragments, tracks the number of fragments used to reconstruct a packet, with a minimum value of 2, as fragmented packets consist of at least two fragments. Typically, this value ranges between 2 and 3. Another field, rx-fragment-offset, represents the largest offset value among all fragments. This value, plus the size of the IPv4 header, should always be less than or equal to the configured MTU.

$ sudo bngblaster-cli run.sock stream-info flow-id 3
{
    "status": "ok",
    "code": 200,
    "stream-info": {
        "flow-id": 3,
...
        "rx-fragments": 2,
        "rx-fragment-offset": 1472,  <<<< 1472 + 20 byte IPv4 header == 1492 (MTU)
...
    }
}