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
202 stars 32 forks source link

Command li-flows does not report downstream flows from BNGs running in HA mode. #239

Closed ArunPrakashThangaraj closed 4 months ago

ArunPrakashThangaraj commented 6 months ago

Describe the bug

Bngblaster command li-flows was found to be not reporting the downstream mirrored flows from one or both BNGs running in HA mode, having IPoE subscribers

To Reproduce

Start a few (say 10) IPoE subscribers with some of them targeted for lawful intercept. 5 subscribers are established on both BNGs and the same are seen in standby state on the other BNG.

Make sure that acl/tunnel/mirror programming is good and also the mirrored flows go out of the BNG towards BNG blaster. Execute the li-flows command on bngblaster & check if all the flows are recorded.

Version (bngblaster -v):

supervisor@SN-STD-27-192083107:/var/bngblaster/ipoe_subscribers $ bngblaster -v
Version: 0.8.39
Compiler: GNU (11.4.0)
IO Modes: packet_mmap_raw (default), packet_mmap, raw
supervisor@SN-STD-27-192083107:/var/bngblaster/ipoe_subscribers $ 

JSON configuration:

{
{
  "interfaces": {
    "tx-interval": 1,
    "rx-interval": 1,
    "lag": [
      {
        "interface": "lag1",
        "lacp": true,
        "lacp-timeout-short": true
      },
      {
        "interface": "lag11",
        "lacp": true,
        "lacp-timeout-short": true
      }
    ],
    "links": [
      {
        "interface": "SN-5-C1",
        "lag-interface": "lag1"
      },
      {
        "interface": "SN-6-C1",
        "lag-interface": "lag1"
      },
      {
        "interface": "SN-7-C1",
        "lag-interface": "lag1"
      },
      {
        "interface": "SN-11-C2",
        "lag-interface": "lag1"
      },
      {
        "interface": "SN-12-C2",
        "lag-interface": "lag1"
      },
      {
        "interface": "SN-13-C2",
        "lag-interface": "lag1"
      },
      {
        "interface": "SN-20-C1",
        "lag-interface": "lag11"
      },
      {
        "interface": "SN-21-C1",
        "lag-interface": "lag11"
      },
      {
        "interface": "SN-22-C1",
        "lag-interface": "lag11"
      },
      {
        "interface": "SN-23-C2",
        "lag-interface": "lag11"
      },
      {
        "interface": "SN-24-C2",
        "lag-interface": "lag11"
      },
      {
        "interface": "SN-25-C2",
        "lag-interface": "lag11"
      }
    ],
    "network": [
      {
        "interface": "SN-19-RR",
        "address": "131.0.0.2/24",
        "gateway": "131.0.0.1",
        "address-ipv6": "fc66:1337:7331::2",
        "gateway-ipv6": "fc66:1337:7331::1",
        "isis-instance-id": 1,
        "isis-level": 1,
        "ldp-instance-id": 1
      }
    ],
    "access": [
      {
        "interface": "lag1",
        "type": "ipoe",
        "outer-vlan-min": 1001,
        "outer-vlan-max": 2000,
        "inner-vlan-min": 1001,
        "inner-vlan-max": 1100
      },
      {
        "interface": "lag11",
        "type": "ipoe",
        "outer-vlan-min": 2001,
        "outer-vlan-max": 3000,
        "inner-vlan-min": 1001,
        "inner-vlan-max": 1100
      }
    ]
  },
  "sessions": {
    "count": 20,
    "max-outstanding": 800,
    "start-rate": 400,
    "stop-rate": 100
  },
  "access-line": {
    "agent-remote-id": "DEU.RTBRICK.{session-global}",
    "agent-circuit-id": "0.0.0.0/0.0.0.0 eth 0:{session-global}",
    "rate-up": 2000,
    "rate-down": 16384,
    "dsl-type": 5
  },
  "dhcp": {
    "enable": true
  },
  "dhcpv6": {
    "ldra": true,
    "enable": true
  },
  "session-traffic": {
    "ipv4-pps": 1,
    "ipv6-pps": 1,
    "ipv6pd-pps": 1,
    "autostart": true
  },
  "ldp": [
    {
      "instance-id": 1,
      "lsr-id": "192.1.0.6",
      "keepalive-time": 30,
      "raw-update-file": "/home/supervisor/ldp_1000.ldp"
    }
  ],
  "isis": [
    {
      "instance-id": 1,
      "area": [
        "49.0002/24"
      ],
      "system-id": "0204.0000.0001",
      "router-id": "192.1.0.6",
      "hostname": "BBL-RR",
      "hello-padding": true,
      "teardown-time": 30,
      "external": {
        "mrt-file": "/home/supervisor/isis_1000.mrt",
        "connections": [
          {
            "system-id": "0300.1001.0001",
            "l1-metric": 10
          }
        ]
      }
    }
  ],
  "bgp": [
    {
      "__comment__": "RR1-C1-IPv4",
      "network-interface": "SN-19-RR",
      "local-ipv4-address": "192.168.0.10",
      "peer-ipv4-address": "192.1.0.1",
      "raw-update-file": "/home/supervisor/ipv4_nlri_nh1.bgp",
      "local-as": 4200000001,
      "peer-as": 4200000001
    },
    {
      "__comment__": "RR1-C1-IPv6",
      "network-interface": "SN-19-RR",
      "local-ipv4-address": "192.168.0.20",
      "peer-ipv4-address": "192.1.0.1",
      "raw-update-file": "/home/supervisor/ipv6_nlri_nh1.bgp",
      "local-as": 4200000001,
      "peer-as": 4200000001
    },
    {
      "__comment__": "RR1-C2-IPv4",
      "network-interface": "SN-19-RR",
      "local-ipv4-address": "192.168.0.10",
      "peer-ipv4-address": "192.1.0.2",
      "raw-update-file": "/home/supervisor/ipv4_nlri_nh1.bgp",
      "local-as": 4200000001,
      "peer-as": 4200000001
    },
    {
      "__comment__": "RR1-C2-IPv6",
      "network-interface": "SN-19-RR",
      "local-ipv4-address": "192.168.0.20",
      "peer-ipv4-address": "192.1.0.2",
      "raw-update-file": "/home/supervisor/ipv6_nlri_nh1.bgp",
      "local-as": 4200000001,
      "peer-as": 4200000001
    },
    {
      "__comment__": "RR2-C1-IPv4",
      "network-interface": "SN-19-RR",
      "local-ipv4-address": "192.168.0.30",
      "peer-ipv4-address": "192.1.0.1",
      "raw-update-file": "/home/supervisor/ipv4_nlri_nh2.bgp",
      "local-as": 4200000001,
      "peer-as": 4200000001
    },
    {
      "__comment__": "RR2-C1-IPv6",
      "network-interface": "SN-19-RR",
      "local-ipv4-address": "192.168.0.40",
      "peer-ipv4-address": "192.1.0.1",
      "raw-update-file": "/home/supervisor/ipv6_nlri_nh2.bgp",
      "local-as": 4200000001,
      "peer-as": 4200000001
    },
    {
      "__comment__": "RR2-C2-IPv4",
      "network-interface": "SN-19-RR",
      "local-ipv4-address": "192.168.0.30",
      "peer-ipv4-address": "192.1.0.2",
      "raw-update-file": "/home/supervisor/ipv4_nlri_nh2.bgp",
      "local-as": 4200000001,
      "peer-as": 4200000001
    },
    {
      "__comment__": "RR2-C2-IPv6",
      "network-interface": "SN-19-RR",
      "local-ipv4-address": "192.168.0.40",
      "peer-ipv4-address": "192.1.0.2",
      "raw-update-file": "/home/supervisor/ipv6_nlri_nh2.bgp",
      "local-as": 4200000001,
      "peer-as": 4200000001
    }
  ]
}
}

Steps to reproduce the behavior:

  1. Start a few (say 10) IPoE subscribers with some of them targeted for lawful intercept. 5 subscribers are established on both BNGs and the same are seen in standby state on the other BNG.

  2. Make sure that acl/tunnel/mirror programming is good and also the mirrored flows go out of the BNG towards BNG blaster. Execute the li-flows command on bngblaster & check if all the flows are recorded.

Expected behavior

All flows including both upstream/downstream should be seen in the output of li-flows command.

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

GIC-de commented 6 months ago

Working Branch: https://github.com/rtbrick/bngblaster/pull/241/files

GIC-de commented 4 months ago

Fixed with 0.8.41!