Request ability to assign Vlans and default gateway to switches #1121

Closed
opened 2025-12-29 16:29:12 +01:00 by adam · 1 comment
Owner

Originally created by @jpatmore on GitHub (Jul 21, 2017).

Issue type:feature request

Python version:
NetBox version:

This may be related to feature request #1349 , but am raising it independently as I didnt want to dilute the excellent progress on that one (this is slightly different).

We too are developing Netbox as 'source of truth' for Ansible configuration management. We would like to assign existing site Vlans to a Layer 2 switch, and also assign the default gateway IP address.

For the Vlans. we are currently just manually creating virtual interfaces, and assigning them the ID of the Vlans (and then just leaving the IP field blank), It would be beneficial to be able to select in bulk from a check list of Vlans that exist at the site, and automatically create the interfaces with that Vlan ID, and add the Vlans name as description?

It would also be beneficial to assign the physical interfaces of the switch to either tagged/untagged status (untagged would mean a dot1q trunk), and assign physical interfaces as members of specific existing site Vlans in bulk.

For the default gateway, we would like to be able to select the interface of another device, and add it in the 'critical connections' section, as the 'default gateway' for the device.

These elements could then be called via API to populate the configuration variables in Ansible.

Thanks again for all the effort that is going in to this application.

Originally created by @jpatmore on GitHub (Jul 21, 2017). <!-- Please note: GitHub issues are to be used only for feature requests and bug reports. For installation assistance or general discussion, please join us on the mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please indicate "bug report" or "feature request" below. Be sure to search the existing set of issues (both open and closed) to see if a similar issue has already been raised. --> ### Issue type:feature request <!-- If filing a bug, please indicate the version of Python and NetBox you are running. (This is not necessary for feature requests.) --> **Python version:** **NetBox version:** <!-- If filing a bug, please record the exact steps taken to reproduce the bug and any errors messages that are generated. If filing a feature request, please precisely describe the data model or workflow you would like to see implemented, and provide a use case. --> This may be related to feature request #1349 , but am raising it independently as I didnt want to dilute the excellent progress on that one (this is slightly different). We too are developing Netbox as 'source of truth' for Ansible configuration management. We would like to assign existing site Vlans to a Layer 2 switch, and also assign the default gateway IP address. For the Vlans. we are currently just manually creating virtual interfaces, and assigning them the ID of the Vlans (and then just leaving the IP field blank), It would be beneficial to be able to select in bulk from a check list of Vlans that exist at the site, and automatically create the interfaces with that Vlan ID, and add the Vlans name as description? It would also be beneficial to assign the physical interfaces of the switch to either tagged/untagged status (untagged would mean a dot1q trunk), and assign physical interfaces as members of specific existing site Vlans in bulk. For the default gateway, we would like to be able to select the interface of another device, and add it in the 'critical connections' section, as the 'default gateway' for the device. These elements could then be called via API to populate the configuration variables in Ansible. Thanks again for all the effort that is going in to this application.
adam closed this issue 2025-12-29 16:29:12 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jul 24, 2017):

We would like to assign existing site Vlans to a Layer 2 switch

#150 is open to assign VLANs to interfaces (e.g. tagged or untagged). It'll happen, we just haven't decided how yet. Once implemented, that information can be used to infer which VLANs should be configured on a switch.

and also assign the default gateway IP address

This is probably best handled by #1349. You could create a custom field for this in the interim, but IMO this is one of those miscellaneous bits in the config that you might want to share across multiple devices.

@jeremystretch commented on GitHub (Jul 24, 2017): > We would like to assign existing site Vlans to a Layer 2 switch #150 is open to assign VLANs to interfaces (e.g. tagged or untagged). It'll happen, we just haven't decided how yet. Once implemented, that information can be used to infer which VLANs should be configured on a switch. > and also assign the default gateway IP address This is probably best handled by #1349. You _could_ create a custom field for this in the interim, but IMO this is one of those miscellaneous bits in the config that you might want to share across multiple devices.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1121