suzieq icon indicating copy to clipboard operation
suzieq copied to clipboard

[Bug]: vTep lookup only considers one vip for leaf switches

Open tgupta3 opened this issue 3 years ago • 1 comments

Suzieq version

0.19.1

Install Type

container

Python version

whatever is bundled with your container

Impacted component

multiple components

Steps to Reproduce

  1. Create a leaf spine vxlan topology with border leaf for internet routes. In case of border leaf, it's recommended to use pip rather than vip as the next hop (therefore it will advertise primary ip address of the loopback)
  2. The leaf switch will observe multiple routes pointing to multiple border leaf in this case unlike for leaf to leaf traffic where it observes only one next hop.
  3. When analyzing the path, since the underlay next hop devices are common, only one of the overlay next hop is being chosen, since the next device is key is based on device name and not just the overlay (https://github.com/netenglabs/suzieq/blob/c406675f1055086f87702d0daffda2bb7209928c/suzieq/engines/pandas/path.py#L1078).
  4. Adding overlay as the key doesn't really help since now it will show extra paths that are not possible such as leaf (next hop of border leaf1) -> core1 -> border leaf 2 (not possible since both the leaf are not connected)

Expected Behavior

Expected it to show all possible paths for the initial vtep lookup.

Observed Behavior

Observed only path(s) corresponding to one vtep lookup which makes it seems like traffic is only flowing through one border leaf.

Screenshots

Additional Context

tgupta3 avatar Sep 19 '22 20:09 tgupta3

One example wrong path with overlay key added. Notice how the 2nd and 3rd item overlay changes.

[
    OrderedDict(
        [
            (
                "leaf-sw01/",
                {
                    "iif": "Ethernet1/26",
                    "mtu": 9216,
                    "outMtu": 9216,
                    "overlay": "",
                    "protocol": "bgp",
                    "hopError": [],
                    "lookup": "0.0.0.0/0",
                    "macaddr": None,
                    "vrf": "vrf1",
                    "mtuMatch": True,
                    "is_l2": False,
                    "nhip": "",
                    "overlay_nhip": "",
                    "oif": "Ethernet1/26",
                    "timestamp": Timestamp(
                        "2022-09-16 16:12:49.993000-0700", tz="America/Los_Angeles"
                    ),
                    "l3_visited_devices": {"leaf-sw01vrf1"},
                    "l2_visited_devices": set(),
                },
            )
        ]
    ),
    OrderedDict(
        [
            (
                "rack2-core02/leaf-sw01/10.254.0.243",
                {
                    "iif": "Ethernet1/7",
                    "vrf": "default",
                    "macaddr": None,
                    "overlay": "10.254.0.243",
                    "mtu": 9216,
                    "outMtu": 9216,
                    "mtuMatch": True,
                    "is_l2": True,
                    "nhip": "10.254.0.254",
                    "oif": "Ethernet1/54",
                    "hopError": [],
                    "overlay_nhip": "1.1.1.1",
                    "l3_visited_devices": {"leaf-sw01vrf1"},
                    "l2_visited_devices": {"rack2-core02default"},
                    "lookup": "10.254.0.243",
                    "protocol": "ospf",
                    "timestamp": Timestamp(
                        "2022-09-16 16:12:46.850000-0700", tz="America/Los_Angeles"
                    ),
                },
            )
        ]
    ),
    OrderedDict(
        [
            (
                "rack2-bsw02/rack2-core02/10.254.0.244",
                {
                    "iif": "Ethernet1/54",
                    "vrf": "vrf1",
                    "macaddr": None,
                    "overlay": "10.254.0.244",
                    "mtu": 9216,
                    "outMtu": 9216,
                    "mtuMatch": True,
                    "is_l2": True,
                    "nhip": "10.254.0.242",
                    "oif": "Ethernet2/32",
                    "hopError": [],
                    "overlay_nhip": "1.1.1.1",
                    "l3_visited_devices": {"rack2-bsw02vrf1", "leaf-sw01vrf1"},
                    "l2_visited_devices": {"rack2-core02default"},
                    "timestamp": Timestamp(
                        "2022-09-16 16:12:56.743000-0700", tz="America/Los_Angeles"
                    ),
                    "protocol": "bgp",
                    "lookup": "0.0.0.0/0",
                },
            )
        ]
    ),
    OrderedDict(
        [
            (
                "rack1-fw01/rack2-bsw02/False",
                {
                    "iif": "reth0.530",
                    "vrf": "vrf1",
                    "macaddr": None,
                    "overlay": False,
                    "mtu": 1500,
                    "outMtu": 1500,
                    "mtuMatch": True,
                    "is_l2": False,
                    "nhip": "10.254.2.1",
                    "oif": "Vlan530",
                    "hopError": ["Hop MTU < Src Mtu"],
                    "overlay_nhip": "",
                    "l3_visited_devices": {
                        "rack2-bsw02vrf1",
                        "rack1-fw01vrf1",
                        "leaf-sw01vrf1",
                    },
                    "l2_visited_devices": set(),
                    "timestamp": Timestamp(
                        "2022-09-16 16:12:53.093000-0700", tz="America/Los_Angeles"
                    ),
                    "protocol": "static",
                    "lookup": "0.0.0.0/0",
                },
            )
        ]
    ),
]

tgupta3 avatar Sep 19 '22 21:09 tgupta3