Skip to content

VLAN Translation #7336

Closed
Closed
@jaakub

Description

@jaakub

NetBox version

2.11.12

Feature type

Data model extension

Proposed functionality

Extend the VLAN object to allow documentation of 1:1 VLAN translation (similar to already existing NAT IP functionality within the IP address object). The simplest explanation being VLAN 100 being translated into VLAN 200 and the other way round.

This would require two additional fields within the VLAN object called (TBD):

  • translation_vlan_group
  • translation_vlan_id

Those fields would be used to create a link between two VLAN objects to allow VLANs within the same or different VLAN groups to be linked together (in cases where two different pools are used for internal and external VLANs). Those two new fields would need to be accessible via:

  • the API (would return nested VLAN object)
  • UI (when creating or editing objects)
  • CSV import functionality

This would require validation that the referenced object exists (especially via CSV and the API). Lastly, it would be great if we could expand the query filters to easily return all translated VLANs using is_translated. Similar to has_primary_ip.

Within the UI, when editing/creating an object, you'd see an additional section called VLAN Translation, with two fields mentioned earlier. Once again, this is to be discussed and it may not warrant its own specific section and could be added under the already existing VLAN section.

vlan-object

The UI would also need an additional row within the VLAN view to represent the mapping (None if empty). One option is to just show the associated VLAN within that row, and the second option is to also show the VLAN group of the associated VLAN.

Option 1:

Internal VLAN View:

internal-vlan-object

External VLAN View:

external-vlan-object

Option 2 (showing VLAN group of mapped VLAN):

Internal VLAN View:

internal-vlan-object-2nd-option

External VLAN View:

external-vlan-object-2nd-option

Lastly, the VLAN view (/ipam/vlans) would need an additional column called Translation (TBD), which would show either a green (when the VLAN link is present) or red tick (when the VLAN link isn't present) to easily identify those translated VLANs.

vlan-view-translation

Use case

In our scenario shown above, we have two VLAN groups, one for external VLANs, one for internal VLANs. At the moment, we are unable to create external to internal VLAN mapping (1:1) and we need to document those mappings within a spreadsheet. By adding this functionality, we could edit the VLAN object and select another VLAN to create that mapping.

Database changes

Unsure.

External dependencies

N/A

Metadata

Metadata

Assignees

Labels

complexity: mediumRequires a substantial but not unusual amount of effort to implementnetboxstatus: acceptedThis issue has been accepted for implementationtype: featureIntroduction of new functionality to the application

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions