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

Counts corresponding to tx/rx remain at zero for one of the flows and this affects the verified count. #244

Closed ArunPrakashThangaraj closed 4 months ago

ArunPrakashThangaraj commented 5 months ago

Describe the bug

Session traffic verified flow-count does not look complete as the tx/rx counts remain at 0.

To Reproduce

The issue is manually not reproducible whereas using the script it always recurs. Steps to reproduce have been shared via email with Chrisitian.

Version (bngblaster -v):


supervisor@SN-STD-27-2802:/var/bngblaster/demo_ipoe_subscribers $ bngblaster -v 
Version: 0.8.41
Compiler: GNU (11.4.0)
IO Modes: packet_mmap_raw (default), packet_mmap, raw
supervisor@SN-STD-27-2802:/var/bngblaster/demo_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",
        "agent-remote-id": "CBNG1.RTBRICK.{session-global}",
        "outer-vlan-min": 1001,
        "outer-vlan-max": 2000,
        "inner-vlan-min": 1001,
        "inner-vlan-max": 1100,
        "http-client-group-id": 1
      },
      {
        "interface": "lag11",
        "type": "ipoe",
        "agent-remote-id": "CBNG2.RTBRICK.{session-global}",
        "outer-vlan-min": 2001,
        "outer-vlan-max": 3000,
        "inner-vlan-min": 1001,
        "inner-vlan-max": 1100,
        "http-client-group-id": 1
      }
    ]
  },
  "http-client": [
    {
      "http-client-group-id": 1,
      "name": "CLIENT-1",
      "url": "blaster.rtbrick.com",
      "destination-ipv4-address": "131.0.0.2",
      "destination-port": 80
    }
  ],
  "http-server": [
    {
      "name": "SERVER",
      "network-interface": "SN-19-RR",
      "ipv4-address": "131.0.0.2",
      "port": 80
    }
  ],
  "sessions": {
    "count": 10,
    "max-outstanding": 800,
    "start-rate": 400,
    "stop-rate": 400
  },
  "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": false
  },
  "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. Shared vial email.

Expected behavior

tx/rx count for all enabled session-traffic flows (ipv4/ipv6/ipv6pd) should get started and verified count should be 6, considering both upstream/downstream flows for each ipv4/ipv6/ipv6pd

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context supervisor@SN-STD-27-2802:/var/bngblaster/demo_ipoe_subscribers $ sudo bngblaster-cli run.sock session-traffic-reset outer-vlan 1001 inner-vlan 1001 { "status": "ok", "code": 200 } supervisor@SN-STD-27-2802:/var/bngblaster/demo_ipoe_subscribers $ sudo bngblaster-cli run.sock session-traffic { "status": "ok", "code": 200, "session-traffic": { "total-flows": 60, "verified-flows": 0 } } supervisor@SN-STD-27-2802:/var/bngblaster/demo_ipoe_subscribers $ sudo bngblaster-cli run.sock session-traffic-enabled outer-vlan 1001 inner-vlan 1001 { "status": "ok", "code": 200 } supervisor@SN-STD-27-2802:/var/bngblaster/demo_ipoe_subscribers $ sudo bngblaster-cli run.sock session-traffic-disabled outer-vlan 1001 inner-vlan 1001 { "status": "ok", "code": 200 } supervisor@SN-STD-27-2802:/var/bngblaster/demo_ipoe_subscribers $ supervisor@SN-STD-27-2802:/var/bngblaster/demo_ipoe_subscribers $ sudo bngblaster-cli run.sock session-traffic { "status": "ok", "code": 200, "session-traffic": { "total-flows": 60, "verified-flows": 5 } } supervisor@SN-STD-27-2802:/var/bngblaster/demo_ipoe_subscribers $

