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

Traffic flows are associated with the member interfaces of non-active lag interface. #247

Closed ArunPrakashThangaraj closed 4 months ago

ArunPrakashThangaraj commented 5 months ago

Describe the bug

Traffic flows are associated with the member interfaces of non-active lag interface.

To Reproduce

Run http redirect vrf suite

Version (bngblaster -v):

supervisor@SN-STD-27-119820607:~ $ bngblaster -v
Version: 0.8.43
Compiler: GNU (11.4.0)
IO Modes: packet_mmap_raw (default), packet_mmap, raw
supervisor@SN-STD-27-119820607:~ $ 

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. Run HTTP redirect suite.

Expected behavior

Traffic flows should be associated with the member interfaces of active lag.

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

supervisor@SN-STD-27-119820607:/var/bngblaster/demo_ipoe_subscribers $ sudo bngblaster-cli run.sock streams-pending { "status": "ok", "code": 200, "streams-pending": [ 3, 15, 27, 39, 51 ] }

supervisor@SN-STD-27-119820607:/var/bngblaster/demo_ipoe_subscribers $ sudo bngblaster-cli run.sock stream-info flow-id 3 debug True { "status": "ok", "code": 200, "stream-info": { "flow-id": 3, "name": "session-ipv6", "type": "unicast", "sub-type": "ipv6", "direction": "upstream", "enabled": false, "active": true, "verified": false, "source-address": "fc55:100:1:1::29", "source-port": 65056, "destination-address": "fc66:1337:7331::2", "destination-port": 65056, "protocol": "udp", "tx-interface": "lag1", "rx-interface": "SN-19-RR", "rx-first-seq": 0, "rx-last-seq": 0, "rx-tos-tc": 0, "rx-outer-vlan-pbit": 0, "rx-inner-vlan-pbit": 0, "rx-len": 0, "tx-len": 118, "tx-packets": 0, "tx-bytes": 0, "rx-packets": 0, "rx-bytes": 0, "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": 2851936, "rx-first-epoch": 2851936, "rx-last-epoch": 2851940, "session-id": 1, "session-version": 60, "session-traffic": true, "lag-member-interface": "SN-11-C2", "lag-member-interface-state": "Down", "global-traffic": true, "init-phase": false, "nat": false, "reset": true, "lag": true, "tx-interface-state": "Up", "tx-packets-real": 8, "tx-seq": 5, "max-packets": 0, "bucket": 932596, "tokens": 0 } } supervisor@SN-STD-27-119820607:/var/bngblaster/demo_ipoe_subscribers $ sudo bngblaster-cli run.sock stream-info flow-id 27 debug True { "status": "ok", "code": 200, "stream-info": { "flow-id": 27, "name": "session-ipv6", "type": "unicast", "sub-type": "ipv6", "direction": "upstream", "enabled": false, "active": true, "verified": false, "source-address": "fc55:100:1:1::2c", "source-port": 65056, "destination-address": "fc66:1337:7331::2", "destination-port": 65056, "protocol": "udp", "tx-interface": "lag1", "rx-interface": "SN-19-RR", "rx-first-seq": 0, "rx-last-seq": 0, "rx-tos-tc": 0, "rx-outer-vlan-pbit": 0, "rx-inner-vlan-pbit": 0, "rx-len": 0, "tx-len": 118, "tx-packets": 0, "tx-bytes": 0, "rx-packets": 0, "rx-bytes": 0, "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": 2851936, "rx-first-epoch": 2851936, "rx-last-epoch": 2851940, "session-id": 5, "session-version": 60, "session-traffic": true, "lag-member-interface": "SN-11-C2", "lag-member-interface-state": "Down", "global-traffic": true, "init-phase": false, "nat": false, "reset": true, "lag": true, "tx-interface-state": "Up", "tx-packets-real": 8, "tx-seq": 5, "max-packets": 0, "bucket": 1000827, "tokens": 0 } } supervisor@SN-STD-27-119820607:/var/bngblaster/demo_ipoe_subscribers $ sudo bngblaster-cli run.sock stream-info flow-id 39 debug True { "status": "ok", "code": 200, "stream-info": { "flow-id": 39, "name": "session-ipv6", "type": "unicast", "sub-type": "ipv6", "direction": "upstream", "enabled": false, "active": true, "verified": false, "source-address": "fc55:100:1:1::2d", "source-port": 65056, "destination-address": "fc66:1337:7331::2", "destination-port": 65056, "protocol": "udp", "tx-interface": "lag1", "rx-interface": "SN-19-RR", "rx-first-seq": 0, "rx-last-seq": 0, "rx-tos-tc": 0, "rx-outer-vlan-pbit": 0, "rx-inner-vlan-pbit": 0, "rx-len": 0, "tx-len": 118, "tx-packets": 0, "tx-bytes": 0, "rx-packets": 0, "rx-bytes": 0, "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": 2851936, "rx-first-epoch": 2851936, "rx-last-epoch": 2851940, "session-id": 7, "session-version": 60, "session-traffic": true, "lag-member-interface": "SN-11-C2", "lag-member-interface-state": "Down", "global-traffic": true, "init-phase": false, "nat": false, "reset": true, "lag": true, "tx-interface-state": "Up", "tx-packets-real": 8, "tx-seq": 5, "max-packets": 0, "bucket": 1009401, "tokens": 0 } } supervisor@SN-STD-27-119820607:/var/bngblaster/demo_ipoe_subscribers $ supervisor@SN-STD-27-119820607:/var/bngblaster/demo_ipoe_subscribers $ supervisor@SN-STD-27-119820607:/var/bngblaster/demo_ipoe_subscribers $ sudo bngblaster-cli run.sock stream-info flow-id 51 debug True { "status": "ok", "code": 200, "stream-info": { "flow-id": 51, "name": "session-ipv6", "type": "unicast", "sub-type": "ipv6", "direction": "upstream", "enabled": false, "active": true, "verified": false, "source-address": "fc55:100:1:1::2b", "source-port": 65056, "destination-address": "fc66:1337:7331::2", "destination-port": 65056, "protocol": "udp", "tx-interface": "lag1", "rx-interface": "SN-19-RR", "rx-first-seq": 0, "rx-last-seq": 0, "rx-tos-tc": 0, "rx-outer-vlan-pbit": 0, "rx-inner-vlan-pbit": 0, "rx-len": 0, "tx-len": 118, "tx-packets": 0, "tx-bytes": 0, "rx-packets": 0, "rx-bytes": 0, "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": 2851936, "rx-first-epoch": 2851936, "rx-last-epoch": 2851941, "session-id": 9, "session-version": 60, "session-traffic": true, "lag-member-interface": "SN-11-C2", "lag-member-interface-state": "Down", "global-traffic": true, "init-phase": false, "nat": false, "reset": true, "lag": true, "tx-interface-state": "Up", "tx-packets-real": 8, "tx-seq": 5, "max-packets": 0, "bucket": 1014010, "tokens": 0 } } supervisor@SN-STD-27-119820607:/var/bngblaster/demo_ipoe_subscribers $

GIC-de commented 4 months ago

Fixed with 0.8.45