From 48df64bea6bc8124892c6fb43ff941c52eda57a1 Mon Sep 17 00:00:00 2001 From: Dinesh Dutt Date: Sat, 15 Jul 2023 12:59:43 -0700 Subject: [PATCH 1/3] pandas/engineobj: add a new rtn, in_subnet_series Signed-off-by: Dinesh Dutt --- suzieq/engines/pandas/engineobj.py | 38 ++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/suzieq/engines/pandas/engineobj.py b/suzieq/engines/pandas/engineobj.py index 44b76a38c8..e224613e18 100644 --- a/suzieq/engines/pandas/engineobj.py +++ b/suzieq/engines/pandas/engineobj.py @@ -105,15 +105,15 @@ def _is_any_in_list(self, column: pd.Series, values: List) -> pd.Series: return column.apply(lambda x: any(v in x for v in values)) def _is_in_subnet(self, addr: pd.Series, net: str) -> pd.Series: - """Check if the IP addresses in a Pandas dataframe - belongs to the given subnet + """check which of the addresses belongs to a given subnet + Used to implement the prefix filter of arpnd/address/dhcp Args: - addr (PandasObject): the collection of ip addresses to check - net: (str): network id of the subnet + addr (pd.Series): the pandas series of ip addresses to check + net: (str): the IP network to check the addresses against Returns: - PandasObject: A collection of bool reporting the result + pd.Series: A collection of bool reporting the result """ network = ip_network(net) if isinstance(addr.iloc[0], np.ndarray): @@ -127,6 +127,34 @@ def _is_in_subnet(self, addr: pd.Series, net: str) -> pd.Series: False if not a else ip_address(a.split("/")[0]) in network) ) + def _in_subnet_series(self, addr: str, net: pd.Series) -> pd.Series: + """Check if an addr is in any of series' subnets + + unlike is_in_subnet which checks if a pandas series of addresses + belongs in a given subnet, this routine checks if a given address + belongs to any of the provided pandas series of subnets. THis is + currently used in path to identify an SVI for a given address + + Args: + addr (str): the address we're checking for + net: (pd.Series): the pandas series of subnets + + Returns: + pd.Series: A collection of bool reporting the result + """ + address = ip_address(addr) + if isinstance(net.iloc[0], np.ndarray): + return net.apply(lambda x, network: + False if not x.any() + else any(address in ip_network(a, strict=False) + for a in x if a != '0.0.0.0/0'), + args=(address,)) + else: + return net.apply(lambda a: ( + False if not a or a == '0.0.0.0/0' + else address in ip_network(a, strict=False)) + ) + def _check_ipvers(self, addr: pd.Series, version: int) -> pd.Series: """Check if the IP version of addresses in a Pandas dataframe correspond to the given version From d415b7b19e767239577c66d683a752692fe6d6b3 Mon Sep 17 00:00:00 2001 From: Dinesh Dutt Date: Sat, 15 Jul 2023 13:23:11 -0700 Subject: [PATCH 2/3] Path: Map missing src to SVI If the given source is not found either via the address of a polled device or via the arpnd tables, instead of giving up, see if you can find an SVI and start trace from that SVI. Also hanldes MLAG pairs as the source of the SVI. If there are more than 2 possible sources in this situation, we don't proceed. This can be the case when for example, we have a distributed symmetric EVPN where the same default gateway IP is present on all hosts that support that VNI. Signed-off-by: Dinesh Dutt --- suzieq/engines/pandas/path.py | 58 ++++++++++++++++++++++++++--------- 1 file changed, 44 insertions(+), 14 deletions(-) diff --git a/suzieq/engines/pandas/path.py b/suzieq/engines/pandas/path.py index c315d150ac..fdc03dff72 100644 --- a/suzieq/engines/pandas/path.py +++ b/suzieq/engines/pandas/path.py @@ -1,3 +1,4 @@ +from typing import Optional, List, Any, Iterable from ipaddress import ip_network, ip_address from collections import OrderedDict from itertools import repeat @@ -19,7 +20,7 @@ class PathObj(SqPandasEngine): '''Backend class to handle manipulating virtual table, path, with pandas''' @staticmethod - def table_name(): + def table_name() -> str: '''Table name''' return 'path' @@ -137,7 +138,34 @@ def _init_dfs(self, ns, source, dest): self._srcnode_via_arp = True if self._src_df.empty: - raise AttributeError(f"Invalid src {source}") + # See if we can find an mlag pair of devices that contains the SVI + # pandas has a bug that prevents us from using startswith with a + # tuple such as ("Vlan", "vlan", "irb.") directly instead of using + # the @svi_names trick + # pylint: disable=unused-variable + svi_names = tuple(["Vlan", "vlan", "irb."]) # noqa: F841 + if ':' in source: + self._src_df = ( + self._if_df.query( + f'@self._in_subnet_series("{source}", ip6AddressList)' + ' and ifname.str.startswith(@svi_names)') + ) + else: + self._src_df = ( + self._if_df.query( + f'@self._in_subnet_series("{source}", ipAddressList)' + ' and ifname.str.startswith(@svi_names)') + ) + if not self._src_df.empty: + hosts = self._src_df.hostname.unique().tolist() + if len(hosts) > 2: + raise ValueError( + 'source not in ARP and SVI on too many hosts') + self._srcnode_via_arp = True + + if self._src_df.empty: + raise AttributeError(f"Unable to find starting node for {source}") + src_hostname = self._src_df.hostname.unique().tolist()[0] if self._src_df.hostname.nunique() == 1 and len(self._src_df) > 1: @@ -241,7 +269,7 @@ def _get_vrf(self, hostname: str, ifname: str, addr: str) -> str: return vrf - def _find_fhr_df(self, device: str, ip: str) -> pd.DataFrame: + def _find_fhr_df(self, device: Optional[str], ip: str) -> pd.DataFrame: """Find Firstt Hop Router's iface DF for a given IP and device. The logic in finding the next hop router is: find the arp table entry corresponding to the IP provided; @@ -317,12 +345,12 @@ def _get_if_vlan(self, device: str, ifname: str) -> int: (self._if_df["ifname"] == ifname)] if oif_df.empty: - return [] + return -1 return oif_df.iloc[0]["vlan"] def _get_l2_nexthop(self, device: str, vrf: str, dest: str, - macaddr: str, protocol: str) -> list: + macaddr: Optional[str], protocol: str) -> list: """Get the bridged/tunnel nexthops We're passing protocol because we need to keep the return match the other get nexthop function returns. We don't really @@ -387,7 +415,7 @@ def _get_l2_nexthop(self, device: str, vrf: str, dest: str, def _get_underlay_nexthop(self, hostname: str, vtep_list: list, vrf_list: list, - is_overlay: bool) -> pd.DataFrame: + is_overlay: bool) -> List[Any]: """Return the underlay nexthop given the Vtep and VRF""" # WARNING: This function is incomplete right now @@ -486,7 +514,7 @@ def _handle_recursive_route(self, df: pd.DataFrame, return df def _get_nexthops(self, device: str, vrf: str, dest: str, is_l2: bool, - vtep: str, macaddr: str) -> list: + vtep: str, macaddr: str) -> Iterable: """Get nexthops (oif + IP + overlay) or just oif for given host/vrf. The overlay is a bit indicating we're getting into overlay or not. @@ -612,6 +640,7 @@ def _get_nh_with_peer(self, device: str, vrf: str, dest: str, is_l2: bool, for (nhip, iface, overlay, l2hop, protocol, timestamp) in new_nexthop_list: df = pd.DataFrame() + arpdf = pd.DataFrame() errormsg = '' if l2hop and macaddr and not overlay: if (not nhip or nhip == 'None') and iface: @@ -721,7 +750,7 @@ def _get_nh_with_peer(self, device: str, vrf: str, dest: str, is_l2: bool, 'state!="failed"') if not revarp_df.empty: df = df.query(f'ifname == "{revarp_df.oif.iloc[0]}"') - df.apply(lambda x, nexthops: + df.apply(lambda x, nexthops: # type: ignore nexthops.append((iface, x['hostname'], x['ifname'], overlay, l2hop, nhip, @@ -761,8 +790,8 @@ def get(self, **kwargs) -> pd.DataFrame: if not src or not dest: raise AttributeError("Must specify trace source and dest") - srcvers = ip_network(src, strict=False)._version - dstvers = ip_network(dest, strict=False)._version + srcvers = ip_network(src, strict=False).version + dstvers = ip_network(dest, strict=False).version if srcvers != dstvers: raise AttributeError( "Source and Dest MUST belong to same address familt") @@ -771,7 +800,8 @@ def get(self, **kwargs) -> pd.DataFrame: self._init_dfs(self.namespace, src, dest) devices_iifs = OrderedDict() - src_mtu = None + src_mtu: int = MAX_MTU + 1 + item = None for i in range(len(self._src_df)): item = self._src_df.iloc[i] devices_iifs[f'{item.hostname}/'] = { @@ -793,9 +823,9 @@ def get(self, **kwargs) -> pd.DataFrame: "l3_visited_devices": set(), "l2_visited_devices": set() } - if src_mtu is None or (item.get('mtu', 0) < src_mtu): - src_mtu = item.get('mtu', 0) - if not dvrf: + if (src_mtu > MAX_MTU) or (item.get('mtu', 0) < src_mtu): + src_mtu = item.get('mtu', 0) # type: ignore + if not dvrf and item is not None: dvrf = item['master'] if not dvrf: dvrf = "default" From 4ed54aabeed639e65444dde21652e5587b03ae0c Mon Sep 17 00:00:00 2001 From: Dinesh Dutt Date: Sat, 15 Jul 2023 14:40:56 -0700 Subject: [PATCH 3/3] Updated path tests based on new logic Signed-off-by: Dinesh Dutt --- .../sqcmds/cumulus-samples/path.yml | 112 ++++++++++++- tests/integration/sqcmds/eos-samples/path.yml | 152 +++++++++++++++++- .../integration/sqcmds/junos-samples/path.yml | 43 ++++- .../integration/sqcmds/nxos-samples/path.yml | 151 ++++++++++++++++- 4 files changed, 450 insertions(+), 8 deletions(-) diff --git a/tests/integration/sqcmds/cumulus-samples/path.yml b/tests/integration/sqcmds/cumulus-samples/path.yml index 17dc5aef24..55a6595962 100644 --- a/tests/integration/sqcmds/cumulus-samples/path.yml +++ b/tests/integration/sqcmds/cumulus-samples/path.yml @@ -1959,9 +1959,111 @@ tests: - command: path show --dest=172.16.2.104 --src=172.16.1.104 --namespace=dual-evpn --format=json data-directory: tests/data/parquet/ - error: - error: '[{"error": "ERROR: Invalid src 172.16.1.104"}]' marks: path show cumulus + output: '[{"pathid": 1, "hopCount": 0, "namespace": "dual-evpn", "hostname": "exit01", + "iif": "vlan13", "oif": "swp1", "vrf": "evpn-vrf", "isL2": false, "overlay": false, + "mtuMatch": true, "inMtu": 9000, "outMtu": 9216, "protocol": "kernel", "ipLookup": + "172.16.2.0/24", "vtepLookup": "10.0.0.134", "macLookup": "", "nexthopIp": "169.254.0.1", + "hopError": "", "timestamp": 1616644822008}, {"pathid": 1, "hopCount": 1, "namespace": + "dual-evpn", "hostname": "spine01", "iif": "swp6", "oif": "swp3", "vrf": "default", + "isL2": true, "overlay": true, "mtuMatch": true, "inMtu": 9216, "outMtu": 9216, + "protocol": "bgp", "ipLookup": "10.0.0.134", "vtepLookup": "", "macLookup": null, + "nexthopIp": "", "hopError": "", "timestamp": 1616644822008}, {"pathid": 1, "hopCount": + 2, "namespace": "dual-evpn", "hostname": "leaf03", "iif": "swp1", "oif": "bond02", + "vrf": "default", "isL2": false, "overlay": false, "mtuMatch": false, "inMtu": + 1500, "outMtu": 1500, "protocol": "", "ipLookup": "", "vtepLookup": "", "macLookup": + "", "nexthopIp": "", "hopError": "Dst MTU != Src MTU", "timestamp": 1616644822941}, + {"pathid": 2, "hopCount": 0, "namespace": "dual-evpn", "hostname": "exit02", "iif": + "vlan13", "oif": "swp1", "vrf": "evpn-vrf", "isL2": false, "overlay": false, "mtuMatch": + true, "inMtu": 9000, "outMtu": 9216, "protocol": "kernel", "ipLookup": "172.16.2.0/24", + "vtepLookup": "10.0.0.134", "macLookup": "", "nexthopIp": "169.254.0.1", "hopError": + "", "timestamp": 1616644822167}, {"pathid": 2, "hopCount": 1, "namespace": "dual-evpn", + "hostname": "spine01", "iif": "swp5", "oif": "swp3", "vrf": "default", "isL2": + true, "overlay": true, "mtuMatch": true, "inMtu": 9216, "outMtu": 9216, "protocol": + "bgp", "ipLookup": "10.0.0.134", "vtepLookup": "", "macLookup": null, "nexthopIp": + "", "hopError": "", "timestamp": 1616644822008}, {"pathid": 2, "hopCount": 2, + "namespace": "dual-evpn", "hostname": "leaf03", "iif": "swp1", "oif": "bond02", + "vrf": "default", "isL2": false, "overlay": false, "mtuMatch": false, "inMtu": + 1500, "outMtu": 1500, "protocol": "", "ipLookup": "", "vtepLookup": "", "macLookup": + "", "nexthopIp": "", "hopError": "Dst MTU != Src MTU", "timestamp": 1616644822941}, + {"pathid": 3, "hopCount": 0, "namespace": "dual-evpn", "hostname": "exit01", "iif": + "vlan13", "oif": "swp1", "vrf": "evpn-vrf", "isL2": false, "overlay": false, "mtuMatch": + true, "inMtu": 9000, "outMtu": 9216, "protocol": "kernel", "ipLookup": "172.16.2.0/24", + "vtepLookup": "10.0.0.134", "macLookup": "", "nexthopIp": "169.254.0.1", "hopError": + "", "timestamp": 1616644822008}, {"pathid": 3, "hopCount": 1, "namespace": "dual-evpn", + "hostname": "spine01", "iif": "swp6", "oif": "swp4", "vrf": "default", "isL2": + true, "overlay": true, "mtuMatch": true, "inMtu": 9216, "outMtu": 9216, "protocol": + "bgp", "ipLookup": "10.0.0.134", "vtepLookup": "", "macLookup": null, "nexthopIp": + "", "hopError": "", "timestamp": 1616644822008}, {"pathid": 3, "hopCount": 2, + "namespace": "dual-evpn", "hostname": "leaf04", "iif": "swp1", "oif": "bond02", + "vrf": "default", "isL2": false, "overlay": false, "mtuMatch": false, "inMtu": + 1500, "outMtu": 1500, "protocol": "", "ipLookup": "", "vtepLookup": "", "macLookup": + "", "nexthopIp": "", "hopError": "Dst MTU != Src MTU", "timestamp": 1616644822983}, + {"pathid": 4, "hopCount": 0, "namespace": "dual-evpn", "hostname": "exit02", "iif": + "vlan13", "oif": "swp1", "vrf": "evpn-vrf", "isL2": false, "overlay": false, "mtuMatch": + true, "inMtu": 9000, "outMtu": 9216, "protocol": "kernel", "ipLookup": "172.16.2.0/24", + "vtepLookup": "10.0.0.134", "macLookup": "", "nexthopIp": "169.254.0.1", "hopError": + "", "timestamp": 1616644822167}, {"pathid": 4, "hopCount": 1, "namespace": "dual-evpn", + "hostname": "spine01", "iif": "swp5", "oif": "swp4", "vrf": "default", "isL2": + true, "overlay": true, "mtuMatch": true, "inMtu": 9216, "outMtu": 9216, "protocol": + "bgp", "ipLookup": "10.0.0.134", "vtepLookup": "", "macLookup": null, "nexthopIp": + "", "hopError": "", "timestamp": 1616644822008}, {"pathid": 4, "hopCount": 2, + "namespace": "dual-evpn", "hostname": "leaf04", "iif": "swp1", "oif": "bond02", + "vrf": "default", "isL2": false, "overlay": false, "mtuMatch": false, "inMtu": + 1500, "outMtu": 1500, "protocol": "", "ipLookup": "", "vtepLookup": "", "macLookup": + "", "nexthopIp": "", "hopError": "Dst MTU != Src MTU", "timestamp": 1616644822983}, + {"pathid": 5, "hopCount": 0, "namespace": "dual-evpn", "hostname": "exit01", "iif": + "vlan13", "oif": "swp2", "vrf": "evpn-vrf", "isL2": false, "overlay": false, "mtuMatch": + true, "inMtu": 9000, "outMtu": 9216, "protocol": "kernel", "ipLookup": "172.16.2.0/24", + "vtepLookup": "10.0.0.134", "macLookup": "", "nexthopIp": "169.254.0.1", "hopError": + "", "timestamp": 1616644822008}, {"pathid": 5, "hopCount": 1, "namespace": "dual-evpn", + "hostname": "spine02", "iif": "swp6", "oif": "swp3", "vrf": "default", "isL2": + true, "overlay": true, "mtuMatch": true, "inMtu": 9216, "outMtu": 9216, "protocol": + "bgp", "ipLookup": "10.0.0.134", "vtepLookup": "", "macLookup": null, "nexthopIp": + "", "hopError": "", "timestamp": 1616644822008}, {"pathid": 5, "hopCount": 2, + "namespace": "dual-evpn", "hostname": "leaf03", "iif": "swp2", "oif": "bond02", + "vrf": "default", "isL2": false, "overlay": false, "mtuMatch": false, "inMtu": + 1500, "outMtu": 1500, "protocol": "", "ipLookup": "", "vtepLookup": "", "macLookup": + "", "nexthopIp": "", "hopError": "Dst MTU != Src MTU", "timestamp": 1616644822941}, + {"pathid": 6, "hopCount": 0, "namespace": "dual-evpn", "hostname": "exit02", "iif": + "vlan13", "oif": "swp2", "vrf": "evpn-vrf", "isL2": false, "overlay": false, "mtuMatch": + true, "inMtu": 9000, "outMtu": 9216, "protocol": "kernel", "ipLookup": "172.16.2.0/24", + "vtepLookup": "10.0.0.134", "macLookup": "", "nexthopIp": "169.254.0.1", "hopError": + "", "timestamp": 1616644822167}, {"pathid": 6, "hopCount": 1, "namespace": "dual-evpn", + "hostname": "spine02", "iif": "swp5", "oif": "swp3", "vrf": "default", "isL2": + true, "overlay": true, "mtuMatch": true, "inMtu": 9216, "outMtu": 9216, "protocol": + "bgp", "ipLookup": "10.0.0.134", "vtepLookup": "", "macLookup": null, "nexthopIp": + "", "hopError": "", "timestamp": 1616644822008}, {"pathid": 6, "hopCount": 2, + "namespace": "dual-evpn", "hostname": "leaf03", "iif": "swp2", "oif": "bond02", + "vrf": "default", "isL2": false, "overlay": false, "mtuMatch": false, "inMtu": + 1500, "outMtu": 1500, "protocol": "", "ipLookup": "", "vtepLookup": "", "macLookup": + "", "nexthopIp": "", "hopError": "Dst MTU != Src MTU", "timestamp": 1616644822941}, + {"pathid": 7, "hopCount": 0, "namespace": "dual-evpn", "hostname": "exit01", "iif": + "vlan13", "oif": "swp2", "vrf": "evpn-vrf", "isL2": false, "overlay": false, "mtuMatch": + true, "inMtu": 9000, "outMtu": 9216, "protocol": "kernel", "ipLookup": "172.16.2.0/24", + "vtepLookup": "10.0.0.134", "macLookup": "", "nexthopIp": "169.254.0.1", "hopError": + "", "timestamp": 1616644822008}, {"pathid": 7, "hopCount": 1, "namespace": "dual-evpn", + "hostname": "spine02", "iif": "swp6", "oif": "swp4", "vrf": "default", "isL2": + true, "overlay": true, "mtuMatch": true, "inMtu": 9216, "outMtu": 9216, "protocol": + "bgp", "ipLookup": "10.0.0.134", "vtepLookup": "", "macLookup": null, "nexthopIp": + "", "hopError": "", "timestamp": 1616644822008}, {"pathid": 7, "hopCount": 2, + "namespace": "dual-evpn", "hostname": "leaf04", "iif": "swp2", "oif": "bond02", + "vrf": "default", "isL2": false, "overlay": false, "mtuMatch": false, "inMtu": + 1500, "outMtu": 1500, "protocol": "", "ipLookup": "", "vtepLookup": "", "macLookup": + "", "nexthopIp": "", "hopError": "Dst MTU != Src MTU", "timestamp": 1616644822983}, + {"pathid": 8, "hopCount": 0, "namespace": "dual-evpn", "hostname": "exit02", "iif": + "vlan13", "oif": "swp2", "vrf": "evpn-vrf", "isL2": false, "overlay": false, "mtuMatch": + true, "inMtu": 9000, "outMtu": 9216, "protocol": "kernel", "ipLookup": "172.16.2.0/24", + "vtepLookup": "10.0.0.134", "macLookup": "", "nexthopIp": "169.254.0.1", "hopError": + "", "timestamp": 1616644822167}, {"pathid": 8, "hopCount": 1, "namespace": "dual-evpn", + "hostname": "spine02", "iif": "swp5", "oif": "swp4", "vrf": "default", "isL2": + true, "overlay": true, "mtuMatch": true, "inMtu": 9216, "outMtu": 9216, "protocol": + "bgp", "ipLookup": "10.0.0.134", "vtepLookup": "", "macLookup": null, "nexthopIp": + "", "hopError": "", "timestamp": 1616644822008}, {"pathid": 8, "hopCount": 2, + "namespace": "dual-evpn", "hostname": "leaf04", "iif": "swp2", "oif": "bond02", + "vrf": "default", "isL2": false, "overlay": false, "mtuMatch": false, "inMtu": + 1500, "outMtu": 1500, "protocol": "", "ipLookup": "", "vtepLookup": "", "macLookup": + "", "nexthopIp": "", "hopError": "Dst MTU != Src MTU", "timestamp": 1616644822983}]' - command: path show --dest=10.0.0.11 --src=10.0.0.14 --namespace=ospf-single --format=json data-directory: tests/data/parquet/ marks: path show cumulus @@ -3405,3 +3507,9 @@ tests: marks: path top cumulus output: '[{"hostname": "leaf04"}, {"hostname": "leaf04"}, {"hostname": "spine01"}, {"hostname": "leaf01"}, {"hostname": "spine02"}]' +- command: path show --dest=172.16.2.104 --src=172.16.21.104 --namespace=dual-evpn + --format=json + data-directory: tests/data/parquet/ + error: + error: '[{"error": "ERROR: Unable to find starting node for 172.16.21.104"}]' + marks: path show cumulus diff --git a/tests/integration/sqcmds/eos-samples/path.yml b/tests/integration/sqcmds/eos-samples/path.yml index a07b998ad9..ea02a8d06b 100644 --- a/tests/integration/sqcmds/eos-samples/path.yml +++ b/tests/integration/sqcmds/eos-samples/path.yml @@ -155,9 +155,152 @@ tests: 1623025174543}]' - command: path show --dest=172.16.3.202 --src=172.16.1.104 --format=json --namespace=eos data-directory: tests/data/parquet/ - error: - error: '[{"error": "ERROR: Invalid src 172.16.1.104"}]' marks: path show eos + output: '[{"pathid": 1, "hopCount": 0, "namespace": "eos", "hostname": "leaf02", + "iif": "Vlan10", "oif": "Ethernet1", "vrf": "evpn-vrf", "isL2": false, "overlay": + false, "mtuMatch": true, "inMtu": 9164, "outMtu": 1500, "protocol": "ibgp", "ipLookup": + "172.16.3.202/32", "vtepLookup": "10.0.0.134", "macLookup": "", "nexthopIp": "10.0.0.21", + "hopError": "", "timestamp": 1623025174530}, {"pathid": 1, "hopCount": 1, "namespace": + "eos", "hostname": "spine01", "iif": "Ethernet2", "oif": "Ethernet3", "vrf": "default", + "isL2": true, "overlay": true, "mtuMatch": true, "inMtu": 1500, "outMtu": 1500, + "protocol": "ospf", "ipLookup": "10.0.0.134", "vtepLookup": "10.0.0.134", "macLookup": + "", "nexthopIp": "10.0.0.13", "hopError": "Hop MTU < Src Mtu", "timestamp": 1623025174547}, + {"pathid": 1, "hopCount": 2, "namespace": "eos", "hostname": "leaf03", "iif": + "Ethernet1", "oif": "Port-Channel4", "vrf": "evpn-vrf", "isL2": false, "overlay": + true, "mtuMatch": true, "inMtu": 1500, "outMtu": 9214, "protocol": "connected", + "ipLookup": "172.16.3.0/24", "vtepLookup": "", "macLookup": "", "nexthopIp": "172.16.3.202", + "hopError": "Hop MTU < Src Mtu", "timestamp": 1623025175569}, {"pathid": 1, "hopCount": + 3, "namespace": "eos", "hostname": "server302", "iif": "bond0", "oif": "bond0", + "vrf": "evpn-vrf", "isL2": false, "overlay": false, "mtuMatch": false, "inMtu": + 9216, "outMtu": 9216, "protocol": "", "ipLookup": "", "vtepLookup": "", "macLookup": + "", "nexthopIp": "", "hopError": "no reverse path, Dst MTU != Src MTU", "timestamp": + 1623025175379}, {"pathid": 2, "hopCount": 0, "namespace": "eos", "hostname": "leaf01", + "iif": "Vlan10", "oif": "Ethernet1", "vrf": "evpn-vrf", "isL2": false, "overlay": + false, "mtuMatch": true, "inMtu": 9164, "outMtu": 1500, "protocol": "ibgp", "ipLookup": + "172.16.3.202/32", "vtepLookup": "10.0.0.134", "macLookup": "", "nexthopIp": "10.0.0.21", + "hopError": "", "timestamp": 1623025174542}, {"pathid": 2, "hopCount": 1, "namespace": + "eos", "hostname": "spine01", "iif": "Ethernet1", "oif": "Ethernet3", "vrf": "default", + "isL2": true, "overlay": true, "mtuMatch": true, "inMtu": 1500, "outMtu": 1500, + "protocol": "ospf", "ipLookup": "10.0.0.134", "vtepLookup": "10.0.0.134", "macLookup": + "", "nexthopIp": "10.0.0.13", "hopError": "Hop MTU < Src Mtu", "timestamp": 1623025174547}, + {"pathid": 2, "hopCount": 2, "namespace": "eos", "hostname": "leaf03", "iif": + "Ethernet1", "oif": "Port-Channel4", "vrf": "evpn-vrf", "isL2": false, "overlay": + true, "mtuMatch": true, "inMtu": 1500, "outMtu": 9214, "protocol": "connected", + "ipLookup": "172.16.3.0/24", "vtepLookup": "", "macLookup": "", "nexthopIp": "172.16.3.202", + "hopError": "Hop MTU < Src Mtu", "timestamp": 1623025175569}, {"pathid": 2, "hopCount": + 3, "namespace": "eos", "hostname": "server302", "iif": "bond0", "oif": "bond0", + "vrf": "evpn-vrf", "isL2": false, "overlay": false, "mtuMatch": false, "inMtu": + 9216, "outMtu": 9216, "protocol": "", "ipLookup": "", "vtepLookup": "", "macLookup": + "", "nexthopIp": "", "hopError": "no reverse path, Dst MTU != Src MTU", "timestamp": + 1623025175379}, {"pathid": 3, "hopCount": 0, "namespace": "eos", "hostname": "leaf02", + "iif": "Vlan10", "oif": "Ethernet2", "vrf": "evpn-vrf", "isL2": false, "overlay": + false, "mtuMatch": true, "inMtu": 9164, "outMtu": 1500, "protocol": "ibgp", "ipLookup": + "172.16.3.202/32", "vtepLookup": "10.0.0.134", "macLookup": "", "nexthopIp": "10.0.0.22", + "hopError": "", "timestamp": 1623025174530}, {"pathid": 3, "hopCount": 1, "namespace": + "eos", "hostname": "spine02", "iif": "Ethernet2", "oif": "Ethernet3", "vrf": "default", + "isL2": true, "overlay": true, "mtuMatch": true, "inMtu": 1500, "outMtu": 1500, + "protocol": "ospf", "ipLookup": "10.0.0.134", "vtepLookup": "10.0.0.134", "macLookup": + "", "nexthopIp": "10.0.0.13", "hopError": "Hop MTU < Src Mtu", "timestamp": 1623025174549}, + {"pathid": 3, "hopCount": 2, "namespace": "eos", "hostname": "leaf03", "iif": + "Ethernet2", "oif": "Port-Channel4", "vrf": "evpn-vrf", "isL2": false, "overlay": + true, "mtuMatch": true, "inMtu": 1500, "outMtu": 9214, "protocol": "connected", + "ipLookup": "172.16.3.0/24", "vtepLookup": "", "macLookup": "", "nexthopIp": "172.16.3.202", + "hopError": "Hop MTU < Src Mtu", "timestamp": 1623025175569}, {"pathid": 3, "hopCount": + 3, "namespace": "eos", "hostname": "server302", "iif": "bond0", "oif": "bond0", + "vrf": "evpn-vrf", "isL2": false, "overlay": false, "mtuMatch": false, "inMtu": + 9216, "outMtu": 9216, "protocol": "", "ipLookup": "", "vtepLookup": "", "macLookup": + "", "nexthopIp": "", "hopError": "no reverse path, Dst MTU != Src MTU", "timestamp": + 1623025175379}, {"pathid": 4, "hopCount": 0, "namespace": "eos", "hostname": "leaf01", + "iif": "Vlan10", "oif": "Ethernet2", "vrf": "evpn-vrf", "isL2": false, "overlay": + false, "mtuMatch": true, "inMtu": 9164, "outMtu": 1500, "protocol": "ibgp", "ipLookup": + "172.16.3.202/32", "vtepLookup": "10.0.0.134", "macLookup": "", "nexthopIp": "10.0.0.22", + "hopError": "", "timestamp": 1623025174542}, {"pathid": 4, "hopCount": 1, "namespace": + "eos", "hostname": "spine02", "iif": "Ethernet1", "oif": "Ethernet3", "vrf": "default", + "isL2": true, "overlay": true, "mtuMatch": true, "inMtu": 1500, "outMtu": 1500, + "protocol": "ospf", "ipLookup": "10.0.0.134", "vtepLookup": "10.0.0.134", "macLookup": + "", "nexthopIp": "10.0.0.13", "hopError": "Hop MTU < Src Mtu", "timestamp": 1623025174549}, + {"pathid": 4, "hopCount": 2, "namespace": "eos", "hostname": "leaf03", "iif": + "Ethernet2", "oif": "Port-Channel4", "vrf": "evpn-vrf", "isL2": false, "overlay": + true, "mtuMatch": true, "inMtu": 1500, "outMtu": 9214, "protocol": "connected", + "ipLookup": "172.16.3.0/24", "vtepLookup": "", "macLookup": "", "nexthopIp": "172.16.3.202", + "hopError": "Hop MTU < Src Mtu", "timestamp": 1623025175569}, {"pathid": 4, "hopCount": + 3, "namespace": "eos", "hostname": "server302", "iif": "bond0", "oif": "bond0", + "vrf": "evpn-vrf", "isL2": false, "overlay": false, "mtuMatch": false, "inMtu": + 9216, "outMtu": 9216, "protocol": "", "ipLookup": "", "vtepLookup": "", "macLookup": + "", "nexthopIp": "", "hopError": "no reverse path, Dst MTU != Src MTU", "timestamp": + 1623025175379}, {"pathid": 5, "hopCount": 0, "namespace": "eos", "hostname": "leaf02", + "iif": "Vlan10", "oif": "Ethernet1", "vrf": "evpn-vrf", "isL2": false, "overlay": + false, "mtuMatch": true, "inMtu": 9164, "outMtu": 1500, "protocol": "ibgp", "ipLookup": + "172.16.3.202/32", "vtepLookup": "10.0.0.134", "macLookup": "", "nexthopIp": "10.0.0.21", + "hopError": "", "timestamp": 1623025174530}, {"pathid": 5, "hopCount": 1, "namespace": + "eos", "hostname": "spine01", "iif": "Ethernet2", "oif": "Ethernet4", "vrf": "default", + "isL2": true, "overlay": true, "mtuMatch": true, "inMtu": 1500, "outMtu": 1500, + "protocol": "ospf", "ipLookup": "10.0.0.134", "vtepLookup": "10.0.0.134", "macLookup": + "", "nexthopIp": "10.0.0.14", "hopError": "Hop MTU < Src Mtu", "timestamp": 1623025174547}, + {"pathid": 5, "hopCount": 2, "namespace": "eos", "hostname": "leaf04", "iif": + "Ethernet1", "oif": "Port-Channel4", "vrf": "evpn-vrf", "isL2": false, "overlay": + true, "mtuMatch": true, "inMtu": 1500, "outMtu": 9214, "protocol": "connected", + "ipLookup": "172.16.3.0/24", "vtepLookup": "", "macLookup": "", "nexthopIp": "172.16.3.202", + "hopError": "Hop MTU < Src Mtu", "timestamp": 1623025176019}, {"pathid": 5, "hopCount": + 3, "namespace": "eos", "hostname": "server302", "iif": "bond0", "oif": "bond0", + "vrf": "evpn-vrf", "isL2": false, "overlay": false, "mtuMatch": false, "inMtu": + 9216, "outMtu": 9216, "protocol": "", "ipLookup": "", "vtepLookup": "", "macLookup": + "", "nexthopIp": "", "hopError": "no reverse path, Dst MTU != Src MTU", "timestamp": + 1623025175379}, {"pathid": 6, "hopCount": 0, "namespace": "eos", "hostname": "leaf01", + "iif": "Vlan10", "oif": "Ethernet1", "vrf": "evpn-vrf", "isL2": false, "overlay": + false, "mtuMatch": true, "inMtu": 9164, "outMtu": 1500, "protocol": "ibgp", "ipLookup": + "172.16.3.202/32", "vtepLookup": "10.0.0.134", "macLookup": "", "nexthopIp": "10.0.0.21", + "hopError": "", "timestamp": 1623025174542}, {"pathid": 6, "hopCount": 1, "namespace": + "eos", "hostname": "spine01", "iif": "Ethernet1", "oif": "Ethernet4", "vrf": "default", + "isL2": true, "overlay": true, "mtuMatch": true, "inMtu": 1500, "outMtu": 1500, + "protocol": "ospf", "ipLookup": "10.0.0.134", "vtepLookup": "10.0.0.134", "macLookup": + "", "nexthopIp": "10.0.0.14", "hopError": "Hop MTU < Src Mtu", "timestamp": 1623025174547}, + {"pathid": 6, "hopCount": 2, "namespace": "eos", "hostname": "leaf04", "iif": + "Ethernet1", "oif": "Port-Channel4", "vrf": "evpn-vrf", "isL2": false, "overlay": + true, "mtuMatch": true, "inMtu": 1500, "outMtu": 9214, "protocol": "connected", + "ipLookup": "172.16.3.0/24", "vtepLookup": "", "macLookup": "", "nexthopIp": "172.16.3.202", + "hopError": "Hop MTU < Src Mtu", "timestamp": 1623025176019}, {"pathid": 6, "hopCount": + 3, "namespace": "eos", "hostname": "server302", "iif": "bond0", "oif": "bond0", + "vrf": "evpn-vrf", "isL2": false, "overlay": false, "mtuMatch": false, "inMtu": + 9216, "outMtu": 9216, "protocol": "", "ipLookup": "", "vtepLookup": "", "macLookup": + "", "nexthopIp": "", "hopError": "no reverse path, Dst MTU != Src MTU", "timestamp": + 1623025175379}, {"pathid": 7, "hopCount": 0, "namespace": "eos", "hostname": "leaf02", + "iif": "Vlan10", "oif": "Ethernet2", "vrf": "evpn-vrf", "isL2": false, "overlay": + false, "mtuMatch": true, "inMtu": 9164, "outMtu": 1500, "protocol": "ibgp", "ipLookup": + "172.16.3.202/32", "vtepLookup": "10.0.0.134", "macLookup": "", "nexthopIp": "10.0.0.22", + "hopError": "", "timestamp": 1623025174530}, {"pathid": 7, "hopCount": 1, "namespace": + "eos", "hostname": "spine02", "iif": "Ethernet2", "oif": "Ethernet4", "vrf": "default", + "isL2": true, "overlay": true, "mtuMatch": true, "inMtu": 1500, "outMtu": 1500, + "protocol": "ospf", "ipLookup": "10.0.0.134", "vtepLookup": "10.0.0.134", "macLookup": + "", "nexthopIp": "10.0.0.14", "hopError": "Hop MTU < Src Mtu", "timestamp": 1623025174549}, + {"pathid": 7, "hopCount": 2, "namespace": "eos", "hostname": "leaf04", "iif": + "Ethernet2", "oif": "Port-Channel4", "vrf": "evpn-vrf", "isL2": false, "overlay": + true, "mtuMatch": true, "inMtu": 1500, "outMtu": 9214, "protocol": "connected", + "ipLookup": "172.16.3.0/24", "vtepLookup": "", "macLookup": "", "nexthopIp": "172.16.3.202", + "hopError": "Hop MTU < Src Mtu", "timestamp": 1623025176019}, {"pathid": 7, "hopCount": + 3, "namespace": "eos", "hostname": "server302", "iif": "bond0", "oif": "bond0", + "vrf": "evpn-vrf", "isL2": false, "overlay": false, "mtuMatch": false, "inMtu": + 9216, "outMtu": 9216, "protocol": "", "ipLookup": "", "vtepLookup": "", "macLookup": + "", "nexthopIp": "", "hopError": "no reverse path, Dst MTU != Src MTU", "timestamp": + 1623025175379}, {"pathid": 8, "hopCount": 0, "namespace": "eos", "hostname": "leaf01", + "iif": "Vlan10", "oif": "Ethernet2", "vrf": "evpn-vrf", "isL2": false, "overlay": + false, "mtuMatch": true, "inMtu": 9164, "outMtu": 1500, "protocol": "ibgp", "ipLookup": + "172.16.3.202/32", "vtepLookup": "10.0.0.134", "macLookup": "", "nexthopIp": "10.0.0.22", + "hopError": "", "timestamp": 1623025174542}, {"pathid": 8, "hopCount": 1, "namespace": + "eos", "hostname": "spine02", "iif": "Ethernet1", "oif": "Ethernet4", "vrf": "default", + "isL2": true, "overlay": true, "mtuMatch": true, "inMtu": 1500, "outMtu": 1500, + "protocol": "ospf", "ipLookup": "10.0.0.134", "vtepLookup": "10.0.0.134", "macLookup": + "", "nexthopIp": "10.0.0.14", "hopError": "Hop MTU < Src Mtu", "timestamp": 1623025174549}, + {"pathid": 8, "hopCount": 2, "namespace": "eos", "hostname": "leaf04", "iif": + "Ethernet2", "oif": "Port-Channel4", "vrf": "evpn-vrf", "isL2": false, "overlay": + true, "mtuMatch": true, "inMtu": 1500, "outMtu": 9214, "protocol": "connected", + "ipLookup": "172.16.3.0/24", "vtepLookup": "", "macLookup": "", "nexthopIp": "172.16.3.202", + "hopError": "Hop MTU < Src Mtu", "timestamp": 1623025176019}, {"pathid": 8, "hopCount": + 3, "namespace": "eos", "hostname": "server302", "iif": "bond0", "oif": "bond0", + "vrf": "evpn-vrf", "isL2": false, "overlay": false, "mtuMatch": false, "inMtu": + 9216, "outMtu": 9216, "protocol": "", "ipLookup": "", "vtepLookup": "", "macLookup": + "", "nexthopIp": "", "hopError": "no reverse path, Dst MTU != Src MTU", "timestamp": + 1623025175379}]' - command: path show --dest=172.16.3.202 --src=172.16.1.101 --format=json --namespace=eos data-directory: tests/data/parquet/ marks: path show eos @@ -996,3 +1139,8 @@ tests: marks: path top eos output: '[{"hostname": "server101"}, {"hostname": "server101"}, {"hostname": "server101"}, {"hostname": "server101"}, {"hostname": "server101"}]' +- command: path show --dest=172.16.3.202 --src=172.16.21.104 --format=json --namespace=eos + data-directory: tests/data/parquet/ + error: + error: '[{"error": "ERROR: Unable to find starting node for 172.16.21.104"}]' + marks: path show eos diff --git a/tests/integration/sqcmds/junos-samples/path.yml b/tests/integration/sqcmds/junos-samples/path.yml index d3dd6c01c9..38ff13e6f1 100644 --- a/tests/integration/sqcmds/junos-samples/path.yml +++ b/tests/integration/sqcmds/junos-samples/path.yml @@ -47,9 +47,43 @@ tests: "", "hopError": "Hop MTU < Src Mtu", "timestamp": 1623025802263}]' - command: path show --dest=172.16.3.202 --src=172.16.1.104 --format=json --namespace=junos data-directory: tests/data/parquet/ - error: - error: '[{"error": "ERROR: Invalid src 172.16.1.104"}]' marks: path show junos + output: '[{"pathid": 1, "hopCount": 0, "namespace": "junos", "hostname": "leaf01", + "iif": "irb.10", "oif": "xe-0/0/0.0", "vrf": "evpn-vrf", "isL2": false, "overlay": + false, "mtuMatch": true, "inMtu": 1500, "outMtu": 9200, "protocol": "evpn", "ipLookup": + "172.16.3.202/32", "vtepLookup": "10.0.0.12", "macLookup": "", "nexthopIp": "10.0.0.21", + "hopError": "", "timestamp": 1623025801173}, {"pathid": 1, "hopCount": 1, "namespace": + "junos", "hostname": "spine01", "iif": "xe-0/0/0.0", "oif": "xe-0/0/1.0", "vrf": + "default", "isL2": true, "overlay": true, "mtuMatch": true, "inMtu": 9200, "outMtu": + 9200, "protocol": "ospf", "ipLookup": "10.0.0.12", "vtepLookup": "10.0.0.12", + "macLookup": "", "nexthopIp": "10.0.0.12", "hopError": "", "timestamp": 1623025802890}, + {"pathid": 1, "hopCount": 2, "namespace": "junos", "hostname": "leaf02", "iif": + "xe-0/0/0.0", "oif": "xe-0/0/3", "vrf": "evpn-vrf", "isL2": false, "overlay": + true, "mtuMatch": true, "inMtu": 9200, "outMtu": 1514, "protocol": "evpn", "ipLookup": + "172.16.3.202/32", "vtepLookup": "", "macLookup": "", "nexthopIp": "172.16.3.202", + "hopError": "", "timestamp": 1623025797587}, {"pathid": 1, "hopCount": 3, "namespace": + "junos", "hostname": "server202", "iif": "eth1", "oif": "eth1", "vrf": "evpn-vrf", + "isL2": false, "overlay": false, "mtuMatch": false, "inMtu": 9216, "outMtu": 9216, + "protocol": "", "ipLookup": "", "vtepLookup": "", "macLookup": "", "nexthopIp": + "", "hopError": "no reverse path, Dst MTU != Src MTU", "timestamp": 1623025795928}, + {"pathid": 2, "hopCount": 0, "namespace": "junos", "hostname": "leaf01", "iif": + "irb.10", "oif": "xe-0/0/1.0", "vrf": "evpn-vrf", "isL2": false, "overlay": false, + "mtuMatch": true, "inMtu": 1500, "outMtu": 9200, "protocol": "evpn", "ipLookup": + "172.16.3.202/32", "vtepLookup": "10.0.0.12", "macLookup": "", "nexthopIp": "10.0.0.22", + "hopError": "", "timestamp": 1623025801173}, {"pathid": 2, "hopCount": 1, "namespace": + "junos", "hostname": "spine02", "iif": "xe-0/0/0.0", "oif": "xe-0/0/1.0", "vrf": + "default", "isL2": true, "overlay": true, "mtuMatch": true, "inMtu": 9200, "outMtu": + 9200, "protocol": "ospf", "ipLookup": "10.0.0.12", "vtepLookup": "10.0.0.12", + "macLookup": "", "nexthopIp": "10.0.0.12", "hopError": "", "timestamp": 1623025802688}, + {"pathid": 2, "hopCount": 2, "namespace": "junos", "hostname": "leaf02", "iif": + "xe-0/0/1.0", "oif": "xe-0/0/3", "vrf": "evpn-vrf", "isL2": false, "overlay": + true, "mtuMatch": true, "inMtu": 9200, "outMtu": 1514, "protocol": "evpn", "ipLookup": + "172.16.3.202/32", "vtepLookup": "", "macLookup": "", "nexthopIp": "172.16.3.202", + "hopError": "", "timestamp": 1623025797587}, {"pathid": 2, "hopCount": 3, "namespace": + "junos", "hostname": "server202", "iif": "eth1", "oif": "eth1", "vrf": "evpn-vrf", + "isL2": false, "overlay": false, "mtuMatch": false, "inMtu": 9216, "outMtu": 9216, + "protocol": "", "ipLookup": "", "vtepLookup": "", "macLookup": "", "nexthopIp": + "", "hopError": "no reverse path, Dst MTU != Src MTU", "timestamp": 1623025795928}]' - command: path show --dest=172.16.3.202 --src=172.16.1.101 --format=json --namespace=junos data-directory: tests/data/parquet/ marks: path show junos @@ -337,3 +371,8 @@ tests: marks: path top junos output: '[{"hostname": "server101"}, {"hostname": "server101"}, {"hostname": "spine01"}, {"hostname": "leaf02"}, {"hostname": "spine02"}]' +- command: path show --dest=172.16.3.202 --src=172.16.21.104 --format=json --namespace=junos + data-directory: tests/data/parquet/ + error: + error: '[{"error": "ERROR: Unable to find starting node for 172.16.21.104"}]' + marks: path show junos diff --git a/tests/integration/sqcmds/nxos-samples/path.yml b/tests/integration/sqcmds/nxos-samples/path.yml index cdc5780fdf..a5ef12ffe2 100644 --- a/tests/integration/sqcmds/nxos-samples/path.yml +++ b/tests/integration/sqcmds/nxos-samples/path.yml @@ -154,9 +154,151 @@ tests: "", "nexthopIp": "", "hopError": "", "timestamp": 1619275257671}]' - command: path show --dest=172.16.3.202 --src=172.16.1.104 --format=json --namespace=nxos data-directory: tests/data/parquet/ - error: - error: '[{"error": "ERROR: Invalid src 172.16.1.104"}]' marks: path show nxos + output: '[{"pathid": 1, "hopCount": 0, "namespace": "nxos", "hostname": "leaf01", + "iif": "Vlan10", "oif": "Ethernet1/1", "vrf": "evpn-vrf", "isL2": false, "overlay": + false, "mtuMatch": true, "inMtu": 9000, "outMtu": 9216, "protocol": "bgp", "ipLookup": + "172.16.3.202/32", "vtepLookup": "10.0.0.134", "macLookup": "", "nexthopIp": "10.0.0.21", + "hopError": "", "timestamp": 1619275257674}, {"pathid": 1, "hopCount": 1, "namespace": + "nxos", "hostname": "spine01", "iif": "Ethernet1/1", "oif": "Ethernet1/3", "vrf": + "default", "isL2": true, "overlay": true, "mtuMatch": true, "inMtu": 9216, "outMtu": + 9216, "protocol": "ospf", "ipLookup": "10.0.0.134", "vtepLookup": "10.0.0.134", + "macLookup": "", "nexthopIp": "10.0.0.13", "hopError": "", "timestamp": 1619275257467}, + {"pathid": 1, "hopCount": 2, "namespace": "nxos", "hostname": "leaf03", "iif": + "Ethernet1/1", "oif": "port-channel4", "vrf": "evpn-vrf", "isL2": false, "overlay": + true, "mtuMatch": true, "inMtu": 9216, "outMtu": 9216, "protocol": "hmm", "ipLookup": + "172.16.3.202/32", "vtepLookup": "", "macLookup": "", "nexthopIp": "172.16.3.202", + "hopError": "", "timestamp": 1619275257018}, {"pathid": 1, "hopCount": 3, "namespace": + "nxos", "hostname": "server302", "iif": "bond0", "oif": "bond0", "vrf": "evpn-vrf", + "isL2": false, "overlay": false, "mtuMatch": true, "inMtu": 9216, "outMtu": 9216, + "protocol": "", "ipLookup": "", "vtepLookup": "", "macLookup": "", "nexthopIp": + "", "hopError": "no reverse path, Dst MTU != Src MTU", "timestamp": 1619275256321}, + {"pathid": 2, "hopCount": 0, "namespace": "nxos", "hostname": "leaf02", "iif": + "Vlan10", "oif": "Ethernet1/1", "vrf": "evpn-vrf", "isL2": false, "overlay": false, + "mtuMatch": true, "inMtu": 9000, "outMtu": 9216, "protocol": "bgp", "ipLookup": + "172.16.3.202/32", "vtepLookup": "10.0.0.134", "macLookup": "", "nexthopIp": "10.0.0.21", + "hopError": "", "timestamp": 1619275257446}, {"pathid": 2, "hopCount": 1, "namespace": + "nxos", "hostname": "spine01", "iif": "Ethernet1/2", "oif": "Ethernet1/3", "vrf": + "default", "isL2": true, "overlay": true, "mtuMatch": true, "inMtu": 9216, "outMtu": + 9216, "protocol": "ospf", "ipLookup": "10.0.0.134", "vtepLookup": "10.0.0.134", + "macLookup": "", "nexthopIp": "10.0.0.13", "hopError": "", "timestamp": 1619275257467}, + {"pathid": 2, "hopCount": 2, "namespace": "nxos", "hostname": "leaf03", "iif": + "Ethernet1/1", "oif": "port-channel4", "vrf": "evpn-vrf", "isL2": false, "overlay": + true, "mtuMatch": true, "inMtu": 9216, "outMtu": 9216, "protocol": "hmm", "ipLookup": + "172.16.3.202/32", "vtepLookup": "", "macLookup": "", "nexthopIp": "172.16.3.202", + "hopError": "", "timestamp": 1619275257018}, {"pathid": 2, "hopCount": 3, "namespace": + "nxos", "hostname": "server302", "iif": "bond0", "oif": "bond0", "vrf": "evpn-vrf", + "isL2": false, "overlay": false, "mtuMatch": true, "inMtu": 9216, "outMtu": 9216, + "protocol": "", "ipLookup": "", "vtepLookup": "", "macLookup": "", "nexthopIp": + "", "hopError": "no reverse path, Dst MTU != Src MTU", "timestamp": 1619275256321}, + {"pathid": 3, "hopCount": 0, "namespace": "nxos", "hostname": "leaf01", "iif": + "Vlan10", "oif": "Ethernet1/2", "vrf": "evpn-vrf", "isL2": false, "overlay": false, + "mtuMatch": true, "inMtu": 9000, "outMtu": 9216, "protocol": "bgp", "ipLookup": + "172.16.3.202/32", "vtepLookup": "10.0.0.134", "macLookup": "", "nexthopIp": "10.0.0.22", + "hopError": "", "timestamp": 1619275257674}, {"pathid": 3, "hopCount": 1, "namespace": + "nxos", "hostname": "spine02", "iif": "Ethernet1/1", "oif": "Ethernet1/3", "vrf": + "default", "isL2": true, "overlay": true, "mtuMatch": true, "inMtu": 9216, "outMtu": + 9216, "protocol": "ospf", "ipLookup": "10.0.0.134", "vtepLookup": "10.0.0.134", + "macLookup": "", "nexthopIp": "10.0.0.13", "hopError": "", "timestamp": 1619275257123}, + {"pathid": 3, "hopCount": 2, "namespace": "nxos", "hostname": "leaf03", "iif": + "Ethernet1/2", "oif": "port-channel4", "vrf": "evpn-vrf", "isL2": false, "overlay": + true, "mtuMatch": true, "inMtu": 9216, "outMtu": 9216, "protocol": "hmm", "ipLookup": + "172.16.3.202/32", "vtepLookup": "", "macLookup": "", "nexthopIp": "172.16.3.202", + "hopError": "", "timestamp": 1619275257018}, {"pathid": 3, "hopCount": 3, "namespace": + "nxos", "hostname": "server302", "iif": "bond0", "oif": "bond0", "vrf": "evpn-vrf", + "isL2": false, "overlay": false, "mtuMatch": true, "inMtu": 9216, "outMtu": 9216, + "protocol": "", "ipLookup": "", "vtepLookup": "", "macLookup": "", "nexthopIp": + "", "hopError": "no reverse path, Dst MTU != Src MTU", "timestamp": 1619275256321}, + {"pathid": 4, "hopCount": 0, "namespace": "nxos", "hostname": "leaf02", "iif": + "Vlan10", "oif": "Ethernet1/2", "vrf": "evpn-vrf", "isL2": false, "overlay": false, + "mtuMatch": true, "inMtu": 9000, "outMtu": 9216, "protocol": "bgp", "ipLookup": + "172.16.3.202/32", "vtepLookup": "10.0.0.134", "macLookup": "", "nexthopIp": "10.0.0.22", + "hopError": "", "timestamp": 1619275257446}, {"pathid": 4, "hopCount": 1, "namespace": + "nxos", "hostname": "spine02", "iif": "Ethernet1/2", "oif": "Ethernet1/3", "vrf": + "default", "isL2": true, "overlay": true, "mtuMatch": true, "inMtu": 9216, "outMtu": + 9216, "protocol": "ospf", "ipLookup": "10.0.0.134", "vtepLookup": "10.0.0.134", + "macLookup": "", "nexthopIp": "10.0.0.13", "hopError": "", "timestamp": 1619275257123}, + {"pathid": 4, "hopCount": 2, "namespace": "nxos", "hostname": "leaf03", "iif": + "Ethernet1/2", "oif": "port-channel4", "vrf": "evpn-vrf", "isL2": false, "overlay": + true, "mtuMatch": true, "inMtu": 9216, "outMtu": 9216, "protocol": "hmm", "ipLookup": + "172.16.3.202/32", "vtepLookup": "", "macLookup": "", "nexthopIp": "172.16.3.202", + "hopError": "", "timestamp": 1619275257018}, {"pathid": 4, "hopCount": 3, "namespace": + "nxos", "hostname": "server302", "iif": "bond0", "oif": "bond0", "vrf": "evpn-vrf", + "isL2": false, "overlay": false, "mtuMatch": true, "inMtu": 9216, "outMtu": 9216, + "protocol": "", "ipLookup": "", "vtepLookup": "", "macLookup": "", "nexthopIp": + "", "hopError": "no reverse path, Dst MTU != Src MTU", "timestamp": 1619275256321}, + {"pathid": 5, "hopCount": 0, "namespace": "nxos", "hostname": "leaf01", "iif": + "Vlan10", "oif": "Ethernet1/1", "vrf": "evpn-vrf", "isL2": false, "overlay": false, + "mtuMatch": true, "inMtu": 9000, "outMtu": 9216, "protocol": "bgp", "ipLookup": + "172.16.3.202/32", "vtepLookup": "10.0.0.134", "macLookup": "", "nexthopIp": "10.0.0.21", + "hopError": "", "timestamp": 1619275257674}, {"pathid": 5, "hopCount": 1, "namespace": + "nxos", "hostname": "spine01", "iif": "Ethernet1/1", "oif": "Ethernet1/4", "vrf": + "default", "isL2": true, "overlay": true, "mtuMatch": true, "inMtu": 9216, "outMtu": + 9216, "protocol": "ospf", "ipLookup": "10.0.0.134", "vtepLookup": "10.0.0.134", + "macLookup": "", "nexthopIp": "10.0.0.14", "hopError": "", "timestamp": 1619275257467}, + {"pathid": 5, "hopCount": 2, "namespace": "nxos", "hostname": "leaf04", "iif": + "Ethernet1/1", "oif": "port-channel4", "vrf": "evpn-vrf", "isL2": false, "overlay": + true, "mtuMatch": true, "inMtu": 9216, "outMtu": 9216, "protocol": "hmm", "ipLookup": + "172.16.3.202/32", "vtepLookup": "", "macLookup": "", "nexthopIp": "172.16.3.202", + "hopError": "", "timestamp": 1619275257479}, {"pathid": 5, "hopCount": 3, "namespace": + "nxos", "hostname": "server302", "iif": "bond0", "oif": "bond0", "vrf": "evpn-vrf", + "isL2": false, "overlay": false, "mtuMatch": true, "inMtu": 9216, "outMtu": 9216, + "protocol": "", "ipLookup": "", "vtepLookup": "", "macLookup": "", "nexthopIp": + "", "hopError": "no reverse path, Dst MTU != Src MTU", "timestamp": 1619275256321}, + {"pathid": 6, "hopCount": 0, "namespace": "nxos", "hostname": "leaf02", "iif": + "Vlan10", "oif": "Ethernet1/1", "vrf": "evpn-vrf", "isL2": false, "overlay": false, + "mtuMatch": true, "inMtu": 9000, "outMtu": 9216, "protocol": "bgp", "ipLookup": + "172.16.3.202/32", "vtepLookup": "10.0.0.134", "macLookup": "", "nexthopIp": "10.0.0.21", + "hopError": "", "timestamp": 1619275257446}, {"pathid": 6, "hopCount": 1, "namespace": + "nxos", "hostname": "spine01", "iif": "Ethernet1/2", "oif": "Ethernet1/4", "vrf": + "default", "isL2": true, "overlay": true, "mtuMatch": true, "inMtu": 9216, "outMtu": + 9216, "protocol": "ospf", "ipLookup": "10.0.0.134", "vtepLookup": "10.0.0.134", + "macLookup": "", "nexthopIp": "10.0.0.14", "hopError": "", "timestamp": 1619275257467}, + {"pathid": 6, "hopCount": 2, "namespace": "nxos", "hostname": "leaf04", "iif": + "Ethernet1/1", "oif": "port-channel4", "vrf": "evpn-vrf", "isL2": false, "overlay": + true, "mtuMatch": true, "inMtu": 9216, "outMtu": 9216, "protocol": "hmm", "ipLookup": + "172.16.3.202/32", "vtepLookup": "", "macLookup": "", "nexthopIp": "172.16.3.202", + "hopError": "", "timestamp": 1619275257479}, {"pathid": 6, "hopCount": 3, "namespace": + "nxos", "hostname": "server302", "iif": "bond0", "oif": "bond0", "vrf": "evpn-vrf", + "isL2": false, "overlay": false, "mtuMatch": true, "inMtu": 9216, "outMtu": 9216, + "protocol": "", "ipLookup": "", "vtepLookup": "", "macLookup": "", "nexthopIp": + "", "hopError": "no reverse path, Dst MTU != Src MTU", "timestamp": 1619275256321}, + {"pathid": 7, "hopCount": 0, "namespace": "nxos", "hostname": "leaf01", "iif": + "Vlan10", "oif": "Ethernet1/2", "vrf": "evpn-vrf", "isL2": false, "overlay": false, + "mtuMatch": true, "inMtu": 9000, "outMtu": 9216, "protocol": "bgp", "ipLookup": + "172.16.3.202/32", "vtepLookup": "10.0.0.134", "macLookup": "", "nexthopIp": "10.0.0.22", + "hopError": "", "timestamp": 1619275257674}, {"pathid": 7, "hopCount": 1, "namespace": + "nxos", "hostname": "spine02", "iif": "Ethernet1/1", "oif": "Ethernet1/4", "vrf": + "default", "isL2": true, "overlay": true, "mtuMatch": true, "inMtu": 9216, "outMtu": + 9216, "protocol": "ospf", "ipLookup": "10.0.0.134", "vtepLookup": "10.0.0.134", + "macLookup": "", "nexthopIp": "10.0.0.14", "hopError": "", "timestamp": 1619275257123}, + {"pathid": 7, "hopCount": 2, "namespace": "nxos", "hostname": "leaf04", "iif": + "Ethernet1/2", "oif": "port-channel4", "vrf": "evpn-vrf", "isL2": false, "overlay": + true, "mtuMatch": true, "inMtu": 9216, "outMtu": 9216, "protocol": "hmm", "ipLookup": + "172.16.3.202/32", "vtepLookup": "", "macLookup": "", "nexthopIp": "172.16.3.202", + "hopError": "", "timestamp": 1619275257479}, {"pathid": 7, "hopCount": 3, "namespace": + "nxos", "hostname": "server302", "iif": "bond0", "oif": "bond0", "vrf": "evpn-vrf", + "isL2": false, "overlay": false, "mtuMatch": true, "inMtu": 9216, "outMtu": 9216, + "protocol": "", "ipLookup": "", "vtepLookup": "", "macLookup": "", "nexthopIp": + "", "hopError": "no reverse path, Dst MTU != Src MTU", "timestamp": 1619275256321}, + {"pathid": 8, "hopCount": 0, "namespace": "nxos", "hostname": "leaf02", "iif": + "Vlan10", "oif": "Ethernet1/2", "vrf": "evpn-vrf", "isL2": false, "overlay": false, + "mtuMatch": true, "inMtu": 9000, "outMtu": 9216, "protocol": "bgp", "ipLookup": + "172.16.3.202/32", "vtepLookup": "10.0.0.134", "macLookup": "", "nexthopIp": "10.0.0.22", + "hopError": "", "timestamp": 1619275257446}, {"pathid": 8, "hopCount": 1, "namespace": + "nxos", "hostname": "spine02", "iif": "Ethernet1/2", "oif": "Ethernet1/4", "vrf": + "default", "isL2": true, "overlay": true, "mtuMatch": true, "inMtu": 9216, "outMtu": + 9216, "protocol": "ospf", "ipLookup": "10.0.0.134", "vtepLookup": "10.0.0.134", + "macLookup": "", "nexthopIp": "10.0.0.14", "hopError": "", "timestamp": 1619275257123}, + {"pathid": 8, "hopCount": 2, "namespace": "nxos", "hostname": "leaf04", "iif": + "Ethernet1/2", "oif": "port-channel4", "vrf": "evpn-vrf", "isL2": false, "overlay": + true, "mtuMatch": true, "inMtu": 9216, "outMtu": 9216, "protocol": "hmm", "ipLookup": + "172.16.3.202/32", "vtepLookup": "", "macLookup": "", "nexthopIp": "172.16.3.202", + "hopError": "", "timestamp": 1619275257479}, {"pathid": 8, "hopCount": 3, "namespace": + "nxos", "hostname": "server302", "iif": "bond0", "oif": "bond0", "vrf": "evpn-vrf", + "isL2": false, "overlay": false, "mtuMatch": true, "inMtu": 9216, "outMtu": 9216, + "protocol": "", "ipLookup": "", "vtepLookup": "", "macLookup": "", "nexthopIp": + "", "hopError": "no reverse path, Dst MTU != Src MTU", "timestamp": 1619275256321}]' - command: path show --dest=172.16.3.202 --src=172.16.1.101 --format=json --namespace=nxos data-directory: tests/data/parquet/ marks: path show nxos @@ -954,3 +1096,8 @@ tests: marks: path top nxos output: '[{"hostname": "server101"}, {"hostname": "leaf01"}, {"hostname": "spine02"}, {"hostname": "leaf02"}, {"hostname": "server101"}]' +- command: path show --dest=172.16.3.202 --src=172.16.21.104 --format=json --namespace=nxos + data-directory: tests/data/parquet/ + error: + error: '[{"error": "ERROR: Unable to find starting node for 172.16.21.104"}]' + marks: path show nxos