mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-11 21:10:29 +01:00
CWDM/DWDM and other connection hierarchies support #2970
Closed
opened 2025-12-29 18:24:10 +01:00 by adam
·
21 comments
No Branch/Tag Specified
main
update-changelog-comments-docs
feature-removal-issue-type
20911-dropdown
20239-plugin-menu-classes-mutable-state
21097-graphql-id-lookups
feature
fix_module_substitution
20923-dcim-templates
20044-elevation-stuck-lightmode
feature-ip-prefix-link
v4.5-beta1-release
20068-import-moduletype-attrs
20766-fix-german-translation-code-literals
20378-del-script
7604-filter-modifiers-v3
circuit-swap
12318-case-insensitive-uniqueness
20637-improve-device-q-filter
20660-script-load
19724-graphql
20614-update-ruff
14884-script
02496-max-page
19720-macaddress-interface-generic-relation
19408-circuit-terminations-export-templates
20203-openapi-check
fix-19669-api-image-download
7604-filter-modifiers
19275-fixes-interface-bulk-edit
fix-17794-get_field_value_return_list
11507-show-aggregate-and-rir-on-api
9583-add_column_specific_search_field_to_tables
v4.5.0
v4.4.10
v4.4.9
v4.5.0-beta1
v4.4.8
v4.4.7
v4.4.6
v4.4.5
v4.4.4
v4.4.3
v4.4.2
v4.4.1
v4.4.0
v4.3.7
v4.4.0-beta1
v4.3.6
v4.3.5
v4.3.4
v4.3.3
v4.3.2
v4.3.1
v4.3.0
v4.2.9
v4.3.0-beta2
v4.2.8
v4.3.0-beta1
v4.2.7
v4.2.6
v4.2.5
v4.2.4
v4.2.3
v4.2.2
v4.2.1
v4.2.0
v4.1.11
v4.1.10
v4.1.9
v4.1.8
v4.2-beta1
v4.1.7
v4.1.6
v4.1.5
v4.1.4
v4.1.3
v4.1.2
v4.1.1
v4.1.0
v4.0.11
v4.0.10
v4.0.9
v4.1-beta1
v4.0.8
v4.0.7
v4.0.6
v4.0.5
v4.0.3
v4.0.2
v4.0.1
v4.0.0
v3.7.8
v3.7.7
v4.0-beta2
v3.7.6
v3.7.5
v4.0-beta1
v3.7.4
v3.7.3
v3.7.2
v3.7.1
v3.7.0
v3.6.9
v3.6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1
v1.0.3
1.0.0
Labels
Clear labels
beta
breaking change
complexity: high
complexity: low
complexity: medium
needs milestone
netbox
pending closure
plugin candidate
pull-request
severity: high
severity: low
severity: medium
status: accepted
status: backlog
status: blocked
status: duplicate
status: needs owner
status: needs triage
status: revisions needed
status: under review
topic: GraphQL
topic: Internationalization
topic: OpenAPI
topic: UI/UX
topic: cabling
topic: event rules
topic: htmx navigation
topic: industrialization
topic: migrations
topic: plugins
topic: scripts
topic: templating
topic: testing
type: bug
type: deprecation
type: documentation
type: feature
type: housekeeping
type: translation
Mirrored from GitHub Pull Request
No Label
Milestone
No items
No Milestone
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: starred/netbox#2970
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @steffann on GitHub (Oct 23, 2019).
Environment
Proposed Functionality
Netbox can currently not support coarse/dense wave division multiplexing (CWDM/DWDM) connections over circuits.
It starts with not being able to trace connections over circuits when there are front/rear ports involved. Multiple front ports trace through their rear port to the circuit termination, but the
_connected_circuitterminationfield on an interface requires a one-to-one relation.A quick fix was proposed to change the one-to-one relation to a foreign key, but that exposed multiple other issues. For example when tracing a circuit termination through a rear port. Because there is no front port known from the circuit's point of view the trace assumes front port 1 and the connected endpoint of the circuit termination appears to be whatever happens to be connected to that front port.
So this is a broader limitation than just the "DWDM through a circuit" that we started with. The proposed functionality is to work with front+rear port "layers":
Traces and endpoints should stay in their layer or the underlying layers, but never go up above their starting layer. This becomes even more important when for example using the upgrade port of a mux, where the rear port of a second mux is attached to the front upgrade port of another mux:
When looking for the connected endpoint of rear port 1 the logical endpoint is rear port 4. Tracing any further makes no sense because there are multiple endpoints beyond that rear port. The same goes for rear ports 2 and 3.
If one side of the circuit would be unconnected then the traces would all end at the circuit termination. This shows that a connected endpoint is not a one-to-one relationship. With multiplexers many endpoints can have the same connected endpoint.
And when other connections are missing the connected endpoint may well be something else than an interface or circuit termination. As an example lets say that one of the front ports isn't connected to an interface. In that case it would be useful to see the last front port where the link ends, hopefully so that someone can go and connect it :)
Use Case
These use cases are taken from #3288:
I see these possible scenario's. These are the "classical" ones without front/rear ports. Let's assume that the A side is connected to a device interface through a circuit-termination (CT). Obviously all scenario's apply with A and B sides reversed as well.
In scenario 1 we only know that the device on the A side is connected to the circuit. The user interface should show which circuit the device interface is connected to. Display "via
circuitin the user interface".Scenario 2 expands on this a bit because we now know, through the circuit-termination, which site the other end of the circuit goes to. I suggest we show both the circuit and the remote site in the user interface. Display "to
siteviacircuit".Scenario 3 should show the user that the device interface is connected to which remote device interface, plus which circuit the connection uses. As we already know the remote device, I don't see much value in showing the remote site of the circuit-termination as well. Display "to
deviceportviacircuit".Then on to some more complex scenarios where there are multiple circuits on the path:
I think these scenarios are similar to the first three. In the user interface I personally would like to see all the circuits to make it more intuitive, especially when looking a the impact of outages. I think it would also be useful to see the sites of CT 1B, CT 2A, etc. (removing duplicates when CT 1B and 2A are in the same site, as they will probably be in most cases). For example: "via
circuit1-ct1B/2A-site-circuit2" etc.And then on to the scenarios that I opened this ticket about: CWDM and DWDM circuits and suchlike multiplexers:
I'm assuming that the names of the front ports will correspond to channel names or something similar. Is that a reasonable assumption?
For scenario 7 I think it would be useful to show the front port name and the circuit in the user interface. That is probably the information a user needs most. Display "via
mux1-front-circuit" (e.g. "via CH32 - DarkFiber123").Scenario 8 would benefit from showing the remote site name as well, similar to scenario 2. Display "to
ctB-siteviamux1-front-circuit" (e.g. "to Amsterdam via CH32 - DarkFiber123").Scenario 9 seems to be an error, but maybe there are cases where the mux device has a separate channel for out-of-band management which doesn't have a corresponding front port. Display "to
mux2viamux1-front-circuit" (e.g. "to mux01.ams1 via CH32 - DarkFiber123").In scenario 10 the user probably wants to know the front port that the connection ends up at. Display "to
mux2mux2-frontviamux1-front-circuit" (e.g. "to mux01.ams1 CH32 via CH32 - DarkFiber123").A possible optimization could be to display "to
mux2mux2-frontviacircuit" (e.g. "to mux01.ams1 CH32 via DarkFiber123") when the front names on both MUXes are the same, as will be the case when those names are CWDM/DWDM channel names.Scenario 11 would of course show the connected device and interface together with the circuit. If we can assume that front port names are indeed channel names, then that information would be useful to show as well. Display "to
remote-deviceremote-interfaceviamux1-front-circuit-mux2-front" (e.g. "to router1.ams1 xe-0/0/0 via CH32 - DarkFiber123 - CH32").The same optimization with duplicate front port names would apply here too: "to
remote-deviceremote-interfaceviamux1-front-circuit" (e.g. "to router1.ams1 xe-0/0/0 via CH32 - DarkFiber123").For the CWDM/DWDM scenarios we might need to rethink the
circuits_circuittermination.connected_endpoint_idfield as a circuit-termination may be connected to a rear port, in which case there is no single interface that it's connected to.And then there are the scenarios where there are multiple CWDM/DWDM MUXes on the path:
For these scenarios I would suggest prefixing the display text of the previous section with "via
mux1-front-circuit-mux2-front" (or the shorter optimized version, with front port names omitted if they are the same as the previous front port name).Scenario 12 would display "via
mux1-front-circuit1-mux2-front-mux3-front-circuit2" (e.g. "via CH32 - DarkFiber123 - CH32 - CH32 - DarkFiber456"), or optimized to "via CH32 - DarkFiber123 - DarkFiber456"Scenario 13 would display "to
ct2B-siteviamux1-front-circuit1-mux2-front-mux3-front-circuit2" (e.g. "to Amsterdam via CH32 - DarkFiber123 - CH32 - CH32 - DarkFiber456"), or optimized to "to Amsterdam via CH32 - DarkFiber123 - DarkFiber456"Scenario 14 would display "to
mux4viamux1-front-circuit1-mux2-front-mux3-front-circuit2" (e.g. "to mux01.ams1 via CH32 - DarkFiber123 - CH32 - CH32 - DarkFiber456"), or optimized to "to mux01.ams1 via CH32 - DarkFiber123 - DarkFiber456".In scenario 15 would display "to
mux4mux4-frontviamux1-front-circuit1-mux2-front-mux3-front-circuit2" (e.g. "to mux01.ams1 CH32 via CH32 - DarkFiber123"), or optimized to "to mux01.ams1 CH32 via DarkFiber123 - DarkFiber456".Scenario 16 would display "to
remote-deviceremote-interfaceviamux1-front-circuit1-mux2-front-mux3-front-circuit2-mux4-front" (e.g. "to router1.ams1 xe-0/0/0 via CH32 - DarkFiber123 - CH32 - CH32 - DarkFiber456 - CH32"), or optimized to "to router1.ams1 xe-0/0/0 via CH32 - DarkFiber123 - DarkFiber456".And then another scenario suggested by @bsteinert:
when you connect a multiplexer to a extension port of another multiplexer (often 1300nm cwdm or 1550nm dwdm) to extend your network this could break things in documentation..
--> "From Site1 to Site2 via Mux-1 1330nm - Mux-2 1300nm - DarkFiberX - Mux-3 1300nm - Mux-4 1330nm"
That get even more complicated when i add PatchPanel to NetBox...
Database Changes
To document all these use cases the
_connected_interfaceand_connected_circuitterminationfields onInterfaceare no longer sufficient. The same goes for theconnected_endpointfields of all other network (and console) endpoints.As these fields are not storing authoritative data (they are basically caches to keep the user interface and API responsive) I suggest replacing them with GenericForeignKey fields with the model type restricted to
CABLE_TERMINATION_TYPES. That way any combination of endpoints can be cached and shown to the user.Because the proposed user interface above also shows the path between endpoints ("via …") the trace should be cached too. Because of the efficient cacheing that Netbox already uses I have found that storing a list of
[(('app', 'model'), id), …]in a JSON field provides all the necessary information without adding too much overhead. I have tried storing actual trace details as well, but that would require rebuilding the field on every change in any of the cached information (like names of interfaces, circuits, sites, …, …). Just storing the object's id and retrieving its details at runtime proved to be much much easier to maintain, while still having a quite acceptable performance.External Dependencies
None
@steffann commented on GitHub (Oct 23, 2019):
PS: the proposed construction also allows for future support of break-out interfaces like those with MPO cables that connect to a patch panel that breaks them out into separate front ports.
But let's leave supporting physical sub-interfaces for another feature request :)
@steffann commented on GitHub (Nov 1, 2019):
For those getting here from individual bug reports:
This all started with me finding a bug, trying multiple ways to solve this, concluding that the current architecture gets in the way, proposing a revised architecture, and then looking at different bugs and feature requests that could/would be solved with this new architecture. When looking from each of the individual bug's point of view such an architectural change may seem like overkill.
I understand this is a huge step, but I also think it's a step forward that will benefit future development.
@darkdane commented on GitHub (Nov 2, 2019):
We also use DWDM and suffer from the exact same problem. I would love to see this implemented into Netbox.
@stale[bot] commented on GitHub (Dec 6, 2019):
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our contributing guide.
@steffann commented on GitHub (Dec 6, 2019):
I really think this is an important step forward, so I'd like to keep it open. I understand that releasing 2.7 comes first at this point in time.
@amtypaldos commented on GitHub (Dec 13, 2019):
This is something that would help us out a ton as we use DWDM and splitters in our infrastructure that we would like to track.
@stale[bot] commented on GitHub (Dec 27, 2019):
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our contributing guide.
@steffann commented on GitHub (Dec 27, 2019):
Still keeping it open until the maintainers have more time.
@doug14 commented on GitHub (Dec 30, 2019):
I have a small DWDM structure and I am about to increase this structure. This implementation would be of great importance to keep our organization here.
@stale[bot] commented on GitHub (Jan 13, 2020):
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our contributing guide.
@doug14 commented on GitHub (Jan 13, 2020):
Still keeping it open until the maintainers have more time.
@stale[bot] commented on GitHub (Jan 27, 2020):
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our contributing guide.
@darkdane commented on GitHub (Jan 27, 2020):
Please implement this, there is a urgent need for this if you use DWDM.
@doug14 commented on GitHub (Jan 27, 2020):
Still keeping it open until the maintainers have more time.
@stale[bot] commented on GitHub (Feb 10, 2020):
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our contributing guide.
@steffann commented on GitHub (Feb 10, 2020):
keeping it open!
@doug14 commented on GitHub (Feb 10, 2020):
Still keeping it open until the maintainers have more time.
@DanSheps commented on GitHub (Feb 10, 2020):
@steffann or @doug14 Is this something you are willing to commit to working on?
@steffann commented on GitHub (Feb 10, 2020):
I have volunteered to work on this many times :) I'm just waiting for a maintainer to have time to work with me to move this forward.
@jeremystretch commented on GitHub (Feb 21, 2020):
Marking this as blocked. We can take another look at it after all the current bugs relating to cabling have been resolved (#2994, #3193, #3288).
@jeremystretch commented on GitHub (Apr 24, 2020):
Paths through nested rear ports are now supported; support was added/fixed by the work done under #4388. I believe at this point all of the cited concerns have been either fixed or addressed in separate issues (e.g. #4519). If any problems remain unaccounted for, separate and concise bug reports need to be opened for each one.