vlans are not visible in site overview or API #6804

Closed
opened 2025-12-29 19:45:35 +01:00 by adam · 3 comments
Owner

Originally created by @sebastiaanvduijn on GitHub (Aug 12, 2022).

NetBox version

3.2.7

Python version

3.8

Steps to Reproduce

Once a new vlan is created which is not directly attached to a site but to a site group and prefixes assigned to this vlan and assigned to a site, the vlan is not assigned to the site.

Site related objects

You get the same result while using the API

Expected Behavior

Expected behavior is to see the amount of vlans in use per site by doing a reverse lookup through prefixes assinged, this helps automation tools understanding the amount of vlans present and if not present create them.

Observed Behavior

vlans are not visible in the site overview or API

Originally created by @sebastiaanvduijn on GitHub (Aug 12, 2022). ### NetBox version 3.2.7 ### Python version 3.8 ### Steps to Reproduce Once a new vlan is created which is not directly attached to a site but to a site group and prefixes assigned to this vlan and assigned to a site, the vlan is not assigned to the site. ![Site related objects](https://user-images.githubusercontent.com/20712065/184332295-45437b05-04c2-4139-b4b7-e45d94f01c39.PNG) You get the same result while using the API ### Expected Behavior Expected behavior is to see the amount of vlans in use per site by doing a reverse lookup through prefixes assinged, this helps automation tools understanding the amount of vlans present and if not present create them. ### Observed Behavior vlans are not visible in the site overview or API
adam closed this issue 2025-12-29 19:45:35 +01:00
Author
Owner

@jeremystretch commented on GitHub (Aug 12, 2022):

Expected behavior is to see the amount of vlans in use per site by doing a reverse lookup through prefixes assinged

This would be extremely inefficient, which is one of the reasons the direct relationship between the site and VLAN objects exists. You need to assign VLANs to sites just as you do prefixes.

@jeremystretch commented on GitHub (Aug 12, 2022): > Expected behavior is to see the amount of vlans in use per site by doing a reverse lookup through prefixes assinged This would be extremely inefficient, which is one of the reasons the direct relationship between the site and VLAN objects exists. You need to assign VLANs to sites just as you do prefixes.
Author
Owner

@sebastiaanvduijn commented on GitHub (Aug 12, 2022):

As example: We have Vlan 60 which exist in 60 sites, if we need to assign a vlan per site this would mean 60 times vlan 60.... We have created vlan 60 once and the allocated prefixes are assigned to a site.

There for my ask for the above.

@sebastiaanvduijn commented on GitHub (Aug 12, 2022): As example: We have Vlan 60 which exist in 60 sites, if we need to assign a vlan per site this would mean 60 times vlan 60.... We have created vlan 60 once and the allocated prefixes are assigned to a site. There for my ask for the above.
Author
Owner

@jeremystretch commented on GitHub (Aug 12, 2022):

if we need to assign a vlan per site this would mean 60 times vlan 60....

Correct. Do this. Because you have 60 VLANs, not one.

@jeremystretch commented on GitHub (Aug 12, 2022): > if we need to assign a vlan per site this would mean 60 times vlan 60.... Correct. Do this. Because you have 60 VLANs, not one.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6804