Skip to content

Conversation

@ddutt
Copy link
Member

@ddutt ddutt commented Jul 15, 2023

Handle path when the source is not in ARP or as interface on a polled node, by seeking the SVI associated with that source.

Type of change

Enhancement

New Behavior

Without this patch, if you provide a source IP address that is not in the arpnd table or as the address of an interface on a polled device, the command fails with "invalid src:...". With this patch, we find the SVI associated with the IP and start tracing from that node's SVI.

If we cannot find an SVI, we flag the error: "unable to find a source node to start for "

Discussion: Benefits and Drawbacks

This is a useful feature for many people using path because the source's ARP entry may have timed out, people are testing a hypothetical source etc.

Changes to the Documentation

None.

Proposed Release Note Entry

ENHANCEMENT: path now supports specifying a source IP that may not be in the ARPND table. We determine the SVI node(s) associated with the IP and start the trace from there. Furthermore, the error message associated with a source IP whose source node we cannot locate is made more user-friendly now.

Double Check

  • I have read the comments and followed the CONTRIBUTING.md.
  • I have explained my PR according to the information in the comments or in a linked issue.
  • My PR source branch is created from the develop branch.
  • My PR targets the develop branch.
  • All my commits have --signoff applied

@ddutt ddutt requested review from LucaNicosia and claudious96 July 15, 2023 21:52
Signed-off-by: Dinesh Dutt <dd.ps4u@gmail.com>
if ':' in source:
self._src_df = (
self._if_df.query(
f'@self._in_subnet-series("{source}", ip6AddressList)'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
f'@self._in_subnet-series("{source}", ip6AddressList)'
f'@self._in_subnet_series("{source}", ip6AddressList)'

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch. Fixed

ddutt added 2 commits July 17, 2023 02:06
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 <dd.ps4u@gmail.com>
Signed-off-by: Dinesh Dutt <dd.ps4u@gmail.com>
@ddutt ddutt merged commit 59a2a32 into develop Jul 17, 2023
@ddutt ddutt deleted the path-improv branch July 17, 2023 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants