netbox-topology-views
netbox-topology-views copied to clipboard
Add option to show the whole physical path between devices
NetBox version
v3.7.1
Topology Views version
v3.9.0
Feature type
New functionality
Proposed functionality
An option to show the physical path over all patchpanels between shown devices like showing the neighbors of shown devices.
Use case
For example, we have a few Switches that form our network backbone and thus have a specific role. When we want to only show them, we have no real way to show the physical connection over the patchpanels between them since there are sometimes 3 or 4 patchpanels in between.
We would have to show all patchpanels, not only the ones between them (that would be quite many).
External dependencies
No response
Can you maybe go into some more detail about how you think this would work? You select a source device and a destination device and then we draw all the direct and indirect cables between them?
Yes, but not only a single source and destination. It would be great if, when showing e.g. all switches with a specific role, all physical cables (and patchpanels) that make the logical connection between then get displayed (like in the cable trace).
Although I haven't looked at the code for this yet, I suspect that it's not a big deal to query one or more cable traces and extend the filter with the elements it contains.
For individual paths, I don't see any advantage over the conventional cable trace. If several termination points are to be displayed, it becomes more interesting.
However, you should bear in mind that (as with the cable trace in NetBox) only complete paths can be taken into account. The paths therefore require a termination point and there must be no interfaces in between.
This here works: Switch > Patchpanel > Patchpanel > Patchpanel > Switch
This one does not work: Switch > Patchpanel > Switch > Patchpanel > Switch
For individual paths, I don't see any advantage over the conventional cable trace.
Yes that is true, the cable trace is totally fine in that case.
This here works: Switch > Patchpanel > Patchpanel > Patchpanel > Switch
That would be exactly what we'd like to be able to see, yes.
Thanks a lot for looking into this :)
I've thought a little more about this feature and it doesn't seem to be very likely that it will be implemented. There's a big problem in determining all devices in between a path. Imagine you have two devices, then we need to do the following steps:
- Perform a cable trace between the two devices
- Add all devices to the filter that has been found in the path
- Create the topology as usual
So far, so easy. The real problem arises if you'd like to display more than two devices. Imagine you have three devices A, B and C. The needed steps are then as follows:
- Perform a cable trace between devices A and B
- Add all devices to the filter that has been found in the path between A and B
- Perform a cable trace between devices A and C
- Add all devices to the filter that has been found in the path between A and C
- Perform a cable trace between devices B and C
- Add all devices to the filter that has been found in the path between B and C
- Create the topology as usual
So that's three times as many operations as before with only 1 more device taken into account. If you have 4 devices, you need 6 operations. 5 devices, 10 operations, 6 devices, 15 operations, 7 devices, 20 operations, 20 devices, 190 operations... you get the idea. This becomes worse if there's more than one interface per device.
All of these operations represent a database query. So a large number of devices could DOS your database.
The only thing we could do is to limit the number of devices if this feature is enabled, but this results in an ugly hack and a bad user experience.
I hope you get my point. Maybe I'm overlooking something and @mattieserver has got a solution. I doubt it, to be honest.