Support modelling of access interfaces with auxiliary tagged VLANs (e.g. voice VLAN) #240

Closed
opened 2026-04-05 16:23:24 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @miki5421 on 3/3/2026

NetBox version

V4.5.3

Feature type

Data model extension

Proposed functionality

Currently, when an interface in NetBox is configured with 802.1Q mode "Access", only a single untagged VLAN can be assigned. Tagged VLANs are only available when the interface mode is set to "Tagged", which models a trunk interface.

However, many real-world network designs use hybrid access ports that carry:

  • One untagged VLAN for data traffic
  • One tagged VLANs for auxiliary services

A common example is an IP phone deployment where:

  • The connected workstation uses an untagged data VLAN
  • The phone sends voice traffic using an 802.1Q tagged VLAN

On Cisco platforms this is implemented using:

switchport mode access
switchport access vlan <DATA>
switchport voice vlan <VOICE>

This does not represent a trunk port from an operational standpoint, and modelling the interface as "Tagged" in NetBox causes downstream configuration templates to treat it as a trunk.

Proposed change:

Allow assignment of one or more tagged VLANs to interfaces in "Access" mode while retaining the untagged VLAN designation.

Possible implementation approaches:

Option A (minimal UI change)

  • Allow the existing "Tagged VLANs" field to appear when mode = Access
  • Untagged VLAN remains mandatory
  • Tagged VLANs become optional auxiliary VLANs

Option B (more explicit model)

  • Introduce a new optional field:
    auxiliary_vlans (ManyToMany -> VLAN)

UI example:

Mode: Access
Untagged VLAN: 100
Auxiliary VLANs: [200]

This would allow NetBox to model the actual Layer-2 behaviour on the wire:

  • Untagged frames → VLAN 100
  • Tagged frames → VLAN 200

Templates can then decide how to render this for different vendors (Cisco voice VLAN, hybrid ports on other platforms, etc.).

Use case

Hybrid access ports are extremely common in enterprise networks.

Typical examples include:

  1. IP phone + workstation ports

    • Data VLAN (untagged)
    • Voice VLAN (tagged)
  2. Access ports carrying auxiliary tagged VLANs for IoT or device management

  3. Platforms that support hybrid ports (not strictly trunk or access)

Currently, NetBox users must choose between two imperfect modelling approaches:

  1. Set the interface to "Tagged" mode

    • This incorrectly models the interface as a trunk
    • Configuration templates may render trunk configurations instead of access ports
  2. Use custom fields to store the voice VLAN

    • This breaks consistency with the existing VLAN model
    • Templates require special logic
    • VLAN relationships are not visible in the normal interface VLAN fields

Allowing auxiliary tagged VLANs on access interfaces would:

  • Better reflect actual Layer-2 behaviour
  • Improve vendor-agnostic modelling
  • Simplify configuration template logic
  • Reduce reliance on custom fields

Database changes

This feature could potentially be implemented without introducing a new model.

Option A:
Reuse the existing tagged_vlans ManyToMany relationship and allow it when mode = access.

Option B:
Introduce a new field on dcim.Interface:

auxiliary_vlans = ManyToManyField(VLAN)

This field would represent tagged VLANs permitted on an access interface.

No existing data model changes would be required for VLANs themselves.
Migration impact would be minimal.

External dependencies

No response

*Originally created by @miki5421 on 3/3/2026* ### NetBox version V4.5.3 ### Feature type Data model extension ### Proposed functionality Currently, when an interface in NetBox is configured with 802.1Q mode "Access", only a single untagged VLAN can be assigned. Tagged VLANs are only available when the interface mode is set to "Tagged", which models a trunk interface. However, many real-world network designs use hybrid access ports that carry: - One untagged VLAN for data traffic - One tagged VLANs for auxiliary services A common example is an IP phone deployment where: - The connected workstation uses an untagged data VLAN - The phone sends voice traffic using an 802.1Q tagged VLAN On Cisco platforms this is implemented using: switchport mode access switchport access vlan <DATA> switchport voice vlan <VOICE> This does not represent a trunk port from an operational standpoint, and modelling the interface as "Tagged" in NetBox causes downstream configuration templates to treat it as a trunk. Proposed change: Allow assignment of one or more tagged VLANs to interfaces in "Access" mode while retaining the untagged VLAN designation. Possible implementation approaches: Option A (minimal UI change) - Allow the existing "Tagged VLANs" field to appear when mode = Access - Untagged VLAN remains mandatory - Tagged VLANs become optional auxiliary VLANs Option B (more explicit model) - Introduce a new optional field: auxiliary_vlans (ManyToMany -> VLAN) UI example: Mode: Access Untagged VLAN: 100 Auxiliary VLANs: [200] This would allow NetBox to model the actual Layer-2 behaviour on the wire: - Untagged frames → VLAN 100 - Tagged frames → VLAN 200 Templates can then decide how to render this for different vendors (Cisco voice VLAN, hybrid ports on other platforms, etc.). ### Use case Hybrid access ports are extremely common in enterprise networks. Typical examples include: 1. IP phone + workstation ports - Data VLAN (untagged) - Voice VLAN (tagged) 2. Access ports carrying auxiliary tagged VLANs for IoT or device management 3. Platforms that support hybrid ports (not strictly trunk or access) Currently, NetBox users must choose between two imperfect modelling approaches: 1. Set the interface to "Tagged" mode - This incorrectly models the interface as a trunk - Configuration templates may render trunk configurations instead of access ports 2. Use custom fields to store the voice VLAN - This breaks consistency with the existing VLAN model - Templates require special logic - VLAN relationships are not visible in the normal interface VLAN fields Allowing auxiliary tagged VLANs on access interfaces would: - Better reflect actual Layer-2 behaviour - Improve vendor-agnostic modelling - Simplify configuration template logic - Reduce reliance on custom fields ### Database changes This feature could potentially be implemented without introducing a new model. Option A: Reuse the existing tagged_vlans ManyToMany relationship and allow it when mode = access. Option B: Introduce a new field on dcim.Interface: auxiliary_vlans = ManyToManyField(VLAN) This field would represent tagged VLANs permitted on an access interface. No existing data model changes would be required for VLANs themselves. Migration impact would be minimal. ### External dependencies _No response_
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#240