sudo bngblaster-cli run.sock session-info outer-vlan 1001 inner-vlan 1001 { "status": "ok", "code": 200, "session-info": { "type": "ipoe", "session-id": 1, "session-state": "Established", "session-version": 60, "flapped": 8, "interface": "lag1", "outer-vlan": 1001, "inner-vlan": 1001, "mac": "02:00:00:00:00:01", "agent-circuit-id": "0.0.0.0/0.0.0.0 eth 0:1", "agent-remote-id": "CBNG1.RTBRICK.1", "ipv4-address": "11.100.128.42", "ipv4-netmask": "255.255.255.255", "ipv4-gateway": "192.1.0.1", "ipv4-dns1": "10.0.0.3", "ipv4-dns2": "10.0.0.4", "ipv6-prefix": "fc55:100:1:1::2a/128", "ipv6-delegated-prefix": "fc56:100:1:2900::/56", "dhcp-state": "Bound", "dhcp-server": "192.1.0.1", "dhcp-lease-time": 3600, "dhcp-lease-expire": 3451, "dhcp-lease-expire-t1": 1651, "dhcp-lease-expire-t2": 3001, "dhcp-tx": 48, "dhcp-rx": 19, "dhcp-tx-discover": 14, "dhcp-rx-offer": 9, "dhcp-tx-request": 10, "dhcp-rx-ack": 10, "dhcp-rx-nak": 0, "dhcp-tx-release": 24, "dhcpv6-state": "Bound", "dhcpv6-lease-time": 3600, "dhcpv6-lease-expire": 3451, "dhcpv6-lease-expire-t1": 751, "dhcpv6-lease-expire-t2": 1291, "dhcpv6-tx": 24, "dhcpv6-rx": 19, "dhcpv6-tx-solicit": 14, "dhcpv6-rx-advertise": 0, "dhcpv6-tx-request": 0, "dhcpv6-rx-reply": 19, "dhcpv6-tx-renew": 2, "dhcpv6-tx-release": 8, "dhcpv6-dns1": "fc66::3", "dhcpv6-dns2": "fc66::4", "tx-packets": 478, "rx-packets": 743, "rx-fragmented-packets": 0, "tx-bytes": 67884, "rx-bytes": 83763, "tx-accounting-packets": 371, "rx-accounting-packets": 521, "tx-accounting-bytes": 42338, "rx-accounting-bytes": 55734, "tx-arp": 0, "rx-arp": 0, "tx-igmp": 0, "rx-igmp": 0, "tx-icmp": 0, "rx-icmp": 0, "tx-icmpv6": 67, "rx-icmpv6": 139, "session-traffic": { "total-flows": 6, "verified-flows": 5, "downstream-ipv4-flow-id": 2, "downstream-ipv4-tx-packets": 4, "downstream-ipv4-rx-packets": 4, "downstream-ipv4-rx-first-seq": 1, "downstream-ipv4-loss": 0, "downstream-ipv4-wrong-session": 0, "upstream-ipv4-flow-id": 1, "upstream-ipv4-tx-packets": 0, "upstream-ipv4-rx-packets": 0, "upstream-ipv4-rx-first-seq": 0, "upstream-ipv4-loss": 0, "upstream-ipv4-wrong-session": 0, "downstream-ipv6-flow-id": 4, "downstream-ipv6-tx-packets": 4, "downstream-ipv6-rx-packets": 4, "downstream-ipv6-rx-first-seq": 1, "downstream-ipv6-loss": 0, "downstream-ipv6-wrong-session": 0, "upstream-ipv6-flow-id": 3, "upstream-ipv6-tx-packets": 4, "upstream-ipv6-rx-packets": 4, "upstream-ipv6-rx-first-seq": 1, "upstream-ipv6-loss": 0, "upstream-ipv6-wrong-session": 0, "downstream-ipv6pd-flow-id": 6, "downstream-ipv6pd-tx-packets": 4, "downstream-ipv6pd-rx-packets": 4, "downstream-ipv6pd-rx-first-seq": 1, "downstream-ipv6pd-loss": 0, "downstream-ipv6pd-wrong-session": 0, "upstream-ipv6pd-flow-id": 5, "upstream-ipv6pd-tx-packets": 4, "upstream-ipv6pd-rx-packets": 4, "upstream-ipv6pd-rx-first-seq": 1, "upstream-ipv6pd-loss": 0, "upstream-ipv6pd-wrong-session": 0 } } }

sudo bngblaster-cli run.sock stream-info flow-id 2 debug True { "status": "ok", "code": 200, "stream-info": { "flow-id": 2, "name": "session-ipv4", "type": "unicast", "sub-type": "ipv4", "direction": "downstream", "enabled": false, "active": true, "verified": true, "source-address": "131.0.0.2", "source-port": 65056, "destination-address": "11.100.128.42", "destination-port": 65056, "protocol": "udp", "tx-interface": "SN-19-RR", "rx-interface": "lag1", "rx-first-seq": 1, "rx-last-seq": 4, "rx-tos-tc": 0, "rx-outer-vlan-pbit": 0, "rx-inner-vlan-pbit": 0, "rx-len": 94, "tx-len": 90, "tx-packets": 4, "tx-bytes": 360, "rx-packets": 4, "rx-bytes": 376, "rx-loss": 0, "rx-wrong-session": 0, "rx-delay-us-min": 0, "rx-delay-us-max": 0, "rx-pps": 0, "tx-pps": 0, "tx-bps-l2": 0, "rx-bps-l2": 0, "rx-bps-l3": 0, "tx-mbps-l2": 0.0, "rx-mbps-l2": 0.0, "rx-mbps-l3": 0.0, "tx-first-epoch": 32497387, "rx-first-epoch": 32497387, "rx-last-epoch": 32497391, "session-id": 1, "session-version": 60, "session-traffic": true, "global-traffic": true, "init-phase": false, "nat": false, "reset": false, "tx-interface-state": "Up", "tx-packets-real": 149, "max-packets": 0, "bucket": 2586264, "tokens": 0 } }

GIC-de commented 4 months ago

Fixed with 0.8.45

GIC-de commented 4 months ago

Fixed with 0.8.45.