Cannot add VLAN with ID 4095 for VGT mode in vSphere #2806

Closed
opened 2025-12-29 18:22:21 +01:00 by adam · 3 comments
Owner

Originally created by @JQ-KH on GitHub (Aug 14, 2019).

Environment

  • Python version: 3.6.8
  • NetBox version: 2.6.2

We are using VGT mode (Virtual Guest Tagging) for some virtual machines and this requires setting the VLAN on the virtual switch port to 4095.
See https://kb.vmware.com/s/article/1004252

Steps to Reproduce

  1. Try to add a VLAN with ID 4095

Observed Behavior

Error: Ensure this value is less than or equal to 4094.
netbox-vlan-4095-error

Originally created by @JQ-KH on GitHub (Aug 14, 2019). <!-- NOTE: This form is only for reproducible bugs. If you need assistance with NetBox installation, or if you have a general question, DO NOT open an issue. Instead, post to our mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report. --> ### Environment * Python version: 3.6.8 * NetBox version: 2.6.2 <!-- Describe in detail the exact steps that someone else can take to reproduce this bug using the current stable release of NetBox (or the current beta release where applicable). Begin with the creation of any necessary database objects and call out every operation being performed explicitly. If reporting a bug in the REST API, be sure to reconstruct the raw HTTP request(s) being made: Don't rely on a wrapper like pynetbox. --> We are using VGT mode (Virtual Guest Tagging) for some virtual machines and this requires setting the VLAN on the virtual switch port to 4095. See https://kb.vmware.com/s/article/1004252 ### Steps to Reproduce 1. Try to add a VLAN with ID 4095 <!-- What happened instead? --> ### Observed Behavior Error: Ensure this value is less than or equal to 4094. ![netbox-vlan-4095-error](https://user-images.githubusercontent.com/54115206/63039493-b8cf3c00-bec3-11e9-918b-e307db3f9541.png)
adam closed this issue 2025-12-29 18:22:21 +01:00
Author
Owner

@LBegnaud commented on GitHub (Aug 14, 2019):

But that's not a valid vlan. It's a vmware way of defining a trunk port, isn't it?

@LBegnaud commented on GitHub (Aug 14, 2019): But that's not a valid vlan. It's a vmware way of defining a trunk port, isn't it?
Author
Owner

@JQ-KH commented on GitHub (Aug 14, 2019):

It's hard to come by reliable information regarding this, but 4095 is a valid VLAN ID.
Officially VLAN 0 and 4095 are reserved IDs.
As far as I was able to understand they are both for system use.
VLAN 0 packets can carry an 802.1p priority but are handled like an untagged packet.
VLAN 4095 is "for internal use"
And for me the use case of vSphere internal switching with VLAN ID 4095 is "internal use" ;)

It just tells vsphere to not handle tagging itself (at port group level) but to leave this to the virtual machines. Kinda like passthrough.

@JQ-KH commented on GitHub (Aug 14, 2019): It's hard to come by reliable information regarding this, but 4095 is a valid VLAN ID. Officially VLAN 0 and 4095 are reserved IDs. As far as I was able to understand they are both for system use. VLAN 0 packets can carry an 802.1p priority but are handled like an untagged packet. VLAN 4095 is "for internal use" And for me the use case of vSphere internal switching with VLAN ID 4095 is "internal use" ;) It just tells vsphere to not handle tagging itself (at port group level) but to leave this to the virtual machines. Kinda like passthrough.
Author
Owner

@jeremystretch commented on GitHub (Aug 15, 2019):

if it's used internally there should be no need to model it in NetBox. If you need some way to indicate that VGT is in use for a specific interface, consider using a tag instead.

@jeremystretch commented on GitHub (Aug 15, 2019): if it's used internally there should be no need to model it in NetBox. If you need some way to indicate that VGT is in use for a specific interface, consider using a tag instead.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2806