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

Question about DHCP Lease Limit in BNG Blaster #292

Open pd1drone opened 1 week ago

pd1drone commented 1 week ago

Hi,

I’m encountering an issue with DHCP leases in my test setup. While I’ve configured BNG Blaster to create 3000 sessions, I can only see 1023 DHCP leases being assigned, despite the fact that the sessions are showing up as 3000.

Here’s a snapshot of the results:

Test Duration: 98s

Sessions            3000 (0 PPPoE / 3000 IPoE)
  Established          0 [                                                            ]
  Outstanding       3000 [##############################################              ]
  Terminated           0 [                                                            ]
  DHCPv4       1023/3000 [#####################                                       ]
  Setup Time           0 ms
  Setup Rate        0.00 CPS (MIN: 0.00 AVG: 0.00 MAX: 0.00)
  Flapped              0

Traffic Flows Verified
  Stream       2046/6000 [#####################                                       ]

Network Interface ( 0000:41:00.0 )
  TX Packets                 189886120 |2019324 PPS    2293952 Kbps 2.294 Gbps
  RX Packets                 170113286 |1880230 PPS    2135941 Kbps 2.136 Gbps
  TX Stream Packets          189886107 |2019324 PPS
  RX Stream Packets          170113283 |1880230 PPS   24526397 Loss (12.601%)
  TX Multicast Packets               0 |      0 PPS

Access Interface ( 0000:41:00.1 )
  TX Packets                 194742444 |2064066 PPS    2476982 Kbps 2.477 Gbps
  RX Packets                  97795144 |1047629 PPS    1257154 Kbps 1.257 Gbps
  TX Stream Packets          194639920 |2063071 PPS
  RX Stream Packets           97784001 |1047629 PPS   92098868 Loss (48.503%)
  RX Multicast Packets               0 |      0 PPS          0 Loss

My Current Configuration:

{
    "interfaces": {
        "io-slots": 32768,
        "links": [
            {
                "interface": "0000:41:00.0",
                "io-mode": "dpdk",
                "rx-threads": 2,
                "rx-cpuset": [0, 2],
                "tx-threads": 2,
                "tx-cpuset": [1, 3]
            },
            {
                "interface": "0000:41:00.1",
                "io-mode": "dpdk",
                "rx-threads": 2,
                "rx-cpuset": [4, 6],
                "tx-threads": 2,
                "tx-cpuset": [5, 7]
            }
        ],
        "network": {
            "interface": "0000:41:00.0",
            "address": "192.168.0.2/24",
            "gateway": "192.168.0.1"
        },
        "access": [
            {
                "interface": "0000:41:00.1",
                "type": "ipoe",
                "gateway-iter": "0.0.0.1",
                "qinq": false,
                "outer-vlan-min": 100,
                "outer-vlan-max": 103,
                "inner-vlan-min": 1,
                "inner-vlan-max": 2000,
                "stream-group-id": 1
            }
        ]
    },
    "dhcp": {
        "enable": true,
        "retry": 100
    },
    "dhcpv6":{
        "enable": false
    },
    "streams": [
        {
            "name": "TestTraffic",
            "stream-group-id": 1,
            "type": "ipv4",
            "direction": "both",
            "bps": 10000000000,
            "pps": 850000
        }
    ],
   "sessions": {
        "count": 3000,
        "max-outstanding": 4000
   },
   "traffic":{
        "stream-delay-calculation": false,
        "stream-rate-calculation": false
   }
}

My questions are:

  1. Is there a built-in DHCP lease limit in BNG Blaster, potentially related to the number of CPU cores or other configuration limits?
  2. Could the issue be due to the DHCP server I'm connecting to, or does it have to do with a limitation within BNG Blaster itself?

It would be helpful to get your insights on whether this is a configuration issue or a limit imposed by BNG Blaster. Also, any advice on how to adjust settings to allow for more DHCP leases would be greatly appreciated.

I also wanted to add that I also tried this without using dpdk and still our of the 3000 sessions only 1023 sessions are granted with dhcp leases.

Thanks for your help!

GIC-de commented 6 days ago

In general, a single traffic flow with 850,000 PPS is not recommended, as each flow is processed by a single thread. Here, you’re attempting to send 5.100.000.000 PPS (850,000 PPS x 2 directions x 3000 sessions), which is excessively high (~4Tbps). Additionally, consider that most NICs use hash-based distribution over multiple hardware receive queues, as they can’t achieve optimal performance on a single queue. With 6000 flows, you should have sufficient distribution, but the rate per flow should be significantly lower.

Also, note that some NICs, like the Intel 700 series, cannot hash double-tagged or PPPoE traffic effectively, whereas single-tagged IPoE should work for most NICs. If you observe one RX core being overloaded while others remain idle, this may indicate the NIC is unable to hash, resulting in all traffic being received in a single queue.

For more details, refer to: https://rtbrick.github.io/bngblaster/performance.html

GIC-de commented 6 days ago

Try with this:

    "streams": [
        {
            "name": "TestTraffic",
            "stream-group-id": 1,
            "type": "ipv4",
            "direction": "both",
            "pps": 100
        }
    ],