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

ISIS: DIS system id in the hello packet is not correct when the neighbor is the DIS #275

Closed DivyaBharathiS closed 2 months ago

DivyaBharathiS commented 2 months ago

Describe the bug

Topology:

R1 ---- R2 ----- Bngblaster LAN LAN

System ID of R1, R2 and Bngblaster being 1921.6800.1001, 1921.6800.1002, 1921.6800.1003 respectively

Between R1 and R2 - LAN ID is 1921.6800.1002.01 Between R2 and Bngblaster - LAN ID is 1921.6800.1002.02

Before R2 declares the DIS to be 1921.6800.1002.02, bngblaster on neighbor seen case, it is updating DIS as 1921.6800.1002.01 and it is never getting updated to 1921.6800.1002.02 in the hello message

To Reproduce

sudo bngblaster -v
Version: 0.9.5
Compiler: GNU (11.4.0)
IO Modes: packet_mmap_raw (default), packet_mmap, raw

JSON configuration:

    "interfaces": {
        "tx-interval": 1,
        "rx-interval": 1,
        "io-slots": 4096,
        "network": [
            {
                "interface": "SN-5-B2",
                "address": "23.1.1.3/24",
                "gateway": "23.1.1.2",
                "address-ipv6": "23:1:1::3/64",
                "gateway-ipv6": "23:1:1::2",
                "isis-instance-id": 1,
                "isis-level": 1,
        "isis-p2p": false
            }
        ]
    },
    "isis": [
        {
            "instance-id": 1,
            "area": [
                "49.0001/24"
            ],
            "system-id": "1921.6800.1003",
            "router-id": "192.1.1.3",
            "hostname": "BBL1",
            "hello-padding": true,
            "sr-base": 70000,
            "sr-range": 3000,
            "sr-node-sid": 7002,
            "teardown-time": 15,
            "lsp-tx-interval": 5,
            "lsp-tx-window-size": 5,
            "external": {
                "connections": [
                    {
                        "system-id": "0100.1000.0000.00",
                        "l1-metric": 10
                    }
                ]
            }
        }
    ]
}

Steps to reproduce the behavior:

  1. Configure ISIS with interface type broadcast between R1 and R2, R2 and Bngblaster. Configure R2's interface prioirity to be higher than R1 and Bngblaster
  2. Verify isis neighbor is up between R1 and R2(R2 being the DIS). DIS ID will be 1921.6800.1002.01 for the LAN between R1 and R2
  3. Enable a capture at R2/Bngblaster and start the bngblaster with isis configuration.
  4. Verify the LAN ISIS Hello packet from Bngblaster and check for the SystemID {Designated IS}: Since R2 has higher priority, DIS ID will be 1921.6800.1002.02 for the LAN between R2 and Bnbglaster. But it is observed that Bngblaster holds 1921.6800.1002.01 has DIS and it is not getting updated to 1921.6800.1002.02 even when bngblaster receives it from R2